Friday, 4 May 2012

Creating JMS Resources



You create this using the WebLogic Server console. First you create the JMS queue and connection factory and then a connection pool for that connection factory.
Make sure your server is started
Open http://localhost:7001/console







First creat Persistant Store,

Go to Services, click on Persistant store and click New and select File Store as shown below




Enter values:-

Name: DemoJmsQStore
Directory:DemoJmsQStore



Click OK.

Next Create JMS Server,

Click on Messaging under Services tab, Select JMS Server and Click on New button



Enter Values:-
Name:  DemoJMSServer
Persistant Store: DemoJmsQStore (Select Persistant store which you have created)



Click Next, Select Target server as Admin Server



Next Create JMS Module,

Click on Messaging under Services tab, Select JMS Module and Click on New button




Enter Name: DemoJMSModule , Click Next





Select Admin Server and SOA server, Click next and Finish

Now Click on DemoJMSModule (which we have created)

Click On Subdeployments as shown below, click on New







Enter Subdeployment Name :   DemoQJMSServerDeployment, click Next

Select Server : DemoJMSServer (Which we have created), click Finish





Click On Configuration Tab,
Click New
Select Connection Factory, Click Next





Enter Values:-
Name - DemoQueueCF
JNDI-   jms/demoqueuecf
Click Next, Select Advanced Targetting Tab, Select Sub Deployments(which we created),
Select Server, Click Finish





Click on Connection factory, DemoQueueCF, Click on Transactions Tab




Enable XA Connection Factory Enabled, And Save




Next Create  Queue's,

Click on Messaging under Services tab, Select JMS Module and Click DemoJMSModule(which we have Created)

Click New,

Slect queue







Click Next,
Enter Values:

Name: Demo_A
JNDI:  jms/demo_a
Click Next






Select Sub Deployments and Server




Go to Deployments, Select JMS Adapter, Click on Configuration Tab, Click on Outbond Connection Pools,

Click on New

Select oracle.tip.adapter.jms.IJmsConnectionFactory as show below, Click Next




Enter JNDI Name:-  eis/jms/demoqueuecf
click Finish

Click on Connection Factory Created,
Deployments-->JMS adapter-->configuration-->outbond connection pools--> expand oracle.tip.adapter.jms.IJmsConnectionFactory
Select    eis/jms/demoqueuecf, click on it


Set Property Value -- jms/demoqueuecf, immediately press enter key and save it.

Redeploy JMS adapter , select JMS adapter, click on Update, Select Redeploy and Click on Finish

Activate All Changes

Your JMS Resource has been created..


Thank you











































Creating DataBase Resource



You create this using the WebLogic Server console. First create the data source and then a connection pool for that data source.

Start WebLogic Server.--http://localhost:7001/console, Enter Username and Password



On the left navigation bar, Click Services > JDBC > Data Sources.
In the data source table, click New




Enter the data source information
Name:demoDataSource
JNDI Name: jdbc/demodatasource
Database Type: Oracle
The Database driver defaults to the correct driver: Oracle’s Driver (Thin XA) for Instance connections




Click Next, click Next again


As Per your configurations:
For example as below:
Database Name: XE (your database SID)
Host name: localhost (host where your database is running)
Port: 1521 (set according to your configuration)
Database user name: soademo
Database user password: soademo


Click Next
Click Test Configuration. Confirm success message at top of page.
Click Next
Select the Target server where your SOA component is running:soa_server1.
Click Finish


First before Configuring DB adapter, click on Deployements and select DB adapter and stop it.
Now click DB Adapter
select configuration
click on outbound connection pools as below



Click on New, select Connection Factory



JNDI Name -> eis/jdbc/demodatasource
Click Finish





Click on JNDI name:- eis/jdbc/demodatasource




Configure has XADataSourceName--> jdbc/demodatasource ( Previously we have created datasource JNDI name), After entering immediately click Enter button, then SAVE



Redeploy DBAdapter
  Select DB Adapter, Click UPDATE
     


Select, Redeploy this application using the following deployment files:




Click Finish.

Activate All changes

Start DB Adapter


To access Database from Jdeveloper, JNDI name to use is eis/jdbc/demodatasource















































































Thursday, 3 May 2012

Sample Program To Start up with BPEL


Add Two Numbers


Step 1 :


Open Jdeveloper , Click on Application Tab, and select new
Enter Application name and select SOA Application,



Click Next, Enter Project Name, select SOA and click next



Select Empty Composite and click on Finish


Step 2:   Drag and drop BPEL Component to Component Section, as below image



BPEL dialog box will Open, Enter all the fields as below, tick on Expose as SOA Service,
select Synchronous Process



XSD,WSDL,Bpel Files will be created automatically.


Click on XSD and Edit it as below, SAVE ALL




Click on DemoAddNumbers.bpel, drag and drop Assign activity below receive activity



Double click on Assign activity,  click on '+' symbol and select copy operation.
From and To will be available
In From, select Type as Expression, Click on Xpath Expression Builder,
Select input variable numberA + numberB (code shown below)
bpws:getVariableData('inputVariable','payload','/client:process/client:numberA') + bpws:getVariableData('inputVariable','payload','/client:process/client:numberB')
Click Ok



In To, select Outputvariable--> Result and click OK.. As shown below



Click OK, Apply.. In BPEL designer window click on validate symbol



Now deploy the Application as shown in the figure






After deployement, Open enterprise manager http://localhost:7001/em
Select DemoAddNumbers and double click on it



Click on Test as shown below


Select view as XMLview, and give input's to numberA and numberB as below


Click on Test Web Service, the Result is shown below