Skip to Content

As mentioned in my previous Alerts from adapter modules – the JRA way!! here are few specifics about how to go ahead with your JRA setup and NWDS settings. Some part of this blog is a repetition of content on help.sap.com, with some omissions / additions but this is an effort to give consolidated information about the same.
SAP WebAS specific setup

Following link should be referred for more details on effective connection pooling using JRA.


Connection pooling with Resource adapters 

With connection pooling a client application does not connect / disconnect at its own but just picks up a connection from a pre-established pool of connections and releases it to the pool when done with its execution.

For sample code using SAPJRA refer the following link.


http://help.sap.com/saphelp_nw04/helpdata/en/ca/a4804258544b76e10000000a155106/content.htm


With the setup part complete and having the JNDI name for the connection factory with you, it is possible to write the code based on it. Inside NWDS there are few typical steps you would need to carry out for your EJB and EAR projects which are summarized below.

You need references to connector.jar file which has the classes required at compile time and runtime

Compile time :

  • From the context menu of the EJB project , follow the path Properties -> Java Build Path -> Libraries.
  • Click on Add variable and select TSSAP_JAVAX_HOME and click on Extend and select connector.jar from the list displayed.

Run time :

  1. Navigate to the application-j2ee-engine.xml in your EAR project.
  2. Select References on the General tab and click on Add.
  3. Select Select library/interface/service as shown in the snapshot and select j2eeca as in the next snapshot.


Selection dialog


Library

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. coo pooja
    Hi Amol,

    While trying to execute the example given in yr blog I am facing the following error when the module is deployed to channel ::
    Error: java.lang.ClassCastException: class com.sap.aii.af.mp.module.ModuleLocalHomeImpl0_0 can not be casted to ModuleLocalHome or SModuleLocalHome

    Any help as to y this error is coming

    Regards

    (0) 
  2. Amit Kumar Singh
    Hi Anmol,

    While trying to access the JRA I am getting exception .My JNDI Name for JRA is different Do I ahve to use the same name while accessing in Trying to connect in Connection factory

    Regards

    (0) 

Leave a Reply