Skip to Content
Author's profile photo Former Member

Alerts from adapter modules – the JRA way!! (Part II)

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, 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.

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


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      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 can not be casted to ModuleLocalHome or SModuleLocalHome

      Any help as to y this error is coming


      Author's profile photo Former Member
      Former Member

      I got the same error. Any help would be appreciated!


      Author's profile photo Former Member
      Former Member
      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