Import b2b trading partner agreements via ant into B2B 11g

Following the first couple tips and tricks on 11g - here is the next one on B2B. Straight from Fusion Order Demo's B2B composite, is a small example on how to use the b2b 11g remote utility to import (deploy and activate) trading partner agreements from a ant build script.


<path id="weblogic.classpath">
<pathelement location="${oracle.home}/soa/modules/oracle.soa.b2b_11.1.1/b2b.jar"/>
<pathelement location="${oracle.home}/../wlserver_10.3/server/lib/weblogic.jar"/>
<pathelement location="."/>
</path>

<!-- install tpas -->
<target name="importAndDeployB2BTradingAgreements"
if="seed.b2b.objects">
<echo>Importing and deploying b2b trading partner agreements</echo>
<property name="args" value="purgeimportdeploy ../config/OOW08_X12_10.zip"/>
<property name="tmp.jndi.properties" value="${basedir}/jndi.properties"/>
<!-- api expects a file - so we create one on demand -->
<property name="tmp.jndi.properties" value="${basedir}/jndi.properties"/>
<echo file="${tmp.jndi.properties}">java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://${managed.server.host}:${managed.server.port}/soa-infra
java.naming.security.principal=${server.user}
java.naming.security.credentials=${server.password}
dedicated.connection=true
dedicated.rmicontext=true
</echo>

<!-- use the command line utility to import the TPAs -->
<java classname="oracle.tip.b2b.utility.B2BCommandLineUtility"
classpathref="weblogic.classpath" fork="yes" >
<jvmarg value="-Xms512m" />
<jvmarg value="-Xmx512m" />
<jvmarg value="-Xmn300m" />
<arg line="${args}"/>
</java>

<!-- restart -->
<java classname="oracle.tip.b2b.utility.B2BCommandLineUtility"
classpathref="weblogic.classpath" fork="yes" >
<jvmarg value="-Xms512m" />
<jvmarg value="-Xmx512m" />
<jvmarg value="-Xmn300m" />
<arg line="restartb2b"/>
</java>

<!--Delete jndi.properties from the oracle/work/b2b folder-->
<delete file="${tmp.jndi.properties}" failonerror="false"/>
</target>


Two important aspects to note here -
first, the task expects an input of rmi.context properties to be able to connect to the b2b server via t3://.
And secondly after deployment you need to restart the server via the restartb2b argument.

Comments:

Great article as for me. It would be great to read a bit more concerning this topic.

Posted by StephanJade on October 21, 2009 at 10:18 AM PDT #

It was very interesting for me to read that article. Thanx for it. I like such topics and anything that is connected to them. I would like to read more soon.

Posted by Escort on November 17, 2009 at 05:26 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Tips and tricks straight from the SOA / BPM development team at Oracle HQ

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today