Wednesday, January 27, 2016

Oracle BAM 12.2.x is Out

If you are used to 11G version of Oracle BAM, release 12.2 is full of pleasant surprises. Oracle says the 12 version was rebuilt from the ground up. BAM composer looks clean and much more simplified. Capabilities are clearly pinned to roles and made available under a pretty ADF Alta UI.
Login Screen: Home Page:

Here are the most impressive features that caught my attention:

1. Refreshed ADF based data Visualization Tools – graphs & charts with drill through, actions.

2. Extended browser compatibility support – IE, Firefox, Chrome. This one should really come above everything else listed here :).

3. KPI based email alerts

4. Pre-defined SQL Queries - Not the same thing as External Data Objects.

5. Automatic data purges - Configure the retention period as a configuration for Data Objects

6. Export data to a CSV file. All list, table views has this feature out of the box

7. Ready-to-use dashboards for BPM and SOA. A lot of the most important assignment, task, workload statistics are built into BAM

8. CQL for real-time pattern matching & trend analysis. Continuous Query Language(CQL) can be used to define queries on business objects that monitor patterns

8. BAMCommand, LoadGen - Tools provided for export, import operations. LoadGen can be used to load test data into BAM in specified intervals and order.

9. Multiple ways for data IO - BAMAdapter, Web Services or EMS

10. Role based security - 'Administrator' defines data objects and manage viewlets. 'Designer' builds queries, views and dashboards. BAM content user has access to the Home tab of BAM composer where they can view all dashboards they have access to.

BAM development cycle is as defined below:

1. BAM Administrator user defines the Data Object. DO can be Simple, Derived, Logical or External

2. BAM Designer creates a project and adds the created DO to the project.

3. Create a business query from DO attributes. Query can be Flat, Group, Tree Model or Continuous

4. Create a business view from business query.

5. Create dashboard(s) from business views.

6. Optionally, build KPIs and Params if needed.

Rendering a drop down list dynamically on Oracle PCS Web form

Been wanting to blog a little experiment I did with Oracle Process Cloud's Web form. Current version of PCS is limited to Web forms; no ADF. I'll post the other shortcomings of current PCS release in another blog. The only way to build dynamic field/value behavior (for now at least)is by using Javascript, JSON and REST.
Here is how you to build a 'drop down' that loads country names at run time.
Login to PCS account > composer> application.
Create a new form. I am calling it CountryList.
Drag and add a 'drop down' component on to the form. I am also adding a message component to show the selected country.
Click on the 'Create Rule' icon on top right of the form and add a new rule.
Type the rule below to load country list from a public JSON service on form load.
The code above reads country names from the JSON service and constructs a temporary array - v_Countries - from the 'name' elements of the JSON array. This temp array is then assigned to drop down Options.
Add an additional line to display the selected drop down value on message component. Web forms are smart enough to rerun the rules every time an event occurs in the component - which is value change in our case.
Test the form using the 'preview' button on top right.

Tuesday, June 24, 2014

Create Weblogic JMS SAF (Store and Forward) using WLST

As a follow up to my last blog, here is a simple WLST script to automate the whole process of creating EDN specific SAF on a non-SOA Weblogic server

----------------------------------------------------------------------------------------

######################################################
# This WLST will connect to the 'local' weblogic server
# and create a remote SAF connection as mentioned below.
# It is written to create a SystemModule-0 JMS Module,
# Create two connection factories (XA and non-XA),
# RemoteContext, SAFImportedDestination
# and a remorte queue for EDN setup on a non-SOA weblogic.
# However, the script can be modified to create any JMS object.

# Make sure to edit/verify the lines at <---xxx---> comments
# to suit the environment
#######################################################

#connect('weblogic', 'welcome1', 'soabpm-vm.site:7001')
connect()

edit()

startEdit()

#Create SAF Agent
cd('/')

cmo.createSAFAgent('SAFAgent-0')

cd('/SAFAgents/SAFAgent-0')

cmo.setServiceType('Sending-only')

#JMS Module
cd('/')

cmo.createJMSSystemResource('SystemModule-0')

cd('/SystemResources/SystemModule-0')

#<-------------specify -------="" cluster="" etc.="" jms="" module="" server="" target-="" the="">
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))

#Remote SAF Context
cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0')

cmo.createSAFRemoteContext('RemoteSAFContext-0')

cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFRemoteContexts/RemoteSAFContext-0/SAFLoginContext/RemoteSAFContext-0')

#<----specify ------="" host="" pwd="" remote="" server="" user="">
cmo.setLoginURL('t3://soabpm-vm.site:7001')
cmo.setUsername('weblogic')
cmo.setPassword('welcome1')

cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0')

#Create EDN connection factories
#<--------specify --------="" connection="" factory="" jndi="" names="">
cmo.createConnectionFactory('EDNConnectionFactory');
cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/ConnectionFactories/EDNConnectionFactory')
cmo.setJNDIName('jms/fabric/EDNConnectionFactory')
cmo.setDefaultTargetingEnabled(true)
cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/ConnectionFactories/EDNConnectionFactory/TransactionParams/EDNConnectionFactory')
cmo.setXAConnectionFactoryEnabled(true)

cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0')
cmo.createConnectionFactory('XAEDNConnectionFactory')
cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/ConnectionFactories/XAEDNConnectionFactory')
cmo.setJNDIName('jms/fabric/xaEDNConnectionFactory1')
cmo.setDefaultTargetingEnabled(true)




cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0')

cmo.createSAFImportedDestinations('SAFImportedDestinations-0')
cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFImportedDestinations/SAFImportedDestinations-0')
cmo.setSAFRemoteContext(getMBean('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFRemoteContexts/RemoteSAFContext-0'))
cmo.setSAFErrorHandling(None)
cmo.setTimeToLiveDefault(0)
cmo.setUseSAFTimeToLiveDefault(false)
cmo.setDefaultTargetingEnabled(true)

#SAF Queue
cmo.createSAFQueue('SAFQueue-1')


cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFImportedDestinations/SAFImportedDestinations-0/SAFQueues/SAFQueue-1')

#<---------specify configured="" currently="" edn="" for="" name.="" queue------------="" queue="" remote="" the="">
cmo.setRemoteJNDIName('jms/fabric/EDNQueue')

cmo.setNonPersistentQos('At-Least-Once')
cmo.setTimeToLiveDefault(0)
cmo.setUseSAFTimeToLiveDefault(false)
cmo.setUnitOfOrderRouting('Hash')

cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFImportedDestinations/SAFImportedDestinations-0/MessageLoggingParams/SAFImportedDestinations-0')
cmo.setMessageLoggingEnabled(false)
cmo.setMessageLoggingEnabled(true)
cmo.setMessageLoggingFormat('%header%,JMSCorrelationID,JMSDeliveryMode,JMSDestination,JMSExpiration,JMSMessageID,JMSPriority,JMSRedelivered,JMSReplyTo,JMSTimestamp,JMSType,%properties%')


cd('/')


activate()
#####################################################

----------------------------------------------------------------------------------------

Wednesday, April 2, 2014

Creating Weblogic Store and Forward (SAF) for EDN

SAF is a very reliable mechanism when you have to move JMS messages between servers. In one of my recent projects, I had to send ADF business events from a weblogic server to my SOA domain on a different box. Because my EDN  subscriptions are on the SOA server, I had to create a pseudo EDNQueue on ADF weblogic server and move it over to the actual EDNQueue on the SOA server.

Moreover, because it is a pseudo queue on sending server, you could even have the JNDI of the queue different than the actual JNDI of the queue on remote server. This means, in my scenario, I could create a pseudo local JNDI for EDNQueue (JNDI: jms/fabric/EDNQueue); but have it forward to a regular JMS queue with a different JNDI (other than jms/fabric/EDNQueue) on the SOA server. This is a consideration if you want to get away from some of the inherent limitations of EDN subscriptions.

Here is how you do it.

Preparing ADF server for EDN:
This step is specific to ADF applications on non-SOA domains that want to use EDN. For steps to create an ordinary SAF, go to next section.

1. Copy the two directories oracle.soa.fabric_11.1.1 and oracle.soa.workflow_11.1.1 to the non-SOA server. We will be deploying these as shared libraries on the non-SOA servers. Make sure these folders are copied to the same location. These servers bring the EDN capabilities to a regular weblogic. These folders can be found under /oracle_soa_home/soa/modules of a SOA domain.

2. From non-SOA server console, go to deployments and deploy these shared libs by browsing and selecting oracle.soa.workflow_11.1.1/oracle.soa.workflow.wc.jar
3. Complete the steps and make sure the jars are showing up on the console.

Receiving SOA server:
Create the queue on the server to which JMS messages need to be forwarded. In my case, queue is TestEDNQ.

Sending ADF server:
This is where we will be creating the SAF mechanism to forward messages to TestEDQ on the receiving server.

1. Create a SAF agent from weblogic console of the server. Services>Messaging>Store-and-Forward Agents. Create new, give a name, and select an appropriate 'Agent Type'. I am leaving this as 'both'. Pick a value based on the purpose of this agent to either send, receive or both SAF messages.

2. Create a jms server and jms module they doen't exist. Services>Messaging>JMS Servers and Services>Messaging>JMS Modules.
3.  Create a sub deployment for the jms module and specify the target to a JMS server.
4. Create a SAF remote context. This is the connection to the remote receiving server. From within jms module, click new> select 'Remote SAF Context'> Specify a name, t3 URL to the remote server, user name and password. In the screenshot below, I am setting up my remote context to weblogic at localhost:7101

5. Create SAF imported destinations. This is a collection of queues and topics that can share the same SAF remote context. From within jms module, new>select 'SAF Imported Destinations', specify a name, select the remote SAF context that got created in previous step. Leave the default targeting and finish.

6. Created SAF remote context and imported destinations should look like this:


7. Create SAF queue. This is where we specify the remote queue and JNDI. In my case, I am trying to forward an EDNQueue to a regular JMS queue on the remote server. Hence, I have different values for local and remote JNDIs. However, if remote queue's JNDI is what you need on local server also, ignore the local JNDI value in this configuration. Click on the created SAF Imported Destinations > go to queues tab> 'New' and enter remote queue name and remote queue JNDI. Click OK.
8. Once created click on the created queue and add additional configuration. There is where I am overdiding remote JNDI with a different JNDI name locally on this server. My local JNDI is that of the EDNQueue and remote JNDI is that of the queue to which I want to forward my events (JMS messages).

9. Send a test JMS message to jms/fabric/EDNQueue and it will get forwarded to JMS/TESTEDNQ on the remote server. Important note here is that there is no local physical queue on the sender. All you do is, with the SAF configuration, you create a reference to a remote queue and SAF will store the message and forward it to the queue based on its availability.
10. Optionally, error handler can also be configured for SAF destinations.

Monday, October 21, 2013

Populating database values in human task payload

I had a recent requirement to populate database table values to BPM payload based on certain selections user makes in a human task UI. To add to the complication, there could be multiple rows that are associated with the user selection on UI and hence my BPM object had to be an array. Creating array objects and automatically populating them turned out quite tricky.

One way to solve this is by generating the payload as DOM and updating the BPM with java API.

A lesser complicated approach is to make use of ADF bindings. This article explains the steps.

1. Create the BPM project
2. Create the ADF Model for database
3. Generate the ADF UI for human task. This can be done using the auto-generate wizard.
4. Find the bindings for 'CreateInsert' button for the array object and the array UI table.
5. Comment out the source code for the button and table mentioned above.
6. From BPM data control, drag and drop the children of array object on to the jspx page.

7. This will create bindings the attributes of array object. We now have bindings for 'CreateInsert' button, the array itself and the array object attributes.
8. Comment out the array object attributes UI elements. We are only interested in the bindings. Not the source. You could always create bindings from the page definition file.
9. Construct the UI for database objects with action components. In my case, it was a select one choice drop down with a selectionListener.
10. From within the action listener in my backing bean (this could be a submit button as well), use an EL helper class to invoke 'CreateInsert' and then set array attributes with the database selected values. In between you could do any kind of operation, like calling another AM method to retrieve additional details.

11. In the back end we are creating the array object and populating it every time user makes a selection. In some scenarios you might want to delay this until user 'submit's the form. But either ways, the process of calling 'CreateInsert' setters will work.

For more complicated scenarios, working with human task API is the only option.


Sunday, September 29, 2013

Get that good looking ADF RichTable


Here are some suggestions to build a good looking ADF table.

1. Use a panelBox for the table. It makes the table stand out from the background.
2. Put a panelCollection inside the panelBox. This will provide some very neat out of the box features- like column selection, detach, column ordering, etc. Detach is very useful when displaying large number of columns under space constraint. It will let the table open up in a popup occupying the entire page width. PanelCollection will also open up a good toolbar area where actions can be added.
3. Use that toolbar facet inside panelCollection and add action components there.
4. Set 'AFStretchWidth' styleClass to panelCollection.
5. Add the table to the panelCollection and pick required columns.
6. Set a column or 'last'  for columnStretching property of the table
7. Set contentDelivery as immediate and autoHeightRows to an appropr1ate value. This setting will display the vertical scrollbar when required based on autoHeightRows value.
8. Set a width for all columns except for the column picked for columnStretching. eg: width="200px"
9. Set column width using the inlineStyle property of column. eg: inlineStyle="height:25px"

This should provide the basic framework for a nicely formatted ADF table. Work with other visual attributes like horizontalGridVisible, inlineStyle, etc. to make the table even better.

Code for the basic layout options mentioned above:


<af:panelbox id="pb1" text="My Company Contacts">
          <f:facet name="toolbar">
          <af:panelcollection id="pc1" styleclass="AFStretchWidth">
            <f:facet name="menus">
            <f:facet name="toolbar">
              <af:toolbar id="t4">
                <af:activecommandtoolbarbutton icon="/resources/edit.png" id="actb4" text="Edit Person">
                <af:activecommandtoolbarbutton icon="/resources/delete.png" id="actb5" text="Remove Person">
                <af:activecommandtoolbarbutton icon="/resources/add.png" id="actb6" text="Add Person">
              </af:activecommandtoolbarbutton></af:activecommandtoolbarbutton></af:activecommandtoolbarbutton></af:toolbar>
            </f:facet>
            <f:facet name="statusbar">
            <af:table autoheightrows="20" columnstretching="last" contentdelivery="immediate" emptytext="#{bindings.XXX.viewable ? 'No data to display.' : 'Access Denied.'}" fetchsize="#{bindings.XXX.rangeSize}" horizontalgridvisible="true" id="t3" partialtriggers=":::soc1" rowbandinginterval="1" rows="#{bindings.XXX.rangeSize}" rowselection="single" selectedrowkeys="#{bindings.XXX.collectionModel.selectedRow}" selectionlistener="#{bindings.XXX.collectionModel.makeCurrent}" value="#{bindings.XXX.collectionModel}" var="row" verticalgridvisible="false">
              <af:column headertext="#{bindings.XXX.hints.FirstName.label}" id="c5" inlinestyle="height:25px" sortable="true" sortproperty="FirstName" width="200px">
                <af:outputtext id="ot4" value="#{row.FirstName}">
              </af:outputtext></af:column>
</af:table></f:facet></f:facet></af:panelcollection></f:facet></af:panelbox>

End product:




Thursday, September 12, 2013

AIA Configuration Reload Error MDS-00557

Ran into MDS-00557 today while trying to update an AIA configuration to MDS. In my case the error was happening when running an ant with UpdateMetadata.xml for AIA.

The error
[deployComposite] ---->response code=500, error:Error during deployment: Data transfer error in MDS.:
[deployComposite] MDS-00001: exception in Metadata Services layer
[deployComposite] MDS-00522: failure to save document /apps/META-INF/MANIFEST.MF to the metadata repository
[deployComposite] MDS-00557: Resource /apps/META-INF/MANIFEST.MF is already locked or is being modified.
[deployComposite]
[deployComposite] MDS-00001: exception in Metadata Services layer
[deployComposite] MDS-00522: failure to save document /apps/AIAMetaData/config/AIAConfigurationProperties.xml to the metadata repository
[deployComposite] MDS-00557: Resource /apps/AIAMetaData/config/AIAConfigurationProperties.xml is already locked or is being modified.

Solution
This error happens when there is a lock file in the Reload process. Look for any .lck files inside Reload process and delete them.

 rm ./Infrastructure/CAVS/ReloadProcess/classes/.data/00000000/je.lck ./Infrastructure/CAVS/ReloadProcess/SCA-INF/classes/.data/00000000/je.lck

If the above solution doesn't help, check the database and make sure there are no orphaned sessions locking the MDS tables.

select * from v$session s, v$process p where s.paddr = p.addr and s.sid in (select SESSION_ID from v$locked_object);

alter system kill session 'sid,serial' immediate;

Friday, May 4, 2012

Implementing WebCenter live search adapter


Here are the steps involved in  making WebCenter live search adapter work in a WebCenter portal application. My requirement was to make WebCenter portal pages searchable without using Oracle SES.

In order to make WebCenter pages searchable, we need tagging service enabled on WebCenter portal. 

All steps mentioned below, should be performed at development time from JDeveloper.

Step 1:

Run wl_schema.sql script to create tables needed for tagging service.
As mentioned on Oracle website,  
To install the WebCenter schema:
1.     From the Tools menu, select SQL Worksheet.
2.     In the Select Connection dialog, click the pencil icon to edit the connection.
3.     Modify the connection to use an administrator username and password, such as SYS (using the SYSDBA role) then click OK.
4.     Click OK to close the Select Connection dialog.
5.     From the Tools menu, choose SQL Worksheet.
6.     Enter the following SQL statement in the SQL Worksheet panel:
7.   
8.  @@JDEV_HOME/jdeveloper/jdev/extensions/oracle.webcenter.install/sql/oracle/wc_schema.sql
where JDEV_HOME is the location where JDeveloper is installed on your machine.
9.     Click the Execute Statement icon, or press F9, to run the script.
10.  At the prompt, enter webcenter as the name for the schema and a password for the schema, such as welcome1. The name of the schema must bewebcenter.
11.  If prompted for the Default Tablespace and Temporary Tablespaces, re-enter the default values users and temp, then accept them.


Step 2:
 Add ADF 'tag button' from component palette to all pages that need to be searchable.

Step 3:
Add ADF 'tag dialog task flow' from component palette to pages with tag buttons and to under the same region.

Step 4:
Add 'search' or 'search toolbar' ADF taskflow to a search page.

Step 5:
Comment out the section

<!--crawl-properties fullCrawlInterval="P5D" enableWcServicesCrawl="true"
                      enableWcDiscussionsCrawl="true" enableWcUcmCrawl="true"/-->

in adf-config.xml


This is how my search.jspx page looked after adding search taskflow, tag button component and  tag dialog taskflow. 


          <f:facet name="content">
            <pe:pageCustomizable id="hm_pgc1">
              <cust:panelCustomizable id="hm_pnc1" layout="scroll">
                <af:region value="#{bindings.searchview1.regionModel}" id="r1"/>
                <tag:taggingButton resourceId="#{facesContext.viewRoot.viewId}"
                                   resourceName="#{facesContext.viewRoot.viewId}"
                                   serviceId="oracle.webcenter.page" id="tb1"/>
                <af:region value="#{bindings.tagginglaunchdialog1.regionModel}"
                           id="r3"/>
              </cust:panelCustomizable>
              <f:facet name="editor">
                <pe:pageEditorPanel id="pep1"/>
              </f:facet>
            </pe:pageCustomizable>
          </f:facet>




Step 6:
Run the app, go to page and add tags delimited by space.


Step 7:
Search should bring back pages urls when searched for tags.


Tuesday, April 10, 2012

XSLT template to sum derived values in a nodeset

Here is a XSLT 1.0 template to find the sum of a set of multiplication results from a node set. In my case, price and quantity are the available nodes in XML. 'orderTotal' (name of the template below) needs to multiply price by quantity for all nodes in a nodeset and total the derived values to find the grand total.

i.e.: orderTotal= sum(//*/price X //*/quantity)


Template

  <xsl:template name="orderTotal">
   <xsl:param name="nodes"/>
   <xsl:param name="total" select="0"/>
 
   <xsl:if test="$nodes[1]">
     <xsl:call-template name="orderTotal">
       <xsl:with-param name="nodes" select="$nodes[position() &gt; 1]"/>
       <xsl:with-param name="total" select="$total + $nodes[1]/k:price * $nodes[1]/k:quantity"/>
     </xsl:call-template>
   </xsl:if>

   <xsl:if test="not($nodes[1])">
     <xsl:value-of select="$total"/>
   </xsl:if>

 </xsl:template>

Tuesday, December 13, 2011

ADF - Display timeline indicator on DVT graph

Here is how you do it. Use dvt:timeSelector and set explicitStart and explicitEnd to the same value on Y axis.
This is a good technique to display current position on a timeline chart.

In the example below, i am making use of a getNow method in my backing bean to get start and end values as the same date.

Code:


<dvt:lineGraph id="lineGraph1" value="#{bindings.MyDS.graphModel}" subType="LINE_VERT_ABS" emptyText="No data"
seriesRolloverBehavior="RB_HIGHLIGHT">
<dvt:background>
<dvt:specialEffects/>
</dvt:background>
<dvt:graphPlotArea/>
<dvt:seriesSet>
<dvt:series/>
</dvt:seriesSet>
<dvt:o1Axis/>
<dvt:y1Axis/>
<dvt:timeSelector explicitStart="#{myBean.now}" explicitEnd="#{myBean.now}" mode="EXPLICIT"/>
<dvt:legendArea automaticPlacement="AP_NEVER"/>
</dvt:lineGraph>


Result:



Wednesday, October 28, 2009

Open source ESBs

ESB Introduction

In computing, an enterprise service bus (ESB) refers to a software architecture construct. This construct is typically implemented by technologies found in a category of middleware infrastructure products, usually based on recognized standards, which provide foundational services for more complex architectures via an event-driven and standards-based messaging engine (the bus).

Enterprise Service Bus is an evolving architecture technique to integrate incompatible business applications over a common messaging bus. The ESB lies between the business applications and enables communication among them. Ideally, the ESB should be able to replace all direct contact with the applications on the bus, so that all communication takes place via the bus. In order to achieve this objective, the bus must encapsulate the functionality offered by its component applications in a meaningful way. This is typically accomplished through the use of an enterprise message model. The message model defines a standard set of messages that the ESB will both transmit and receive. When it receives a message, it routes it to the appropriate application. Often, owing to the fact that the application was not built with the message model in mind, the ESB will have to transform the message into a legacy format that is understandable by the application.


Role of ESB in SOA world

ESB is one architecture style that abides by the rules of a Service Orientated Architecture.


Figure 1 explains the basic architecture of any ESB binding. All ESBs support a set of protocols for endpoint binding. Messages received at an end point undergo transformation using message transformer provided. Message transformation is done to convert the request to a data structure known by the service to be invoked. It can then be passed to the component service like Java POJO itself, EJB, JDBC, etc. Integration with other container frameworks like Spring or PicoContainer also happened at this logical stage. The response from service invocation is then routed an appropriate outbound endpoint. Response message is transformed appropriately to match a format known by the receiver before it is sent to the receiver endpoint.

Main advantages that the ESB architecture inherits to the SOA world are given below.

•Faster and cheaper accommodation of existing systems. Increased flexibility makes it easier to change as requirements change.
•Predefined ready-for-use service types.
•No central rules engine, no central broker.
•Incremental changes can be applied with zero down-time.


There also are a few overheads that need to be considered before one goes the ESB way.

•Requires ongoing management of message versions to ensure the intended benefit of loose coupling. Incorrect, insufficient, or incomplete management of message versions can result in tight coupling instead of the intended loose coupling.
•Extra overhead and increased latency caused by messages traversing the extra ESB layer, especially as compared to point to point communications.
•All benefits and cost advantages of ESB come into play only when you have a SOA based system in consideration.

Component integration standards

There is no de-facto standard for SOA service/ component integration as of today. ESB is only a mechanism to make this integration easier by making communication between components independent of the service.

There are two emerging standards in component integration which look very good in what they promise and there are ESB tools that support either of these standards.

There also are tools that just do what ESBs are supposed to do without going by a particular standard. E.g.: Mule

Reason for mentioning these standards in this document is that one of the criterions in selecting an ESB could be selecting, if need be, the standard itself that one want to pick for component integration.


a.JBI

Java Business Integration (JSR208) is an emerging standard that defines common interfaces for components and message exchanges for application integration. It is a JAVA community process initiative.

JBI is built on a Web Services model, and provides a pluggable architecture for a container that hosts service producer and consumer components. Services connect to the container via binding components (BC) or can be hosted inside the container as part of a service engine (SE). The services model used is Web Services Description Language 2.0.

The central message delivery mechanism, the normalized message router (NMR), delivers normalized messages via Message Exchange Patterns (MEPs).

b.SCA

Service component architecture, as a standard for assembling services together, stands one step ahead of JBI in the fact that it supports multiple technologies and languages whereas JBI is limited to Java components. This means, SCA services can be implemented in languages and technologies more than just Java [For e.g.: An implementation of SCA supports invocation of services implemented in EJBs, Java POJOs, BPEL process, COBOL, C++, PHP, Ruby etc.]. SCA standard is promoted by vendors like IBM, Oracle, TIBCO, BEA and supported by OASIS committee.

Service Component Architecture defines a simple, service-based model for construction, assembly and deployment of network of services (existing and new ones) that is language-neutral. Main artifacts in an SCA style design are

Service Data Object (SDO) provides a uniform interface for handling different forms of data, including XML documents that can exist in a network of services and provides the mechanism for tracking changes.

Data Access Service (DAS) provides a simple SDO interface to relational databases.

Even though SCA looks more promising and futuristic in terms of acting as a framework for SOA, it is too early to write a verdict on the success of this technology as it is in its incubator stages.


The messaging infrastructure would help ease application integration

a.Via loose coupling of components, including legacy assets, communicating over disparate transport protocols
b.With minimal re-programming effort for message transformations

The supporting tools should enable

a.Quick development and configuration of messaging channels though established frameworks and patterns
b.Administration of the messaging infrastructure elements by operational staff

Please note that #1 above implies assurance of inter-operability of components residing on diverse technology stack like .net, j2ee, AS400, mainframes over a messing infrastructure only.

Transaction and security support is also desired from the ESB framework.

ESB Options

Some of the best and popular open source ESBs are

��. Mule
��. Mirth
��. Apache ServiceMix
��. OpenESB
��. FuseESB
��. Apache Tuscany
��. Fabric3



Recommendations

Mule stands as an excellent choice if alignment with a particular component integration standard is not desired. The fact that it supports POJO message objects is very much suited for normal development models.

In the availability or plan to have the availability of standard messaging models with WSDL, a JBI container based routing is the best option to go for. An alternate option to this is to additionally develop marshallers at endpoints so that JBI containers still get to work with normalized XML messaging model.

The decision for JBI over SCA can be well supported by the fact that there already are a number of JBI components that stand good and ready to use for most of the domains. Having said this, the future of SCA in the commercial arena doesn’t look dim at all provided the fact that it is supported by many of the industry giants like BEA, IBM, Oracle, and TIBCO and supported by OASIS.

SCA, as already mentioned in the previous sections is too early for serious adoption unless decided to go for a commercial framework like the one from TIBCO.

This evaluation was only limited to open source candidates in the industry. Provided commercial tools are an option, frameworks like Fiorano or Sonic MQ could prove a better solution to our requirement in terms of performance and support.

Glossary

��. ESB – Enterprise Service Bus
��. JBI - Java Business Integration. A standard for component integration for application development.
��. SOA – Service Oriented Architecture
��. SCA – Service Component Architecture. A standard for component integration for application development.
��. JSR208 – This is the Java Community Process specification for JBI standard.
��. BPEL – Business Process Execution Language. A language for Business Process Modeling.
��. IONA – A software firm focused on distributed middleware solutions for IT.
��. JMX – Java Management Extension.


References

1. Enterprise Service Bus
http://en.wikipedia.org/wiki/Enterprise_service_bus

2. Java Business Integration
http://en.wikipedia.org/wiki/Java_Business_Integration
http://www.jcp.org/en/jsr/detail?id=208
http://wiki.open-esb.java.net/Wiki.jsp?page=Jbicomps

3. Service Component Architecture
http://www.osoa.org/pages/viewpage.action?pageId=46
http://dev2dev.bea.com/pub/a/2005/11/sca.html
http://www.davidchappell.com/articles/Introducing_SCA.pdf

4. Mule
http://mule.mulesource.org/display/MULE/Home
http://mule.mulesource.org/display/MULE/Transports+Guide

5. ServiceMix
http://servicemix.apache.org/home.html
http://servicemix.apache.org/components-list.html

6. OpenESB
https://open-esb.dev.java.net/

7. Fabric3
http://fabric3.codehaus.org/

8. Tuscany
http://incubator.apache.org/tuscany/home.html

9. Open source licenses
http://opensource.org/licenses/alphabetical

Wednesday, June 17, 2009

Opera Unite is making clouds around the web

This is the Web 3.'Oh' kind of stuff for me. Opera has launched their 'Unite' platform and changed the way web has worked for you all this time. Unite combines the good concepts of cloud and P2P computing.

With Unite, one can run a web site from a home computer. That means a lot if you really think about the possibilities. Unit already comes up with file sharing services that can utilized to share your files (including pics and songs) with the whole world.

Remember the days when you had to zip a bunch of pictures and videos from your last vacation and send it to your friend!? Or, the times when you had to pick snaps because of the size limitations of a website!!? All that is history with Unite. Send them your website address and let them see it on your website that is running right off your PC.

Start here and you'll have your website up in no time.



I've got mine running

Eventually, I want to have a JBoss running behind that page and run stock-suggests on it. See what i mean now!? I see possibilities...lots of them.

Thank you Opera for Unite.

Not so trivial: I wonder what the security threats are...!

Sunday, May 10, 2009

stocks-suggest is now on Java 6

My general depression on the stock market had put down all my excitement on stocks-suggest. This is the application i had been writing for a while that can suggest changes (BUY or SELL) on a given portfolio based on a set of rules;besides the fact that it is one of the most interesting architecture i have ever done. Here is the report from some of my past runs.


********************************************************
Report at: Tue Jan 29 11:38:02 IST 2008
********************************************************
[Report: stockName: RENUKA.NS result: BUY buyPrice: 1003.7 change: -9.700000000000045]
[Report: stockName: JPASSOCIA.NS result: BUY buyPrice: 374.5 change: -1.1999999999999886]
********************************************************
Report at: Tue Jan 29 11:44:36 IST 2008
********************************************************
[Report: stockName: RENUKA.NS result: BUY buyPrice: 1003.7 change: -11.700000000000045]
[Report: stockName: JPASSOCIA.NS result: BUY buyPrice: 374.5 change: -4.699999999999989]
********************************************************
Report at: Sun May 10 22:35:24 EDT 2009
********************************************************
No stock decisions for the moment
********************************************************




Tonight, i got it compiled successfully on Java 6. Boy, it took a lot of commitment from me to finally start on this again. Latest source is at stocks-suggest google code repo.

Drools and JibX dependencies had to be updated to the latest to get rid of the Xerces Abstract method error after migrating from Java 1.5. Here is the output of mvn eclipse:eclipse for all dependencies.

o commons-logging:commons-logging:1.1
o log4j:log4j:1.2.12
o logkit:logkit:1.0.1
o avalon-framework:avalon-framework:4.1.3
o javax.servlet:servlet-api:2.3
o junit:junit:4.4
o org.drools:drools-compiler:5.0.0.M5
o org.drools:drools-core:5.0.0.M5
o org.mvel:mvel2:2.0.6
o org.drools:drools-api:5.0.0.M5
o joda-time:joda-time:1.5.2
o org.antlr:antlr-runtime:3.1.1
o org.eclipse.jdt:core:3.4.2.v_883_R34x
o janino:janino:2.5.15
o org.jibx:jibx-extras:1.2.1
o org.jibx:jibx-run:1.2.1
o org.codehaus.woodstox:wstx-asl:3.2.1
o stax:stax-api:1.0.1
o quartz:quartz:1.5.2


I am gonna work on this for a while now. Changes i intend to do in future releases.

1. Refactor test cases
2. Change rules appropriately.
3. Load it on a Spring DM server
4. Create a UI on Webflows (Not decided on the framework. Might as well do it on something simpler like Struts also)
5. De couple reader, binder, renderer, rule engine and report generation modules and have them talk to each other on Mule bus.

Sunday, March 1, 2009

Setting cutom screen resolution on Sabayon

My Dell XPS 1330 has 1280x800 as standard screen resolution; but the Sabayon installation didn't pick it up because 1280x800 is not one of the standard screen resolutions. At least that is what i understood from my readings. 1280x800 is one of those wide screen resolutions which is pretty normal is every other laptop these days. Then why didn't Sabayon pick it up on my installation on Virtual Box!! That is not a good thing.

However, you can tell Sabayon to pick up 1280x800 with a small configuration.

'su' to root


pjames@localhost ~ $ su
Password:
localhost pjames #


open xorg.conf in your favorite editor. I am using 'nano'


localhost pjames # nano /etc/X11/xorg.conf



Under screen section, look for default depth.


# **********************************************************************
# Screen sections.
# **********************************************************************

Section "Screen"

# The Identifier, Device and Monitor lines must be present

Identifier "Screen 1"
Device "VESA"
Monitor "Generic Monitor"
#Option "AddARGBGLXVisuals" "true"

# The favoured Depth and/or Bpp may be specified here

DefaultDepth 24

SubSection "Display"




Now look for display configuration for depth 24.

The Modes line will be commented by default. Uncomment this line, and add your custom screen conguration to it. Here is how it looks on my machine for 1280x800.


SubSection "Display"
Depth 24
ViewPort 0 0
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubsection


Now, save the file and reboot system for new resolution to become effective.

Thursday, February 26, 2009

Sabayon 4 Oh!

Last night, i upgraded my Sabayon 3.5 pod installation to the new Sabayon 4.0. Its a simple 2 step process

1. Change equo repository configuration to point to the new 4 branch

For this, edit /etc/entropy/repositories.conf file and look for the branch entry.
Change current branch to 4 (In my case, i changed 3.5 to 4)


#
# syntax for branch:
#
# branch: in Sabayon Linux each release has its branch that is the version name (eg. 3.4, 3.5)
# branch|actual branch string (no spaces!)
#
# example:
# branch|3.5
# or:
# branch|3.6
#
# Branch default setting
branch|4



2. Run equo world

Wait for equo to compare and upgrade your Sabayon to latest 4 packages and say 'Oh!!'.

I quite liked the way they use 'Oh' in 4.Oh! (4.0)

I have always liked Sabayon anyways.

Thursday, February 19, 2009

Schmap Chicago Guide published my photo

Schmap Chicago Guide published the picture of "The Grand Ballroom by Navy Pier"; the way my camera saw it.






You've been sent a Flickr Mail from Emma J. Williams:

------------------------------------------------------------

:: Schmap Chicago Sixth Edition: Photo Inclusion


Hi Prasanth,

I am delighted to let you know that your submitted photo
has been selected for inclusion in the newly released sixth
edition of our Schmap Chicago Guide:

Grand Ballroom At Navy Pier
http://www.schmap.com/chicago/entertainment_concerts/p=321649/i=321649_5.jpg

If you use an iPhone or iPod touch, then this same link
will take you directly to your photo in the iPhone version
of our guide. On a desktop computer, you can still see
exactly how your photo is displayed and credited in the
iPhone version of our guide at:

Grand Ballroom At Navy Pier
http://www.schmap.com/?m=iphone#uid=chicago&sid=entertainment_concerts&p=321649&i=321649_5

Finally, if you have a blog, you might also like to check
out the customizable widgetized version of our Schmap
Chicago Guide, complete with your published photo:

http://www.schmap.com/guidewidgets/p=97292732N00/c=SJ20152142

Thanks so much for letting us include your photo - please
enjoy the guide!

Best regards,

Emma Williams,
Managing Editor, Schmap Guides
www.schmap.me/emma.williams

------------------------------------------------------------

To reply to this message, click here:
http://www.flickr.com/messages_read.gne?id=72157613414979059

To update your email settings, click here:
http://www.flickr.com/account/prefs/notifications/

The Flickr Team

www.flickr.com


Tuesday, January 20, 2009

Schmap Chicago Guide shortlisted my photo

Okay, I am very excited about this one. Schmap magazine has shortlisted one of my photos on chicago for its 6th edition. Though this is not the best photograph i have ever taken, and i am not gaining anything financially, a pat on the back always feels good; especially when its a magazine.

They picked this picture from my Flickr stream

Here is the picture they picked and mail from their editor.






From: Emma Williams
Date: Tue, Jan 20, 2009 at 9:27 AM
Subject: [Flickr] Schmap: Chicago Photo Short-list
To: prasanth.james@gmail.com


You've been sent a Flickr Mail from Emma J. Williams:

------------------------------------------------------------

:: Schmap: Chicago Photo Short-list


Hi Prasanth,

I am writing to let you know that one of your photos has
been short-listed for inclusion in the sixth edition of our
Schmap Chicago Guide, to be published mid-February 2009.

http://www.schmap.com/shortlist/p=97292732N00/c=SJ20152865

Clicking this link will take you to a page where you can:
i) See which of your photos has been short-listed.
ii) Submit or withdraw your photo from our final selection
phase.
iii) Learn how we credit photos in our Schmap Guides.
iv) Browse online or download the fifth edition of our
Schmap Chicago Guide.

While we offer no payment for publication, many
photographers are pleased to submit their photos, as Schmap
Guides give their work recognition and wide exposure, and
are free of charge to readers. Photos are published at a
maximum width of 150 pixels, are clearly attributed, and
link to high-resolution originals at Flickr.

Our submission deadline is Tuesday, January 27. If you
happen to be reading this message after this date, please
still click on the link above (our Schmap Guides are
updated frequently - photos submitted after this deadline
will be considered for later releases).

Best regards,

Emma Williams,
Managing Editor, Schmap Guides
www.schmap.me/emma.williams

Sunday, January 18, 2009

Best $100 speakers

I need a good pair of speakers for my limited $100 budget. My expectation from them would be,

1. Medium to good quality high range frequency production
2. Good quality mid range frequency (vocal quality if very important to me - for music and movies)
3. Low to medium quality low range frequency (Obviously i can't expect more than that from a $100 speaker)
4. Good stereo imaging
5. Compact size
6. Aux input for my old iRiver H120
7. Should be able to connect to my TV if need be.
8. Headphone jack


After hours of research, i have closed on Logitech Z2300, M-Audio Studiophile 30 and Bose companion 2. Though i don't think Z2300 will make the cut with its competitors, i am going to decide that only after listening to one of them at a store. If one prefers bass over vocal performance, Z2300 is the choice. I am not much after rap, R&B or house as my Last.fm library would tell you and so, the 2.1 Z2300 need not be the one for me.

Z2300 is $85 and the others sell at $99/pair on Amazon and BestBuy and hence technically in my budget. All of them seem to have the audio reproduction characteristics that i am looking at and i am already a little biased towards M-Audio from what i have discovered about them so far.



M-Audio Studiophile 30


Best in the category for its low to mid range reproduction. Most people who bought this felt that this pair produces the complete spectrum accurately.




Logitech Z2300


8" woofer for the beats




Bose Companion2


Famous for its stereo imagining capability


In part 2 of this blog, i'll update my in store experience with these speakers and my decision.

Sunday, January 11, 2009

Cisco VPN client setup on Sabayon linux 3.5

I have a Cisco VPN at work and CIsco provided VPN client won't install on my 64 bit windows Vista. Hence, i set it up on my Sabayon 3.5 mini linux box using 'vpnc' and 'rdesktop'. This is how you do it.

Install vpnc. 'vpnc' is the application that sets up a network connection with the VPN server by adding a rounter configuration.

Find the latest version of vpnc available to you by running


equo search vpnc



Install it



equo install net-misc/vpnc-0.5.2_pre20080509-r1



Next step is to create a vpnc configuration. If you have a 'pcf' file, you can do this by running the 'pcf2vpnc' utility. PCF is the CISCO client configuration file. Ask your network admin to procide you one. I am writing the configuration to vpnc's default configuration file so that i don't have to specify a configuration file when starting vpnc.


pcf2vpnc <pcf file> /etc/vpnc/default.config


Double check the configuration is intact. Also, if you are manually setting up configuration and not creating it from a pcf file, this is where you do it.


nano /etc/vpnc/default.config


## generated by pcf2vpnc
IPSec ID <connection_name>
IPSec gateway <vpn_ip>
IPSec secret <vpn_pwd>

Xauth username <domain name\username of the network you are connecting to> # domain\userId
Xauth password <domain password> #pwd
IKE Authmode <authmode> # Leave this to default


Start vpnc.


localhost pjames # vpnc
VPNC started in background (pid: 8138)...


If you get this message, we are good. vpnc deamon has started successfully.

Verify the connectivity. Check 'netstat -r' and make sure you see the new network connection to VPN server. Then, ping a machine in your VPN network.

So far, we have established a connection to the VPN. However, for a connection to the terminal desktop, you need a GUI tool - 'rdesktop'.

Install rdesktop.



equo install rdesktop



Now run rdesktop from console.


rdesktop -d <domain> -u <user> -p <pwd> <machine name>


You should get the target machine's desktop now. Disconnect from the machine and run rdesktop with '-f' flag for full screen.



rdesktop -f -d <domain> -u <user> -p <pwd> <machine name>


Now, let us add 'vpnc' as a start up service so that you don't have to do it manually every time.

rc-update add vpnc default


Last thing you may want to do is to create launcher for 'rdesktop' and place it as a short cut.

Thats it. I am one click away from my office machine now.



Update: The default conf file name for vpnc should be vpnc.conf (not default.conf) for the deamon to load it while start up.

Sunday, January 4, 2009

Selenium Vs Watir

Selenium and Watir the best front end based web application testing frameworks at present. Even though there are other frameworks out there, like webtest, they cannot scale up to the web 2.0 style client heavy web applications. They are not good with XHRs are Javascripts. Both selenium and watir supports test suites in Java or Ruby and you can replay them subsequently.

Selenium has a firefox based recorder tool also, that can capture browser actions and create test cases in multiple languages like Java and Ruby.

Best way to start on Selenium is by watching the tutorial they have on their website. Setup and running it is as easy as they tell us in this tutorial.

The IDE can show you Java/Ruby code for the recorded test case. Copy that and run as java test case with selenium apis in classpath.

This is for simple scenario testing. For a larger, concurrent load testing, use Selenuim RC framework. This is capable of running tests in parallel threads.

Even though Selenium is cool, my personal favorite is Watir. There is only one factor that makes Watir the winner, according to me that is, and that factor makes all the difference. It is the philosophy with which these tools have been made. Watir is a tool that is made by testers and for testers, by focusing on what really should be the focus point for the person who uses it.

A simple scenario discussion will prove this. In Selenium, after a request submit is done by the script, it doesn't know how to detect the arrival of response. So, technically it waits for a specified amount of time and then assumes the page has been loaded with response content. In test suites, it comes as a line like this one-selenium.waitForPageToLoad("30000");Defining this wait period becomes the script writer's (tester) responsibility. Should they be?

If you have a process to run test cases on multiple environment's, it can worsen the scenario so quickly.

Also, your load testing results are not accurate when you have ambiguous wait periods defined all over request submissions.

In my experience, i have seen the recorded tests not functioning properly because the way page elements are automatically detected may not be the way you want it to be. You will understand this if you write a test case to login to your gmail account and read a mail or study the recorded test case source in detail.

Watir, on the other hand works embedded within the browser in a way. This means, it can detect when the server response comes back. Tester can focus on what the response value should be rather figuring out what the approximate wait period on each page should be. Watir is also tested to be better for Ajax based testing.

Watir has the full API set support from Ruby, which makes it much more powerful than Selenium. For load generation and parallel threads, one needs to write Ruby scripts for test cases. All that is covered in their test case.

On the cons side, Watir doesn't have a matured recorder tool. Watir is a Ruby framework and knowledge of Ruby is mandatory. But hey, if you are of the learner type Ruby is a cool place to hang around. So, if you are in the mood, jump on to Watir::IE.new.goto "Watir website"


Trivia: Ruby is really good when it comes to utility frameworks like Watir, BuildR, some report generation with the good regex support or quick prototyping. You can always build small applications with Ruby and Rails. But will it ever be on par with an enterprise platform like Java? Not at the moment, i guess. Had that been the case, we would never have had to come up with J2EE; programmers would have been happily coding in C and Perl. Ruby guys need to talk more about scalability, transaction managements and other enterprise application attributes if they want Ruby to be anything more than what it is currently.