Skip to Content
author's profile photo Former Member
Former Member

SAP R/3 Connection in WEB AS 6.40


I am currently in the process of <i>migrating our enterprise application from Jboss to SAPWAS 6.40</i>. One of the tasks is to get the SAP R/3 connectivity happening in SAP WAS server. We connect to the SAP R/3 system from our java classes and realise we have to use JCO to do this.

is there a set of steps outlined anywhere which might tell me what is required to achieve the above? As in how do i go about setting the Connector Factory, getting hold of the relevant jars and dlls (if rquired)

Any help is much appreciated and <b>promise to reward the person with any useful information</b>.



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Sep 28, 2005 at 08:12 AM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Eddy De Clercq

      Precisely, i wanted to know <b>how to connect my J2EE application running inside SAP WAS to a SAP R/3 server</b>. once again i am not using any WebDynpro or Sap Portal.

      As mentioned earlier in Jboss you can do this by deploying a *-ds.xml file and a rar file which defines the JCA connection (example in my previous post).

      My apologies if this is still confusing.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 08:42 AM

    Hi Dushyant,

    You will get sample programs for connecting to SAP from java classes. These sample programs come with the SAPJCO.jar file. You can download this whole package from (SAP market place).

    Or you can go through following link, from where you can get ssample code.




    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Bhavik, Much appreciate your response. At this stage I am not too concerned about how to call the RFC from our Java classes as we already had that in Place in Jboss. I am more concerned about how to go about declaring the JCO adapter. Here is an example from a *-ds.xml file in Jboss that we used to basically deploy our adapter into Jboss. Do we need a similar thing in Netweaver??

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ==================================================================== -->

      <!-- New ConnectionManager setup for firebird dbs using jca-jdbc xa driver-->

      <!-- Build jmx-api (build/ all) and view for config documentation -->

      <!-- ==================================================================== -->


      <mbean code="org.jboss.resource.connectionmanager.XATxConnectionManager" name="jboss.jca:service=XaTxCM,name=SAPConnectorFactory">

      <! make the rar deploy - A BIG HACK till xslt based deployment is written >


      <depends optional-attribute-name="ManagedConnectionFactoryName">

      <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=XaTxDS,name=SAPConnectorFactory">

      <! more hack >

      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=SAPConnectorFactory</depends>

      <attribute name="ManagedConnectionFactoryProperties">



      <description>The client-number of the R/3 system</description>






      <description>The name of the user, with which to logon to the system</description>







      <description>The name of the message-server (hostname or ip-address) for the R/3 system</description>






      <description>The system-name of the R/3 system</description>






      <description>The name of the group of application servers</description>







      <attribute name="JndiName">R3ConnectionFactory</attribute>



      <depends optional-attribute-name="ManagedConnectionPool">

      <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=XaTxPool,name=SAPConnectorFactory">

      <attribute name="MinSize">0</attribute>

      <attribute name="MaxSize">50</attribute>

      <attribute name="BlockingTimeoutMillis">5000</attribute>

      <attribute name="IdleTimeoutMinutes">15</attribute>

      <!--criteria indicates if Subject (from security domain) or app supplied

      parameters (such as from getConnection(user, pw)) are used to distinguish

      connections in the pool. Choices are

      ByContainerAndApplication (use both),

      ByContainer (use Subject),

      ByApplication (use app supplied params only),

      ByNothing (all connections are equivalent, usually if adapter supports


      <attribute name="Criteria">ByContainer</attribute>



      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>

      <!-- Include a login module configuration named SAPR3Realm.

      Update your login-conf.xml, here is an example for a


      <application-policy name = "SAPR3Realm">


      <login-module code = "" flag = "required">

      <module-option name = "principal">MDROVER</module-option>

      <module-option name = "userName">MDROVER</module-option>

      <module-option name = "password">BAPIRFC1</module-option>

      <module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=SAPConnectorFactory</module-option>




      NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the

      module-option name = "managedConnectionFactoryName"

      must match the object name of the ConnectionManager you are configuring here.


      <!--comment out this line if you want component managed security or want

      to use the default values in the ManagedConnectionFactoryProperties -->

      <attribute name="SecurityDomainJndiName">SAPR3Realm</attribute>

      <depends optional-attribute-name="JaasSecurityManagerService"></depends>

      <attribute name="TransactionManager">java:/TransactionManager</attribute>



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.