cancel
Showing results for 
Search instead for 
Did you mean: 

SAP R/3 Connection in WEB AS 6.40

Former Member
0 Kudos

Hello,

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

Thanks

Dushy

Accepted Solutions (1)

Accepted Solutions (1)

eddy_declercq
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi mate,

Thanks for the response. I am not using any WebDynPro applications in my app so not sure if this link would apply to my case.

eddy_declercq
Active Contributor
0 Kudos

Hi,

Pls don't forget to reward points and close the question if you find the answers useful.

Eddy

Former Member
0 Kudos

Sorry Eddy,

The only reason i didn't do that was because the post didn;t help me at all, still at the same place whwere i started, but i suppose 2 point is in order for your efforts to answer to this post.

Thanks

eddy_declercq
Active Contributor
0 Kudos

Hi,

What extra info do you need exactly?

JMS connection factory management info can be found at eg

http://help.sap.com/saphelp_nw04/helpdata/en/90/57849e5e3e45d784afc4e3bfa8136f/frameset.htm

Eddy

Former Member
0 Kudos

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.

Answers (1)

Answers (1)

Former Member
0 Kudos

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 service.sap.com (SAP market place).

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

Regards,

Bhavik

Former Member
0 Kudos

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/build.sh all) and view for config documentation -->

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

<service>

<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>jboss.jca:service=RARDeployer</depends>

<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">

<properties>

<config-property>

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

<config-property-name>ClientNumber</config-property-name>

<config-property-type>java.lang.String</config-property-type>

<config-property-value>100</config-property-value>

</config-property>

<config-property>

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

<config-property-name>UserName</config-property-name>

<config-property-type>java.lang.String</config-property-type>

<config-property-value>MDROVER</config-property-value>

</config-property>

</config-property>

<config-property>

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

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

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

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

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

<config-property-name>GroupName</config-property-name>

<config-property-type>java.lang.String</config-property-type>

<config-property-value></config-property-value>

</config-property>

</properties>

</attribute>

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

</mbean>

</depends>

<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

reauthentication)-->

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

</mbean>

</depends>

<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

ConfiguredIdentityLoginModule:

<application-policy name = "SAPR3Realm">

<authentication>

<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" 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>

</login-module>

</authentication>

</application-policy>

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">jboss.security:service=JaasSecurityManager</depends>

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

</mbean>

</service>