J2EE Connector Example
----------------------

The following are the steps to build, deploy, and run this sample.
Make sure that the J2EE 1.4 server is running before deployment.

1) Copy Integration/nativelib/LoanApp.dll to your C drive (C:\LoanApp.dll).

2) Make sure that the appropriate security permissions are granted to 
   the resource adapter for linking the dynamic library (LoanApp.dll) 
   by inserting the following line in the java.policy file under 
   <JDK Installation Directory>\jre\lib\security directory.
   
   permission java.lang.RuntimePermission "loadLibrary.*";

3) asant compile

   This will compile source files for JNI, connector, the client 
   enterprise bean, and the client of enterprise bean.

4) asant rar

   This will create OutboundLoanRa.rar archive with ra.xml i.e. 
   resource adapter deployment descriptor.

5) asant deploy_connector

   This will deploy OutboundLoanRa to J2EE 1.4 application server and 
   create all the connector connection pool and the associated JNDI 
   name resource.

6) asant ear
  
   This creates ear consisting of our client EJB jar.

7) asant deploy

   This will deploy our client EJB i.e. LoanRatesEJB to the J2EE 1.4 
   application server.

8) asant client_jar 

   This will build the client-side jar file.

9) asant run_client

    This will run the client to our EJB which in turn is a client to 
    the OutboundLoanRa connector.

10) asant clean

    This will remove any generated files and .class files for a clean
    rebuild, but not the archive files (.ear, .jar, .rar).

11) asant undeploy

    This will undeploy LoanRatesEjb and OutboundLoanRa from the J2EE 1.4 
    application server.

Troubleshooting
---------------

If after executing successfully the steps from 1 to 8, you get exceptions 
when running client (this happens at times after deploying connector/ejb 
for the first time, undeploying them, and redeploying them again), restart 
the application server. The problem will be fixed.