Wednesday, January 25, 2012

tnsping without the TNSNAMES.ORA entry

It isn't immediately obvious in the tnsping documentation, but it is possible to perform the ping without having the Transparent Network Substrate configuration in place (i.e net service name) on the client for the database in question.

$ORACLE_HOME/bin/tnsping <hostname>:<port>/<sid>

Tuesday, November 1, 2011

Tailoring Fusion CRM

The journey for the Fusion CRM development team has been a long one. What a great feeling for all of us when Fusion Applications was officially released this year as Generally Available. During his keynote speech at this year's Oracle OpenWorld Steve Miranda reiterates that statement. Also during his session there were some great demonstrations of Fusion CRM. Anthony Lye demonstrated (about 25 minutes into the presentation) how the application can be extended at run time. Design time at run time features are made possible by a number of Fusion Middleware technologies including WebCenter and MDS (pdf 592kb). Extending the application, as Anthony Lye demonstrated, is one form of tailoring that can be performed with the out of the box application. Other forms of tailoring include personalisation and customisation (personalization and customization in the documentation). Both concepts are very similar in that changes to the application are persisted via MDS but they are differentiated by the scope of the change and for whom the change is made.

Available to all users.
Put simply, personalisation is a tailoring action performed by an end user for themselves to set their own preferences for how they work with the application. These changes can be to include dynamic content such as Business Intelligence reports or a syndication feed from an external source. The key point is that these are personal preferences explicitly specified by the user for the user by editing the page via the WebCenter Page Composer. A user can also perform implicit personalisation of the Fusion CRM application without ever touching Page Composer simply by hiding columns in a table, or rearranging their order relative to each other by dragging and dropping. These personal preferences are also reflected in the shared components across Fusion CRM including the Activities UI components for Notes, Interactions, Appointments and Tasks. Setting a preference for the display width of the comments column for Tasks in the Marketing application is reflected in Opportunity Management.

Only available to users with Administration privileges.
In the context of Fusion CRM, customisation is a modification made by an administrator, or someone with the appropriate permissions, to the application for a set of users. This set, referred to as Customization Level, can be defined as all users for the installed application, internal users, external users or users with a particular set of roles. For the Partner Relationship Management functionality in Fusion CRM V1 the internal vs external layer was introduced so that a Channel Administrator could tailor how they wanted their partners (external users) to see the Fusion CRM screens. Both internal and external users are interacting with the same screen, but the external users may see a lot more branding and content more suitable for partners rather than employees.

From a development perspective, MDS terminology can make things a bit confusing because irrespective of the nature of change, MDS refers to it as a customisation. There are many cross platform components used in Fusion CRM that are individual products in themselves. Getting to grips with the terminology used by these different product teams and understanding the context has been a challenge, but really rewarding when you see the results.

Wednesday, October 5, 2011

Multi Byte String Generator

Click to go to launch page.
Fusion Applications uses Oracle Data Integrator as part of the data bulk import feature which includes migration and file import. While working on the Opportunity Bulk Import we had to ensure that multi byte characters were imported correctly. The majority of the test data we had to work with was from Siebel demo data used in North America. As a consequence, most of the data was ASCII and single byte. Just so we could generate multi byte strings for developer testing I put together a little Java Web Start application called Multi Byte String Generator.

It has a simple interface where you specify the number of bytes you want per character (1 to 3) and what the number of characters you want. The randomly generated string is displayed and you can copy it to your clipboard (using the Copy to Clipboard button) and paste it into your application or test fixture. Due to the security features of Java Web Start, you will be prompted to allow the application to access your local clipboard. Some additional information about how many bytes the string occupies in UTF-8, UTF-16 and UTF-32 encoding is also displayed.

Wednesday, July 20, 2011

Using OSGi to explain the difference between Factory and Broker pattern

Osgi in Action: Creating Modular Applications in JavaAfter some heated discussions about OSGi on The Server Side decided to put together a series of articles on the topic. Quite rightly I think, Peter Kriens has the honour of getting the series started. His article on developing modular applications provides one of the clearest explanations of the differences between the Factory and Broker pattern. Put simply, the Factory must know implementation details of what it is creating, while the Broker does not, since it does not really create anything.

Peter's explanation makes it very clear why Factory is good, but just not good enough, for enterprise applications. I hope he contributes more on the series.

Wednesday, September 8, 2010

Irish software at Oracle OpenWorld 2010

Preparation for the trio of Oracle's major conferences (Oracle OpenWorld, JavaOne, Oracle Develop) has been underway for months, but once September comes around the pace really quickens. The final touches get put to product demonstration scripts, keynote speeches, and honing the elevator pitch. In product development you know it's September because you can not find a product manager without scheduling a meeting days in advance. Of course, this is not unique to Oracle. There will be over 300 exhibitors at Oracle OpenWorld and many of them will be making sure their product or service is presented in the best possible manner. Having announced a major certification over the summer with Oracle's Global License Management Services, the staff at one Irish software company will be no different.

iQuate is an Irish software company which produces network inventory and network management solutions for large, complex networks. Using a multitude of protocols iQuate queries PCs, servers, network devices, databases to not only build up a profile of what is installed, but also what is actually being used. This information allows companies to potentially save a fortune on their software licencing fees, by simply not paying for what they are not using. Check them out at stand 3130 in the Moscone Center, West Exhibition Hall, Level 1.

Come to thing of it, Oracle has development centres around the world and the Dublin offices have staff working on server technology, tools and application software. So some portions of the Oracle software on show will have been made in Ireland too! :-)

Is iQuate really the only Irish software company exhibiting? It is the only one on the list of exhibitors with an Irish HQ. There might be other software companies that originated in or do the majority of their development in Ireland but have not listed an Irish address as their headquarters when registering as an exhibitor. In an effort to get into the US market and not appear as a foreign company, some businesses move their HQ to the US. This also demonstrates their commitment to the market. If you know of any other Irish software companies exhibiting this year please let me know and I would be delighted to include them.

Monday, August 16, 2010

ADF logging level to see SQL statements

Very handy for debugging runtime issues when developing, the Oracle ADF Business Components layer can output the SQL that it is executing. To do this though, the logging threshold must be set to a specific level...

'-Djbo.debugoutput=console -Djbo.logging.trace.threshold=5'

Curiously. the SQL statements do not get displayed for any other threshold level.

Monday, July 19, 2010

Loosely typed interfaces - The Normalizer Pattern and Oracle SOA Suite

When getting two or more systems working together, the making a connection part is generally the easiest, identity propagation is a bit trickier, but many times, the syntax and semantics of one system is at odds with another one. Over the decades this has been manifest in many ways and thankfully there are tools and techniques to work through them. A collation of such techniques is Enterprise Integration Patterns. The book, along with the associated website, is worthy of a dedicated article or two, and is not the real subject of this article. One message transformation pattern the book describes is the Normalizer Pattern where different formats for essentially the same object are catered for.
An example where this form of message translation becomes necessary is when using a service with a loosely typed interface. This can often happen when an existing system or utility (such as a batch / command processor) gets exposed as a web service. The request / response payload is little more than a collection of key / value pairs. There are a couple of ways to cater for this using Oracle SOA Suite 11g which I will outline in this article. One has full tool support. The other, a solution using XSLT, is not fully supported, but has an advantage in that the XSLT can be used both with the BPEL and Mediator components.

Troublesome Payloads
The challenge is to get something that is strongly typed into something that is loosely typed

Strongly TypedLoosely Typed

  <manager>Pam Beech</manager>

       <value>Pam Beech</value>
Now this is quite a simple example and the real world has a lot more complicated cases out there. Ones that would involve number formatting, character encoding, attribute concatenation, and so on. For the purposes of this exercise however, it is ideal to illustrate the point. All the files in this example are free and available for you to use, modify or incorporate into your own solution as you see fit. The example was produced and tested using Oracle Fusion Middleware That is JDeveloper Studio and WebLogic Server 11gR1. To reduce the number of files and dependencies involved, the example is a simple service (BPELProcessExample.wsdl) that takes a strongly typed request payload and returns a loosely typed response payload. The SOA composite project contains two BPEL processes that provide slightly different implementations for this same WSDL.

BPEL assign with copy and insertAfter
You can cater for the key / value pair structure by repeatedly appending a new 'property' element and then, using an XPATH predicate to specify which 'property' element is the target, copying the desired values. In the BPEL process this can all be done in a single 'assign' command, using the insertAfter instruction from the Oracle BPEL extension library. The BPEL designer supports this approach, and it is used extensively in production systems around the globe. It can get difficult to maintain and hard to read if the payload is large though. If dealing with a large payload see if you can split the copy / insertAfter instructions into two or more 'assign' commands. Ideally, you would give these 'assign' commands logical names such as 'assign_part_1_admin_details' and 'assign_part_2_finance_details'. What is a large payload in this case then? Well, I would say that if you have more than 10 key value pairs you should be seriously thinking about splitting them up and if you have more than 20, you should be definitely splitting them up. Remember, you might be familiar with the structure and understand how it is constructed, but what about the college graduate brought in by the consulting firm in a months time, or even you having to come back to this in 6 months time? Go on, make the maintenance a bit easier for everyone and break that assign behemoth into manageable chunks!

BPEL transform with XSLT
If experienced in dealing with XML documents then this approach will probably be very familiar to you. Extensible Stylesheet Language Transformations is used to convert XML data into some other format, which may also be XML data. In this case the stylesheet explicitly describes the target XML structure, making it somewhat easier to read than the BPEL assign approach described earlier. For example...
  <xsl:text disable-output-escaping="no">MANAGER</xsl:text>
  <xsl:value-of select="/client:process/client:department/client:manager">
The 'client' is a namespace prefix for the schema and in this SOA composite example the request and response happen to be defined in the same schema. This is easier to read, even if one is not all that familiar with XSL. For large payloads it is not necessary to split up the transformation as one might consider for the BPEL assign, but it could be done. The single transformation file could have a whole set of templates. However, the XSL Mapper does not support this approach yet, so if using this approach you will have to work in the Source editor, not the Design mode. Since this is using XSLT, the same XSL file can be used by the Mediator too, so it is not only a BPEL solution.

Which one is right for me?
As one can see from the diagrams there is not much difference in the BPEL designer between the two examples and the decision on which technique to use would be based on factors which are different from company to company, but clearly use of the XSL mapper is an important factor.
The complete example application with SOA composite is available at