2 Replies Latest reply on Sep 27, 2002 2:54 AM by jguru2001

    How to Configure SAP R/3 JCA adapter with JBoss 3.0.0

    jguru2001

      Hi All,

      I want to know the procedure to configure SAP R/3 JCA Resource Adapter with JBoss 3.0.0.

      Your help is highly appriciated.

      Thanks,

      Mahesh

        • 1. Re: How to Configure SAP R/3 JCA adapter with JBoss 3.0.0
          chrisp1

          Hi Mahesh,

          I understand that the SAP R3 JCA resource adapter should be available from http://service.sap.com.

          There are basically two jar files and a few windows dlls that you will need.

          ra.jar : The resource adapter jar, developed by in-q-my (a subsiduary of SAP)
          jco.jar : Java Connector Object from SAP.
          jRFC11.dll
          jRFC12.dll
          librfc32.dll
          msvcp60.dll : dlls for the JCO

          1) You need to have the dlls aviable in your path
          2) You then need to create a rar file (resource adapter resource). This is just a zip archive with the extension (rar) containing the following files:
          a) jco.jar
          b) ra.jar
          c) manifest.mf
          d) ra.xml : (see end of msg) - just put in your client number, username, password, server settings
          3) You will then need to create a sap-r3-service.xml file. I posted a template to the jboss list.
          4) Put the rar file and the sap-r3-service.xml file in your jboss/server/default/deploy directory.
          5) You will also need to add the following to your jboss/server/default/conf/login-config.xml file:

          <application-policy name = "SAPR3Realm">

          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
          <module-option name = "principal">your username</module-option>
          <module-option name = "userName">your username</module-option>
          <module-option name = "password">your password</module-option>
          <module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=SAPConnectorFactory</module-option>
          </login-module>

          </application-policy>

          6) If all has gone well, when you start up jboss the resource adapter should deploy successfully,

          ra.xml-----------------------------
          <?xml version="1.0" encoding="UTF-8" ?>
          <!DOCTYPE connector PUBLIC
          "-//Sun Microsystems, Inc.//DTD Connector 1.0//EN"
          "http://java.sun.com/dtd/connector_1_0.dtd">





          <managedconnectionfactory-class>com.inqmy.r3adapter.R3ManagedConnectionFactory</managedconnectionfactory-class>
          <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
          <connectionfactory-impl-class>com.inqmy.r3adapter.R3ConnectionFactory</connectionfactory-impl-class>
          <connection-interface>javax.resource.cci.Connection</connection-interface>
          <connection-impl-class>com.inqmy.r3adapter.R3Connection</connection-impl-class>
          <transaction-support>LocalTransaction</transaction-support>

          <config-property>
          The client-number of the R/3 system
          <config-property-name>ClientNumber</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>your client number</config-property-value>
          </config-property>
          <config-property>
          The name of the user, with which to logon to the system
          <config-property-name>UserName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>your username</config-property-value>
          </config-property>
          <config-property>
          The password, with wich to logon to the system
          <config-property-name>Password</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>your password</config-property-value>
          </config-property>
          <config-property>
          The language, with wich to logon to the system
          <config-property-name>Language</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>EN</config-property-value>
          </config-property>
          <config-property>
          The name of the server (hostname or ip-address) of the R/3 system
          <config-property-name>ServerName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>your server</config-property-value>
          </config-property>
          <config-property>
          The system-number of the R/3 system
          <config-property-name>SystemNumber</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>00</config-property-value>
          </config-property>
          <config-property>
          The name of the gateway-server (hostname or ip-address) - optional
          <config-property-name>GatewayServerName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value></config-property-value>
          </config-property>
          <config-property>
          The service-number of the gateway - optional
          <config-property-name>GatewayServiceNumber</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value></config-property-value>
          </config-property>
          <config-property>
          The name of the message-server (hostname or ip-address) for the R/3 system
          <config-property-name>MessageServerName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value></config-property-value>
          </config-property>
          <config-property>
          The system-name of the R/3 system
          <config-property-name>SystemName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value></config-property-value>
          </config-property>
          <config-property>
          The name of the group of application servers
          <config-property-name>GroupName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value></config-property-value>
          </config-property>


          BasicPassword
          <credential-interface>javax.resource.security.PasswordCredential</credential-interface>


          <reauthentication-support>false</reauthentication-support>




          <display-name>SAPConnectorFactory</display-name>
          <eis-type>SAP R/3</eis-type>
          J2EE Connector Architecture based Adapter to SAP's R/3 System. Properties defined must be either (ServerName, SystemNumber) or (MessageServer, SystemName, GroupName). The other properties (ClientNumber, UserName, Password, Language) must be defined always, although they are only default-values, which can be overridden when creating the actual connection.
          <spec-version>1.0</spec-version>
          <vendor-name>In-Q-My Technologies</vendor-name>
          1.0



          --------------------
          Hope this helps

          Regards
          Chris

          • 2. Re: How to Configure SAP R/3 JCA adapter with JBoss 3.0.0
            jguru2001

            Hi Chris,

            Thanks for ur help.

            Now whne i deploy sap adapter on JBoss 3.0.2, it throws error for deploying sapr3-service.xml as root element not found.

            Infact, i m getting error for all *-servce.xml which was by default present in deploy driectory.

            Error is noClassDefFoundError

            I am using the same servce.xml which u have sent to me in mail and is available in CVS.

            How to go about it.???

            Thanks
            Mahesh