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.
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 :
- Navigate to the application-j2ee-engine.xml in your EAR project.
- Select References on the General tab and click on Add.
- Select Select library/interface/service as shown in the snapshot and select j2eeca as in the next snapshot.