[JCA implementation]
Hello
I'm back with my "proprietary messaging system implementation".
I'm working on a JCA connector.
But I have a silly question :-) .
I don't want to use CCI but my own "client API".
So I should not implement "Connection, ConnectionFactory, RecordFactory...", in short I should not
implement any of the Interfaces of javax.resource.cci.
Am I right?
And if I'm right, how can I do with the ra.xml that needs to know what are my
interfaces and implementing classes for "connection" and "connectionfactory" ?
I mean, what should I put in here?
I'm a little confused...
Thanks for your help.
Mansuy DEJEAN
PROSODIE
http://www.prosodie.com
OK, so you would specify different interfaces and
classes in the ra.xml file, for connection factory and
connection interfaces and implementations?Yes.
It makes
sense if, in your case, you're using JMS, and I guess
JDBC as well, as there are connection factory and
connection interfaces in those APIs. Would it make
sense to make up your own connection factory instead
of implementing the cci one otherwise?One must create a connection factory but the type doesn't matter because javax.resource.spi.ManagedConnectionFactory's createConnectionMethod returns an Object:
Object createConnectionFactory(ConnectionManager connectionManager) throws ResourceException;
Object createConnectionFactory() throws ResourceException;The connection factories are specified in ra.xml (excerpt of outbound stuff):
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>
com.swiftmq.connector.v15.outbound.ManagedConnectionFactoryImpl
</managedconnectionfactory-class>
<config-property>
<config-property-name>ConnectionFactoryName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>QueueConnectionFactory</config-property-value>
</config-property>
<config-property>
<config-property-name>UserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>Password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<connectionfactory-interface>
javax.jms.QueueConnectionFactory
</connectionfactory-interface>
<connectionfactory-impl-class>
com.swiftmq.connector.v15.outbound.ConnectionFactoryImpl
</connectionfactory-impl-class>
<connection-interface>
javax.jms.QueueConnection
</connection-interface>
<connection-impl-class>
com.swiftmq.connector.v15.outbound.QueueConnectionImpl
</connection-impl-class>
</connection-definition>
<connection-definition>
<managedconnectionfactory-class>
com.swiftmq.connector.v15.outbound.ManagedConnectionFactoryImpl
</managedconnectionfactory-class>
<config-property>
<config-property-name>ConnectionFactoryName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>TopicConnectionFactory</config-property-value>
</config-property>
<config-property>
<config-property-name>UserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>Password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<connectionfactory-interface>
javax.jms.TopicConnectionFactory
</connectionfactory-interface>
<connectionfactory-impl-class>
com.swiftmq.connector.v15.outbound.ConnectionFactoryImpl
</connectionfactory-impl-class>
<connection-interface>
javax.jms.TopicConnection
</connection-interface>
<connection-impl-class>
com.swiftmq.connector.v15.outbound.TopicConnectionImpl
</connection-impl-class>
</connection-definition>
<connection-definition>
<managedconnectionfactory-class>
com.swiftmq.connector.v15.outbound.ManagedConnectionFactoryImpl
</managedconnectionfactory-class>
<config-property>
<config-property-name>ConnectionFactoryName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>ConnectionFactory</config-property-value>
</config-property>
<config-property>
<config-property-name>UserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>Password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<connectionfactory-interface>
javax.jms.ConnectionFactory
</connectionfactory-interface>
<connectionfactory-impl-class>
com.swiftmq.connector.v15.outbound.ConnectionFactoryImpl
</connectionfactory-impl-class>
<connection-interface>
javax.jms.Connection
</connection-interface>
<connection-impl-class>
com.swiftmq.connector.v15.outbound.ConnectionImpl
</connection-impl-class>
</connection-definition>
<transaction-support>XATransaction</transaction-support>
<authentication-mechanism>
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
</authentication-mechanism>
<reauthentication-support>false</reauthentication-support>
</outbound-resourceadapter>
Similar Messages
-
Hi all,
I searched for JCO/JCA topics in the forum, but I confused some terms/usages about them. Could anyone clarify for me:
1. What is different between JCO and JCA? Does JCA have the api to programming as JCO? From EP 6, JCO is deprecated, we use JCA to connect to SAP instead, is it right?
2. With JCO, what is JCO Destination, JCO inbound, JCO outbound? When we need to configure JCO Destination?
3. If we develop a portal application (ex: JSPDynPage)/ a WebDynPro application to get data from SAP, do you need configure JCO (in SLD, in EP, ...) or we just need use JCO API in code? How do we configure it?
4. What is Adaptive RFC?Hello
a short answer to some of your questions
1. What is different between JCO and JCA?
JCO is a SAP java library to connect to a SAP R/3 System. it can be used by independant (ie non-portal) application.
JCA, as i understand it, is a library whose structure as been defined by Sun, to connect to external system. The JCA implementation in the portal is based on JCO, and is to be used in the portal.
3. If we develop a portal application (ex: JSPDynPage)/ a WebDynPro application to get data from SAP, do you need configure JCO (in SLD, in EP, ...) or we just need use JCO API in code? How do we configure it?
If you use WebDynpro, you configue JCO in the WAS, and then use the plugins to create connections to R/3 RFC Functions.
If you develops standard Iviews (JspDynPage or Dynpage), you use the JCA api to get a connection to an alias, that itself point to a (R/3) system that has been defined in the portal administration.
Regards -
Unable to bind EEPersistenceManagerFactory to JNDI
I get the following exception trying to bind EEPersistenceManagerFactory to
JNDI with Kodo 2.2.3 (running with Weblogic 6.1 SP1):
javax.naming.ConfigurationException. Root exception is
java.rmi.MarshalException: failed to marshal
bind(Ljava.lang.String;Ljava.lang.Object;Ljava.util.Hashtable;); nested
exception is:
java.io.NotSerializableException:
com.solarmetric.kodo.impl.jdbc.JDBCPrefsConfiguration
java.io.NotSerializableException:
com.solarmetric.kodo.impl.jdbc.JDBCPrefsConfiguration
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
Anyone else run into this?Sasha-
That exception indicates that your PersistenceManagerFactory has not
yet been configured with the proper driver information. Note that the
JDOConnectionFactory does not use the system.prefs information by
default: it is designed to be configured internally as per
the JCA specification.
I'm sorry to say, but it actually looks like there is no way to bind
either the EEPersistenceManagerFactory or the JDOConnectionFactory into
JNDI (unless you extends the EEPersistenceFactory with your own
Referenceable implementation).
I have made a bug report about this:
https://bugzilla.solarmetric.com/show_bug.cgi?id=117
We will certainly try to have this fixed as soon as possible. Can you
please add a comment to the bug report with how urgently this is
affecting you?
Sasha Haghani <[email protected]> wrote:
Patrick,
I get a different problem with JDOConnectionFactory (in 2.2.3)...calling
getPersistenceManager() on it throws this exception:
Exception in thread "main" javax.jdo.JDODataStoreException: The JDBC driver
name "null" is not a valid class.
NestedThrowables:
java.lang.NullPointerException
at com.solarmetric.kodo.impl.jdbc.schema.DB.<init>(DB.java:62)
at com.solarmetric.kodo.impl.jdbc.schema.DB.getInstance(DB.java:37)
at
com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.initConfigurati
on(JDBCPersistenceManagerFactory.java:155)
at
com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.setup(JDBCPersi
stenceManagerFactory.java:265)
at
com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.privateSetup(Pers
istenceManagerFactoryImpl.java:810)
at
com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceMan
ager(PersistenceManagerFactoryImpl.java:53)
"Patrick Linskey" <[email protected]> wrote:
Sasha,
This is a known problem with Kodo JDO 2.2.3 EE, caused by a bug in our
JCA implementation.
You should be able to work around this problem by binding a
JDOConnectionFactory instead of an EEPersistenceManagerFactory.
com.solarmetric.kodo.impl.jdbc.ee.JDOConnectionFactory extends
EEPersistenceManagerFactory.
Unfortunately, JDOConnectionFactory implements Serializable although it
is not actually serializable. However, as JDOConnectionFactory also
implements javax.resource.Referenceable, the JNDI bind should succeed.
Finally, one other alternative is to use Kodo's JCA support to locate
the PersistenceManagerFactory. Unfortunately, you are using WebLogic 6.1
SP1, which has a flaky JCA implementation. Weblogic 6.1 SP2 resolves
these problems. So, your best option is probably to upgrade your
Weblogic install to SP2 and use JCA (as outlined in our docs).
JDBCPrefsConfiguration will properly serialize in the next patch release
of Kodo JDO.
-Patrick
Patrick Linskey [email protected]
SolarMetric Inc. http://www.solarmetric.com
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com
Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code -
Creating an application server stub until the JCA is fully implemented
Greetings,
We have pretty much decided that the Java Connector Architecture is the
way to go, when it comes down to integrating with EIS systems.
However, the problem still remains that the JCA spec is not fully
supported in the current beta release of the Connector implementation
within WLS 6.0. In particular,
I see that only non-transaction Resource Adapters can be deployed in
this release (local transaction and XA transaction ones will have to
wait until the full release in the summer).
However, what our group wants to do is write XA-compliant Resource
Adapters, even ahead of the actual support for them in the product. The
issue for us is how to structyure our implementation so that we end up
with a minimal re-write when the full implementation of the spec
arrives.
It seems to me that if I wanted to have support for XA-compliant
Resource Adapters NOW, I would have to actually write some of the code,
that would otherwise be part of the application server/container,
myself. In particular, it is the code that "enlists" the XAResource
object, which is associated with the ManagedConnection that an
application bean asks for, with the Transaction Manager that is later
going to coordinate things in the global XA transaction.
Let me describe how I see things:
when the application component calls into the Resource Adapter for a
connection handle, the ConnectionFactory class according to the spec)
delegates the call to the application server ConnectionManager (that it
has been initialised with, typically at creation time), which in turn
calls the createManagedConnection method of the ManagedConnectionFactory
class inside the Resource Adapter.
Now, I want to emulate the application server so that the
ConnectionManager class is in fact implemented in my Resource Adapter.
That I guess will not be a problem. However, the next thing IS (in the
current BETA release): the application server code would normally
retrieve the XAResource instance that is "hanging" off the
ManagedConnection that has just been created and would "enlist" this
with the Transaction Manager. Thereafter, everything would follow the
normal XA transaction route, as the Transaction Manager would start
calling back into the XAResource, notifying it on the status of the
global XA transaction (start, end, prepare, commit, abort).
Looking at the JTA specification, an in particular at what the
application server code has to do, I see the following set of
interactions:
TransactionalResource res = ResourceFactory.getTransactionalResource();
XAResource xaRes = res.getXAResource();
(TransactionManager.getTransaction()).enlistResource(xaRes);
<<<<<<<<<------------ how do/can I, in
application code, within the Resource Adapter in fact, get hold of the
TransactionManager instance? This is trivial when it is implemented
within the app server code, but could I also do this?
This will obviously be an interim solution for us: we will implement a
very small part of the appliction server logic (you could call it a
stub) around the registration of the XA resource with the global
transaction manager. The aim is really to write something that will
appear to our application beans as well as to the rest of the Resource
Adapter as something that is behaving in the same way as the application
server would (in the full implementation of the JCA spec), and would
also ensure that neither our application component code nor our Adapter
code would not have to be dramatically changed when that app server
piece of the JCA-specified system contract implementation is in place.
I realise that the APIs to the Transaction Manager implementation within
WLS are "private" and that people may not want us to be using them. But
it is the only way that I see for us to create something (Resource
Adapters) which are a)XA compliant and b) will only have to change
minimally, if at all, when the actual implementation is in place.
I would appreciate any thoughts from BEA folks out there. Also, if you
see another way of solving my problem (support global XA transaction
within my Resource Adapters, AND minimal re-write) that I may be
missing, I would appreciate your feeback around that.
Many thanks in advance
Kostas
Kostas Karagianidis
Technical Consultant
PricewaterhouseCoopers
Delta 602, Delta Business Park
Swindon SN5 7XJ, Wiltshire
United Kingdom
Tel: +44 1793 536291
Fax: +44 1793 529641
Mobile: +44 7768 083452
e-mail: [email protected]
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or other
use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the
material from any computer.
Did you sign your jar file for JWS? I don't think the security manager will allow a filebrowser if the jar is not signed.
Edited by: Plee on Dec 29, 2008 6:54 AM -
[JMS-JCA] Design/Implementation problem
Hello,
I would like some advices on a little issue I have.
I explain.
My company needed a messaging tool for some very specific use. So some people created a C library for Linux and Win32.
With this library you can create some message queues, send and receive binary or Ascii messages.
Today we are working on a big project made of heterogenous technologies.
Basically, we are creating a linux native server that will use our library to send some message to a J2EE application.
At first I thought:
"let's build a Java Library with JNI and then a JMS provider based on this library"
but then I am thinking :
"why not using an existing JMS provider and creating a JCA resource adapter to link the provider to my Java-JNI library ?"
So I'm a little confused now.
What do you think about it?
What should I do?
Can I implement a JCA resource adapter only for JMS?
Do you have any litterature on that (except official tutorials and specifications)?
Thanks a lot.
Mansuy DEJEAN
PROSODIE
http://www.prosodie.comI guess you could do either. I would know how to do it with the JCA resource adapter - I think writing your own JMS provider may be a bit difficult, but then writing JCA adapters isn't trivial.
There are a couple of books on writing JCA adapters - Java Connector Architecture, Building Enterprise Adapters, by Apte, and J2EE Connector Architecture and Enterprise Application Integration, by Sharma, Stearns and Ng. Neither are brilliant books - but they'll help a bit.
Javaworld has a couple of articles on JCA adapters: http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-jca2.html, especially useful is the sequence diagram of getting a connection. Theres also the sun tutorials.
One issue that may help you to decide - JMS, via message driven beans, will allow your message to 'drive' the business logic through your J2EE application. With the current JCA spec in most app servers ( 1.0 ) you cannot do this in JCA* - 1.0 resource adapters just respond to stimuli. With JCA 1.5 resource adapters can drive the business logic, and I guess app server vendors will start using this soon.
* at least not without kludging, and I wouldn't want to rely on the reliability of it. -
JCA 1.5 Resource Adapter implementation
Anybody knows whether there is a J2EE Connector 1.5 complaint Resource
Adapter implementation somewhere?Hallo
you can download a tutorial for an Resource Adapter. It#s only for the J2EE 1.3. But I guess for the beginning it's complex enough
Here is the link:
http://java.sun.com/j2ee/sdk_1.3/ -
Does JCA in 7.31 uses JCO3 for implementation?
Hello Experts,
I want to use JCA (SAP System Connector) in my J2EE/portal applications.
Does JCA in 7.31 use JCO3 or still JCO2?
Where can I find documentation?
(The page http://help.sap.com/saphelp_nw73ehp1/helpdata/en/4a/5fd52b16bc0451e10000000a421937/frameset.htm is the same for all portal versions).
Regards,
OmriHi Jun,
Yes, I'm sure.
See Benny and Ran's answers in this thread: http://scn.sap.com/thread/3533308
Regards,
Omri -
I need Fusion help creating a demo of BRM JCA Resource Adapter
I need Fusion help creating a demo of BRM JCA Resource Adapter.
I know BRM well but am clueless with Fusion.
I am trying to figure out what Fusion products to download and install and how I manipulate the Fusion side to manipulate BRM.
My BRM docs say:
Installing the BRM JCA Resource Adapter ->
Software requirements
(yada yada install a bunch of BRM stuff I know how to do)
The adapter must be deployed on a J2EE 1.4-compliant application server that has implemented the JCA 1.5 specification. The adapter runs only in a managed environment. (Does this imply some particular Fusion package?)
(more yada yada about installing more BRM packages I know how to do)
Deploying and configuring the BRM JCA Resource Adapter ->
Overview of the BRM JCA Resource Adapter configuration procedure
The procedure for setting up the BRM JCA Resource Adapter includes the following tasks:
Installing the adapter on your BRM system, if you have not already done so. See Installing the BRM JCA Resource Adapter.
Generating the schema files for the adapter. See Generating the schema files for your system. (links to some BRM commands np)
Specifying how to construct XML tags. See Specifying the XML tags for extended fields. (links to an oob file included with directions on how to address BRM customizations np)
Generating the WSDL files for the adapter. See Generating the WSDL files for your system. (links to an oob file with directions to configure. I could use some help if/when I get this far)
The last two look pretty important but I haven't a clue. I pasted the text from the docs below.
Deploying the adapter on your application server. See Deploying the BRM JCA Resource Adapter on an Oracle application server.
Connecting the adapter to the BRM software. See Connecting the adapter to BRM in Oracle AS.
Deploying the BRM JCA Resource Adapter on an Oracle application server
The adapter is dependent on Java Archive (JAR) files to deploy properly. The following table lists the JAR files that the adapter requires from each application in your system.
Application
JAR files
J2EE application server
classes12.jar, connector15.jar, and jta.jar
Oracle BPEL process
bpm-infra.jar, orabpel-thirdparty.jar, orabpel.jar, and xmlparserv2.jar
BRM J2EE Resource Adapter
pcm.jar and pcmext.jar
Apache
xercesImpl.jar
If you are deploying the adapter in a standalone Oracle Containers for Java EE (OC4J) instance, make sure these JAR files are available to the class loader that is loading the adapter.
If you are deploying the adapter by using Oracle SOA Suite, these JAR files are available as part of the oracle.bpel.common code source. You import these libraries as follows:
Open the Oracle_home/j2ee/Instance/config/applications.xml configuration file for the J2EE instance.
Add the oracle.bpel.common entry (shown in bold below) to the imported-shared-libraries section of the file:
<imported-shared-libraries>
<import-shared-library name="adf.oracle.domain"/>
<import-shared-library name="oracle.bpel.common"/>
</imported-shared-libraries>
Save and close the file.
Restart the application server or the J2EE instance.
After you make the JAR files available, deploy the adapter on the Oracle application server by using either the Oracle Application Server (Oracle AS) Application Server Control (ASC) or the Oracle admintool.jar file. Copy the adapter archive file (BRM_home/apps/brm_integrations/jca_adapter/OracleBRMJCA15Adapter.rar) from the installation directory to a location that is accessible to the adapter deployment tool. You can then open and deploy the archive file on your application server.
After successful deployment, return the applications.xml file to its original settings and add the oracle.bpel.common codesource to the BRM Adapter oc4j-ra.xml file:
Open the Oracle_home/j2ee/Instance/config/applications.xml configuration file for the J2EE instance.
Remove the following oracle.bpel.common entry (shown in bold below):
<imported-shared-libraries>
<import-shared-library name="adf.oracle.domain"/>
<import-shared-library name="oracle.bpel.common"/>
</imported-shared-libraries>
Save and close the file.
Open the JCA Resource Adapter oc4j-ra.xml file from the Oracle_home/j2ee/Instance/application-deployments/default/BRMAdapterDeploymentName directory.
Add the oracle.bpel.common entry (shown in bold below) to the oc4j-connector-factories section of the file:
<oc4j-connector-factories...>
<imported-shared-libraries>
<import-shared-library name="oracle.bpel.common"/>
</imported-shared-libraries>
<oc4j-connector-factories>
Save and close the file.
Restart the application server or the J2EE instance.
For more information about deploying the adapter, see your application server’s documentation.
Connecting the adapter to BRM in Oracle AS
You connect the adapter to the BRM software by creating connection pools and connection factories. As part of the adapter deployment, the application server creates oc4j-ra.xml from the packaged ra.xml. The ra.xml file is located in the Oracle_home/j2ee/Instance/connectors/AdapterDeploymentName/AdapterDeploymentName/META-INF directory. For example, Oracle_home/j2ee/home/connectors/BRMAdapter/BRMAdapter/META-INF/ra.xml.
Use the resource adapter home page from the Oracle AS ASC page to create connection pools and connection factories.
Create your connection pool by following the performance and tuning guidelines in Configuring Connection Pooling in OC4J in Oracle Containers for J2EE Resource Adapter Administrator's Guide. See download.oracle.com/docs/cd/B31017_01/web.1013/b28956/conncont.htm.
Make sure you set the pool’s Maximum Connections parameter (maxConnections XML entity) equal to or greater than the Oracle BPEL process manager’s dspMaxThreads parameter. For more information, see Oracle BPEL Process Manager Performance Tuning in Oracle Application Server Performance Guide for 10g Release 3 (10.1.3.1.0) at download.oracle.com/docs/cd/B31017_01/core.1013/b28942/tuning_bpel.htm.
Note To set up JCA Resource Adapter transaction management in BPEL, you must create a private connection pool and set its Inactive Connection Timeout property (inactivity-timeout XML entity) to 0. See About JCA Resource Adapter transaction management in BPEL for more information.
Create as many connection factories as your system needs. For each connection factory, specify the following:
The JNDI location for the connection factory.
The connection pool to use.
How to connect to BRM by using these entries:
Entry
Description
ConnectionString
Specify the protocol, host name, and port number for connecting to the BRM software. For example: ip Server1 12006.
DBNumber
Specify the database number for the BRM database. For example, enter 1 or 0.0.0.1 for database 0.0.0.1.
InputValidation
Specifies whether to validate the input XMLRecord:
True — The adapter validates the input XMLRecord against the opcode schema.
False — The adapter does not validate the input XMLRecord.
The default is False.
This overrides any other validation parameter specified in the WSDL file.
OutputValidation
Specifies whether to validate the output XMLRecord:
True — The adapter validates the output XMLRecord against the opcode schema.
False — The adapter does not validate the output XMLRecord.
The default is False.
This overrides any other validation parameter specified in the WSDL file.
LoginType
Specifies the authentication method:
1 — The adapter logs in to BRM by using the specified login name and password.
0 — The adapter logs in to BRM by using the specified service type and POID ID.
The default is 1.
UserName
Specifies the login name the adapter uses for logging in to the BRM software.
Note This entry is required only if LoginType is set to 1.
Password
Specify the password the adapter uses for logging in to the BRM software.
Note This entry is required only if LoginType is set to 1.
PoidID
Specifies the POID ID. This entry should be set to 1.
ServiceType
Specifies the service the adapter uses to log in to the BRM software.
The default is /service/pcm_client.
You have successfully configured the adapter to connect to BRM.I need Fusion help creating a demo of BRM JCA Resource Adapter.
I know BRM well but am clueless with Fusion.
I am trying to figure out what Fusion products to download and install and how I manipulate the Fusion side to manipulate BRM.
My BRM docs say:
Installing the BRM JCA Resource Adapter ->
Software requirements
(yada yada install a bunch of BRM stuff I know how to do)
The adapter must be deployed on a J2EE 1.4-compliant application server that has implemented the JCA 1.5 specification. The adapter runs only in a managed environment. (Does this imply some particular Fusion package?)
(more yada yada about installing more BRM packages I know how to do)
Deploying and configuring the BRM JCA Resource Adapter ->
Overview of the BRM JCA Resource Adapter configuration procedure
The procedure for setting up the BRM JCA Resource Adapter includes the following tasks:
Installing the adapter on your BRM system, if you have not already done so. See Installing the BRM JCA Resource Adapter.
Generating the schema files for the adapter. See Generating the schema files for your system. (links to some BRM commands np)
Specifying how to construct XML tags. See Specifying the XML tags for extended fields. (links to an oob file included with directions on how to address BRM customizations np)
Generating the WSDL files for the adapter. See Generating the WSDL files for your system. (links to an oob file with directions to configure. I could use some help if/when I get this far)
The last two look pretty important but I haven't a clue. I pasted the text from the docs below.
Deploying the adapter on your application server. See Deploying the BRM JCA Resource Adapter on an Oracle application server.
Connecting the adapter to the BRM software. See Connecting the adapter to BRM in Oracle AS.
Deploying the BRM JCA Resource Adapter on an Oracle application server
The adapter is dependent on Java Archive (JAR) files to deploy properly. The following table lists the JAR files that the adapter requires from each application in your system.
Application
JAR files
J2EE application server
classes12.jar, connector15.jar, and jta.jar
Oracle BPEL process
bpm-infra.jar, orabpel-thirdparty.jar, orabpel.jar, and xmlparserv2.jar
BRM J2EE Resource Adapter
pcm.jar and pcmext.jar
Apache
xercesImpl.jar
If you are deploying the adapter in a standalone Oracle Containers for Java EE (OC4J) instance, make sure these JAR files are available to the class loader that is loading the adapter.
If you are deploying the adapter by using Oracle SOA Suite, these JAR files are available as part of the oracle.bpel.common code source. You import these libraries as follows:
Open the Oracle_home/j2ee/Instance/config/applications.xml configuration file for the J2EE instance.
Add the oracle.bpel.common entry (shown in bold below) to the imported-shared-libraries section of the file:
<imported-shared-libraries>
<import-shared-library name="adf.oracle.domain"/>
<import-shared-library name="oracle.bpel.common"/>
</imported-shared-libraries>
Save and close the file.
Restart the application server or the J2EE instance.
After you make the JAR files available, deploy the adapter on the Oracle application server by using either the Oracle Application Server (Oracle AS) Application Server Control (ASC) or the Oracle admintool.jar file. Copy the adapter archive file (BRM_home/apps/brm_integrations/jca_adapter/OracleBRMJCA15Adapter.rar) from the installation directory to a location that is accessible to the adapter deployment tool. You can then open and deploy the archive file on your application server.
After successful deployment, return the applications.xml file to its original settings and add the oracle.bpel.common codesource to the BRM Adapter oc4j-ra.xml file:
Open the Oracle_home/j2ee/Instance/config/applications.xml configuration file for the J2EE instance.
Remove the following oracle.bpel.common entry (shown in bold below):
<imported-shared-libraries>
<import-shared-library name="adf.oracle.domain"/>
<import-shared-library name="oracle.bpel.common"/>
</imported-shared-libraries>
Save and close the file.
Open the JCA Resource Adapter oc4j-ra.xml file from the Oracle_home/j2ee/Instance/application-deployments/default/BRMAdapterDeploymentName directory.
Add the oracle.bpel.common entry (shown in bold below) to the oc4j-connector-factories section of the file:
<oc4j-connector-factories...>
<imported-shared-libraries>
<import-shared-library name="oracle.bpel.common"/>
</imported-shared-libraries>
<oc4j-connector-factories>
Save and close the file.
Restart the application server or the J2EE instance.
For more information about deploying the adapter, see your application server’s documentation.
Connecting the adapter to BRM in Oracle AS
You connect the adapter to the BRM software by creating connection pools and connection factories. As part of the adapter deployment, the application server creates oc4j-ra.xml from the packaged ra.xml. The ra.xml file is located in the Oracle_home/j2ee/Instance/connectors/AdapterDeploymentName/AdapterDeploymentName/META-INF directory. For example, Oracle_home/j2ee/home/connectors/BRMAdapter/BRMAdapter/META-INF/ra.xml.
Use the resource adapter home page from the Oracle AS ASC page to create connection pools and connection factories.
Create your connection pool by following the performance and tuning guidelines in Configuring Connection Pooling in OC4J in Oracle Containers for J2EE Resource Adapter Administrator's Guide. See download.oracle.com/docs/cd/B31017_01/web.1013/b28956/conncont.htm.
Make sure you set the pool’s Maximum Connections parameter (maxConnections XML entity) equal to or greater than the Oracle BPEL process manager’s dspMaxThreads parameter. For more information, see Oracle BPEL Process Manager Performance Tuning in Oracle Application Server Performance Guide for 10g Release 3 (10.1.3.1.0) at download.oracle.com/docs/cd/B31017_01/core.1013/b28942/tuning_bpel.htm.
Note To set up JCA Resource Adapter transaction management in BPEL, you must create a private connection pool and set its Inactive Connection Timeout property (inactivity-timeout XML entity) to 0. See About JCA Resource Adapter transaction management in BPEL for more information.
Create as many connection factories as your system needs. For each connection factory, specify the following:
The JNDI location for the connection factory.
The connection pool to use.
How to connect to BRM by using these entries:
Entry
Description
ConnectionString
Specify the protocol, host name, and port number for connecting to the BRM software. For example: ip Server1 12006.
DBNumber
Specify the database number for the BRM database. For example, enter 1 or 0.0.0.1 for database 0.0.0.1.
InputValidation
Specifies whether to validate the input XMLRecord:
True — The adapter validates the input XMLRecord against the opcode schema.
False — The adapter does not validate the input XMLRecord.
The default is False.
This overrides any other validation parameter specified in the WSDL file.
OutputValidation
Specifies whether to validate the output XMLRecord:
True — The adapter validates the output XMLRecord against the opcode schema.
False — The adapter does not validate the output XMLRecord.
The default is False.
This overrides any other validation parameter specified in the WSDL file.
LoginType
Specifies the authentication method:
1 — The adapter logs in to BRM by using the specified login name and password.
0 — The adapter logs in to BRM by using the specified service type and POID ID.
The default is 1.
UserName
Specifies the login name the adapter uses for logging in to the BRM software.
Note This entry is required only if LoginType is set to 1.
Password
Specify the password the adapter uses for logging in to the BRM software.
Note This entry is required only if LoginType is set to 1.
PoidID
Specifies the POID ID. This entry should be set to 1.
ServiceType
Specifies the service the adapter uses to log in to the BRM software.
The default is /service/pcm_client.
You have successfully configured the adapter to connect to BRM. -
Deploying BRM JCA on Weblogic 10.3
We are trying to prototype invoking APIs through Webservices exposed by BRM JCA.
In the Oracle BRM manual it is mentioned that certain Jars need to be present in order for BRM JCA to deploy successfully.
1. J2EE application server
classes12.jar, connector15.jar, and jta.jar
2. Oracle BPEL process
bpm-infra.jar, orabpel-thirdparty.jar, orabpel.jar, and xmlparserv2.jar
3. Apache
xercesImpl.jar
We have only classes12.jar, jta.jar, xercesImpl.jar.
My question is whether it is absolutely necessary for these jars to be present, and if so where can I find it.
Right now we are getting Deployment error when we try to deploy BRM JCA on Weblogic 10.3
<Dec 10, 2010 2:17:07 PM GMT+05:30> <Warning> <Connector> <BEA-190155> <Compliance checking/validation of the resource a
dapter E:\BRM74Tools\JCA\jca_adapter\OracleBRMJCA15Adapter.rar resulted in the following warnings:
The ra.xml <resourceadapter-class> class 'oracle.tip.adapter.brm.BRMResourceAdapter' should implement java.io.Serializab
le but does not.>
<Dec 10, 2010 2:17:07 PM GMT+05:30> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment req
uest with ID '1291970826812' for task '0'. Error is: 'weblogic.application.ModuleException: [1] The ra.xml <connectionfa
ctory-interface> class 'oracle.tip.adapter.api.OracleConnectionFactory' was not found in the resource adapter archive/ap
plication.
[2] The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.brm.BRMConnectionFactory' could not be loaded fr
om the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/a
dapter/api/OracleConnectionFactory'
weblogic.application.ModuleException: [1] The ra.xml <connectionfactory-interface> class 'oracle.tip.adapter.api.OracleC
onnectionFactory' was not found in the resource adapter archive/application.
[2] The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.brm.BRMConnectionFactory' could not be loaded fr
om the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/a
dapter/api/OracleConnectionFactory
at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:229)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:508)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
Truncated. see log file for complete stacktrace
>
<Dec 10, 2010 2:17:07 PM GMT+05:30> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy ta
sk for application 'OracleBRMJCA15Adapter'.>
<Dec 10, 2010 2:17:07 PM GMT+05:30> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: [1] The ra.xml <connectionfactory-interface> class 'oracle.tip.adapter.api.OracleC
onnectionFactory' was not found in the resource adapter archive/application.
[2] The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.brm.BRMConnectionFactory' could not be loaded fr
om the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/a
dapter/api/OracleConnectionFactory
at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:229)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:508)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
Truncated. see log file for complete stacktrace
>
<Dec 10, 2010 2:17:07 PM GMT+05:30> <Error> <Console> <BEA-240003> <Console encountered the following error weblogic.app
lication.ModuleException: [1] The ra.xml <connectionfactory-interface> class 'oracle.tip.adapter.api.OracleConnectionFac
tory' was not found in the resource adapter archive/application.
[2] The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.brm.BRMConnectionFactory' could not be loaded fr
om the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/a
dapter/api/OracleConnectionFactory
at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:229)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:508)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:47)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1223)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperatio
n.java:208)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:749)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:16
0)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(Deploymen
tReceiverCallbackDeliverer.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiv
erCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCal
lbackDeliverer.java:47)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>Hi jamavalom,
I have exactly the same problem with deployment of JCA Adapter, except I collected all requested jar files, and put them in WEBLOGIC_CLASSPATH inside /wlserver_10.3/common/bin/commEnv.sh file, and afterward restarted the WebLogic server. Here are the contents of configuration *.xml files:
ra.xml:
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
version="1.5">
<display-name>Oracle BRM Adapter</display-name>
<vendor-name>Oracle CGBU</vendor-name>
<eis-type>Oracle BRM</eis-type>
<resourceadapter-version>1.0</resourceadapter-version>
<resourceadapter>
<resourceadapter-class>oracle.tip.adapter.brm.BRMResourceAdapter</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>
oracle.tip.adapter.brm.BRMManagedConnectionFactory
</managedconnectionfactory-class>
<!-- protocol, hostname and port -->
<config-property>
<config-property-name>ConnectionString</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>ip hostname 12007</config-property-value>
</config-property>
<config-property>
<config-property-name>PoidID</config-property-name>
<config-property-type>java.lang.Long</config-property-type>
<config-property-value>1</config-property-value>
</config-property>
<config-property>
<config-property-name>ServiceType</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>/service/pcm_client</config-property-value>
</config-property>
<!-- Login type 1 - Authentication by username/password,
0 - authentication by service and poid id0 -->
<config-property>
<config-property-name>LoginType</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<config-property-value>1</config-property-value>
</config-property>
<!-- ConnectionPoolMaxsize - Pool Max size used by pfc.jar -->
<config-property>
<config-property-name>ConnectionPoolMaxsize</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<config-property-value>50</config-property-value>
</config-property>
<!-- ConnectionPoolMinsize - Pool Mn size used by pfc.jar -->
<config-property>
<config-property-name>ConnectionPoolMinsize</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<config-property-value>25</config-property-value>
</config-property>
<!-- UserName and Password for Login type 1 -->
<config-property>
<config-property-name>UserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>root.0.0.0.1</config-property-value>
</config-property>
<config-property>
<config-property-name>Password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>&aes|08|0D5E11BFDD97D2769D9B0DBFBD1BBF7E5D40C305EDF3D77DF111AAB8F781E92122</config-property-value>
</config-property>
<!-- Input and Output schema validation-->
<config-property>
<config-property-name>InputValidation</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
<config-property>
<config-property-name>OutputValidation</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
<!-- MultiDB - true - Transaction opened on the incoming database
- false- Transaction opened on default DB -->
<config-property>
<config-property-name>MultiDB</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
<!-- AverageOpcodeCount - Determines number of managed connections
created on the fly. Its the average number
of opcodes executed per thread -->
<config-property>
<config-property-name>AverageOpcodeCount</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<config-property-value>5</config-property-value>
</config-property>
<connectionfactory-interface>
oracle.tip.adapter.api.OracleConnectionFactory
</connectionfactory-interface>
<connectionfactory-impl-class>
oracle.tip.adapter.brm.BRMConnectionFactory
</connectionfactory-impl-class>
<connection-interface>
oracle.tip.adapter.brm.IBRMConnection
</connection-interface>
<connection-impl-class>
oracle.tip.adapter.brm.BRMConnection
</connection-impl-class>
</connection-definition>
<transaction-support>XATransaction</transaction-support>
<authentication-mechanism>
<authentication-mechanism-type>
BasicPassword
</authentication-mechanism-type>
<credential-interface>
javax.resource.spi.security.PasswordCredential
</credential-interface>
</authentication-mechanism>
<reauthentication-support>false</reauthentication-support>
</outbound-resourceadapter>
</resourceadapter>
</connector>
weblogic-ra.xml:
<weblogic-connector xmlns="http://www.bea.com/ns/weblogic/weblogic-connector" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-connector http://www.bea.com/ns/weblogic/weblogic-connector/1.0/weblogic-connector.xsd">
<enable-access-outside-app>true</enable-access-outside-app>
<enable-global-access-to-classes>true</enable-global-access-to-classes>
<outbound-resource-adapter>
<connection-definition-group>
<connection-factory-interface>oracle.tip.adapter.api.OracleConnectionFactory</connection-factory-interface>
<connection-instance>
<jndi-name>eis/BRM</jndi-name>
<connection-properties>
<logging>
<log-filename>eisBRM.log</log-filename>
<logging-enabled>true</logging-enabled>
<rotation-type>bySize</rotation-type>
<number-of-files-limited>true</number-of-files-limited>
<file-count>3</file-count>
<file-size-limit>100</file-size-limit>
<rotate-log-on-startup>true</rotate-log-on-startup>
<log-file-rotation-dir>c:/mylogs</log-file-rotation-dir>
<rotation-time>10:00</rotation-time>
<file-time-span>24</file-time-span>
</logging>
<properties>
<property>
<name>ConnectionString</name>
<value>ip blrhpdv3.idc.oracle.com 12011</value>
</property>
<!-- Database number, Poid ID0 and Service type -->
<property>
<name>PoidID</name>
<value>1</value>
</property>
<property>
<name>ServiceType</name>
<value>/service/pcm_client</value>
</property>
<!-- Login type 1 - Authentication by username/password,
0 - authentication by service and poid id0 -->
<property>
<name>LoginType</name>
<value>1</value>
</property>
<property>
<name>ConnectionPoolMaxsize</name>
<value>20</value>
</property>
<property>
<name>ConnectionPoolMinsize</name>
<value>10</value>
</property>
<!-- UserName and Password for Login type 1 -->
<property>
<name>UserName</name>
<value>root.0.0.0.1</value>
</property>
<property>
<name>Password</name>
<value>&aes|08|0D5E11BFDD97D2769D9B0DBFBD1BBF7E5D40C305EDF3D77DF111AAB8F781E92122</value>
</property>
<!-- Input and Output schema validation-->
<property>
<name>InputValidation</name>
<value>false</value>
</property>
<property>
<name>OutputValidation</name>
<value>false</value>
</property>
<property>
<name>MultiDB</name>
<value>false</value>
</property>
<!-- The AverageOpcodeCount parameter specifies the number of Opcode calls in a Thread -->
<property>
<name>AverageOpcodeCount</name>
<value>1</value>
</property>
</properties>
</connection-properties>
</connection-instance>
</connection-definition-group>
</outbound-resource-adapter>
</weblogic-connector>
Thank you in advance for help,
BR,
Mario -
R/3 connection using JCA For Ep 6.0 SP2 !!
I am able to connect to R3 system from the Ep 6.0 Sp2 portal using IConnectorService (JCA).
I am trying to find a solution where I can generate java proxy for BAPI's so that I can eliminate data mapping between R3 and Java in EP 6.0 SP2 environment.
In EP 6.0 Sp4, the Netweaver Developer Studio provides a "SAP Enterprise Connector" wizard which generates proxy classes for java but uses JCO to connect to R/3 system. It is very usefull since the mapping of data types can be done in one place for all BAPI's which needs to be called from the portal and also I do not need to constatly look at the SAP GUI for BAPI definitions and return types. I can look at the java proxies to know exactly what I need to pass to invoke a BAPI and what I am getting back. I really like these connector wizard.
Is there a way to generate proxies using some tool for EP 6.0 sp2 using JCA as the mechanism since it is recommended to use JCA from EP 6.0 onward instead of JCO for better performance and management of R/3 connection ??
I appreciate your help !!Thanks Will.
I have two choices to connect to R/3 system from EP 6.0 Sp2 ...
1) JCA : If I use JCA, I may have to write the layer of
mapping the data and calling the BAPI's from R/3
system to java.
2) JCO : I can use the "SAP Enterprise Connector" wizard.
The only thing I have to make sure is R/3
connection management using IJCOClientService
and JCOClientPoolEntry.
I am also aware that the iView's I am writing will be used by lot of users since we are migrating an existing applications functionality to SAP Portal.
So my question is, Which way should I implement the connection to R/3 so that I can achieve better performance and scalability ??
Thanks again for your help !! -
JCA adapter outbound connection properties values are not populating ..
Hi ,
I am struggling to find a solution for this problem.
My managed connection factory impl has all the properties as per the java bean spec. I have also implemented hashcode and equals but i still don't see the custom outbound custom properties information populated into my ManagedConnectionFactoryImpl properties. I checked property names in both weblogic-ra.xml and ra.xml. The names are consistent.
As per this discussion (BINDING.JCA-12510 JCA Resource Adapter location error in SOA 11g Suite i saved the properties using Keyboard entered. I restarted my server and also i can see the saved values
I also verified the Plan.xml that gets created when the values are updated. Please find the provided the code snippets. Any help appreciated.
Please let me know if i need to post this in a different forum. We use weblogic 10.3.5 application server. Let me know for any more details.
Thanks,
Sri
For more information:
Following is the managed connection factory Impl
package com.cgi.cml.common.sample.connector.ra.outbound;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.PrintWriter;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Set;
import javax.resource.ResourceException;
import javax.resource.spi.ConnectionManager;
import javax.resource.spi.ConnectionRequestInfo;
import javax.resource.spi.ManagedConnection;
import javax.resource.spi.ManagedConnectionFactory;
import javax.security.auth.Subject;
public class SampleManagedConnectionFactoryImpl
implements ManagedConnectionFactory, Serializable {
private transient PropertyChangeSupport changes =new PropertyChangeSupport(this);
private String databaseFileName = "";
private String database = "";
private String user = "";
private String password = "";
private String dtdPath = "";
private String protocol = "";
private String serverAddress = "";
private Boolean debugMode = false;
private PrintWriter writer;
* Constructor for SampleManagedConnectionFactoryImpl
public SampleManagedConnectionFactoryImpl() {
* @see ManagedConnectionFactory#createConnectionFactory(ConnectionManager)
@Override
public Object createConnectionFactory(ConnectionManager cm)
throws ResourceException {
return new MomapiConnectionFactoryImpl(this, cm);
* @see ManagedConnectionFactory#createConnectionFactory()
@Override
public Object createConnectionFactory() throws ResourceException {
return new MomapiConnectionFactoryImpl(this, null);
* @see ManagedConnectionFactory#createManagedConnection(Subject, ConnectionRequestInfo)
@Override
public ManagedConnection createManagedConnection(
Subject subject,
ConnectionRequestInfo cxRequestInfo)
throws ResourceException {
System.out.println("createdManaged Connection called");
return new SampleManagedConnectionImpl(subject,cxRequestInfo);
* @see ManagedConnectionFactory#matchManagedConnections(Set, Subject, ConnectionRequestInfo)
@Override
public ManagedConnection matchManagedConnections(
Set connectionSet,
Subject subject,
ConnectionRequestInfo cxRequestInfo)
throws ResourceException {
System.out.println("match managed Connections called---->"+getDatabaseFileName());
ManagedConnection match = null;
Iterator iterator = connectionSet.iterator();
if (iterator.hasNext()) {
match = (ManagedConnection) iterator.next();
return match;
* @see ManagedConnectionFactory#setLogWriter(PrintWriter)
@Override
public void setLogWriter(PrintWriter writer) throws ResourceException {
this.writer = writer;
* @see ManagedConnectionFactory#getLogWriter()
@Override
public PrintWriter getLogWriter() throws ResourceException {
return writer;
* Checks whether this instance is equal to another.
* @param obj other object
* @return true if the two instances are equal, false otherwise
@Override
public boolean equals(Object obj)
System.out.println("equals method called");
boolean equal = false;
if (obj != null)
if (obj instanceof MomapiManagedConnectionFactoryImpl)
SampleManagedConnectionFactoryImpl other = (SampleManagedConnectionFactoryImpl) obj;
equal = (this.databaseFileName).equals(other.databaseFileName) &&
(this.database).equals(other.database) &&
(this.user).equals(other.user) &&
(this.password).equals(other.password) &&
(this.dtdPath).equals(other.dtdPath) &&
(this.protocol).equals(other.protocol) &&
(this.serverAddress).equals(other.serverAddress) &&
(this.debugMode==other.debugMode);
System.out.println("equals method returning -->"+ equal);
return equal;
* Returns the hashCode of the ConnectionRequestInfoImpl.
* @return the hash code of this instance
public int hashCode()
//The rule here is that if two objects have the same Id
//i.e. they are equal and the .equals method returns true
// then the .hashCode method must return the same
// hash code for those two objects
int hashcode = new String("").hashCode();
if (databaseFileName != null)
hashcode += databaseFileName.hashCode();
if (database != null)
hashcode += database.hashCode();
if (user != null)
hashcode += user.hashCode();
if (password != null)
hashcode += password.hashCode();
if (dtdPath != null)
hashcode += dtdPath.hashCode();
if (protocol != null)
hashcode += protocol.hashCode();
if (serverAddress != null)
hashcode += serverAddress.hashCode();
System.out.println("hascode method called and the value is -->"+hashcode);
return hashcode;
* Associate PropertyChangeListener with the ManagedConnectionFactory,
* in order to notify about properties changes.
* @param lis the PropertyChangeListener to be associated with the
* ManagedConnectionFactory
public void addPropertyChangeListener(PropertyChangeListener lis)
System.out.println("addPropertyChangeListener called");
changes.addPropertyChangeListener(lis);
* Delete association of PropertyChangeListener with the
* ManagedConnectionFactory.
* @param lis the PropertyChangeListener to be removed
public void removePropertyChangeListener(PropertyChangeListener lis)
System.out.println("removePropertyChangeListener called");
changes.removePropertyChangeListener(lis);
public String getDatabaseFileName() {
return databaseFileName;
public void setDatabaseFileName(String databaseFileName) {
this.databaseFileName = databaseFileName;
public String getDatabase() {
return database;
public void setDatabase(String database) {
System.out.println("hellloooooooooooo---->"+database);
this.database = database;
public String getUser() {
return user;
public void setUser(String user) {
this.user = user;
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;
public String getDtdPath() {
return dtdPath;
public void setDtdPath(String dtdPath) {
this.dtdPath = dtdPath;
public String getProtocol() {
return protocol;
public void setProtocol(String protocol) {
this.protocol = protocol;
public String getServerAddress() {
return serverAddress;
public void setServerAddress(String serverAddress) {
this.serverAddress = serverAddress;
public Boolean isDebugMode() {
return debugMode;
public void setDebugMode(Boolean debugMode) {
this.debugMode = debugMode;
public PrintWriter getWriter() {
return writer;
public void setWriter(PrintWriter writer) {
this.writer = writer;
weblogic-ra.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-connector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:javaee="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-connector/1.0/weblogic-connector.xsd"
xmlns="http://xmlns.oracle.com/weblogic/weblogic-connector">
<jndi-name>jca/sampleRA</jndi-name>
<enable-access-outside-app>true</enable-access-outside-app>
<outbound-resource-adapter>
<connection-definition-group>
<connection-factory-interface>javax.resource.cci.ConnectionFactory</connection-factory-interface>
<connection-instance>
<jndi-name>jca/sampleCon</jndi-name>
<connection-properties>
<properties>
<property>
<name>databaseFileName</name>
</property>
<property>
<name>database</name>
</property>
<property>
<name>user</name>
</property>
<property>
<name>password</name>
</property>
<property>
<name>dtdPath</name>
</property>
<property>
<name>protocol</name>
</property>
<property>
<name>serverAddress</name>
</property>
<property>
<name>debugMode</name>
</property>
</properties>
</connection-properties>
</connection-instance>
</connection-definition-group>
</outbound-resource-adapter>
</weblogic-connector>
ra.xml
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java/sun.com/xml/ns/j2ee/connector_1_5.xsd" version="1.5">
<display-name>MomapiConnector</display-name>
<vendor-name>CGI</vendor-name>
<eis-type>SAMPLE</eis-type>
<resourceadapter-version>1.0</resourceadapter-version>
<license>
<license-required>false</license-required>
</license>
<resourceadapter>
<resourceadapter-class>com.cgi.cml.common.sample.connector.ra.SampleResourceAdapterImpl</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>com.cgi.cml.common.sample.connector.ra.outbound.SampleManagedConnectionFactoryImpl</managedconnectionfactory-class>
<config-property>
<config-property-name>databaseFileName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>database</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>user</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>dtdPath</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>protocol</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>serverAddress</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>debugMode</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
</config-property>
<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>com.cgi.cml.common.my.connector.ra.outbound.SampleConnectionFactoryImpl</connectionfactory-impl-class>
<connection-interface>javax.resource.cci.Connection</connection-interface>
<connection-impl-class>com.cgi.cml.common.sample.connector.ra.outbound.SampleConnectionImpl</connection-impl-class>
</connection-definition>
<transaction-support>NoTransaction</transaction-support>
<reauthentication-support>false</reauthentication-support>
</outbound-resourceadapter>
</resourceadapter>
</connector>
Edited by: 931395 on May 2, 2012 7:43 AM
Edited by: 931395 on May 2, 2012 8:15 AMArun,
I tried, no luck and it is giving me the following error. Once the Plan.xml is created I am usinng "update" button on the console to redeploy the application using Plan.xml. When I take this route it gives me 2 options (1. update this application in place with new deployment plan 2. redploy this application using the following deployment files).
When I use the second option eventhough there is a change in the Plan.xml nothing happens. If I use the first option then I am getting the following exception. If I put the module-override for application then only the ear is getting deployed.
Thanks,
Sridhar
[BaseFlow] : No UpdateListener found or none of the found UpdateListeners accepts URI
<May 9, 2012 9:37:47 AM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1336570667598' for task '10'. Error is: 'weblogic.management.DeploymentException:
The application SampleApp cannot have the resource META-INF/weblogic-ra.xml updated dynamically. Either:
1.) The resource does not exist.
or
2) The resource cannot be changed dynamically.
Please ensure the resource uri is correct, and redeploy the entire application for this change to take effect.'
weblogic.management.DeploymentException:
The application SampleApp cannot have the resource META-INF/weblogic-ra.xml updated dynamically. Either:
1.) The resource does not exist.
or
2) The resource cannot be changed dynamically.
Please ensure the resource uri is correct, and redeploy the entire application for this change to take effect.
at weblogic.application.internal.flow.DeploymentCallbackFlow.addPendingUpdates(DeploymentCallbackFlow.java:375)
at weblogic.application.internal.flow.DeploymentCallbackFlow.makePendingUpdates(DeploymentCallbackFlow.java:394)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepareUpdate(DeploymentCallbackFlow.java:407)
at weblogic.application.internal.BaseDeployment$PrepareUpdateStateChange.next(BaseDeployment.java:685)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
Truncated. see log file for complete stacktrace
>
<May 9, 2012 9:37:47 AM EDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating update task for application 'SampleApp'.>
<May 9, 2012 9:37:47 AM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.management.DeploymentException:
The application SampleApp cannot have the resource META-INF/weblogic-ra.xml updated dynamically. Either:
1.) The resource does not exist.
or
2) The resource cannot be changed dynamically.
Please ensure the resource uri is correct, and redeploy the entire application for this change to take effect.
at weblogic.application.internal.flow.DeploymentCallbackFlow.addPendingUpdates(DeploymentCallbackFlow.java:375)
at weblogic.application.internal.flow.DeploymentCallbackFlow.makePendingUpdates(DeploymentCallbackFlow.java:394)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepareUpdate(DeploymentCallbackFlow.java:407)
at weblogic.application.internal.BaseDeployment$PrepareUpdateStateChange.next(BaseDeployment.java:685)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
Truncated. see log file for complete stacktrace
>
<May 9, 2012 9:37:47 AM EDT> <Error> <Console> <BEA-240003> <Console encountered the following error weblogic.management.DeploymentException:
The application SampleApp cannot have the resource META-INF/weblogic-ra.xml updated dynamically. Either:
1.) The resource does not exist.
or
2) The resource cannot be changed dynamically.
Please ensure the resource uri is correct, and redeploy the entire application for this change to take effect.
at weblogic.application.internal.flow.DeploymentCallbackFlow.addPendingUpdates(DeploymentCallbackFlow.java:375)
at weblogic.application.internal.flow.DeploymentCallbackFlow.makePendingUpdates(DeploymentCallbackFlow.java:394)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepareUpdate(DeploymentCallbackFlow.java:407)
at weblogic.application.internal.BaseDeployment$PrepareUpdateStateChange.next(BaseDeployment.java:685)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.prepareUpdate(BaseDeployment.java:439)
at weblogic.application.internal.EarDeployment.prepareUpdate(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.prepareUpdate(DeploymentStateChecker.java:220)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepareUpdate(AppContainerInvoker.java:149)
at weblogic.deploy.internal.targetserver.operations.DynamicUpdateOperation.doPrepare(DynamicUpdateOperation.java:130)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
> -
Issue with Third Party Adapter for custom JCA Connector in Oracle 11g.
Hi,
For a proof of concept, I have created my own JCA Connector. I have deployed this connector in Weblogic and it works as expected.
Now I am trying to call the JCA Connecter from the SOA Bus. For this I have create a SCA Composite with a simple Web Service to expose the composite, a Third Party Adaptor to wrap the JCA Connector and a Mediator to wire the Web Service and the Third Party Adapter together. For the Third Party Adapter I have created both the needed *.wsdl and _3P.jca file my self. The problem is that I could not find any documentation about the _3P.jca file, and it looks like it that this file is new for 11g.
After some puzzling and debugging I am able to deploy the SCA Composite with the Third Party Adapter. Though when I test the exposed Web Service with the Enterprise Manager I get errors and a stack trace. The problem is that the Record Converter I have created receives the default XMLRecord implementation (oracle.tip.adapter.fw.record.XMLRecordImpl) and not the implementation of the XMLRecord I have created my self.
So the question is does anybody know how to configure the Third Party Adapter so that it will use my custom implemenation of the XMLRecord interface (oracle.tip.adapter.api.record.XMLRecord) instead of the default implementation of the XMLRecord (oracle.tip.adapter.fw.record.XMLRecordImpl).
I would suspect that it should be configured in the _3P.jca file, though I don't know how. The following is the content of the current _3P.jca file I am using.
<adapter-config name="DiskAdapter" adapter="Disk Adapter" wsdlLocation="JCADiskConnector.wsdl"
xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<record-converter className="com.osc.jcaadapter.convert.DiskRecordConverter"/>
<connection-factory location="jndi/diskcf" adapterRef=""/>
<endpoint-interaction operation="Send" portType="Send_ptt">
<use-record-converter addonNamespace="http://somecomp.com/DiskAdapter"/>
<interaction-spec className="com.osc.jcaadapter.impl.DiskInteractionSpecImpl">
<property name="FunctionName" value="do-it"/>
</interaction-spec>
</endpoint-interaction>
</adapter-config>So I am hoping that some one knows how you should configure the Third Party Adapter so it uses my own implementation of the XMLRecord interface.Hi Simeon,
That is a good suggestion, and I would certainly try to do that if I was not making a proof of concept. It would solve my problem of not getting the sub class of the XMLRecord.
Though for making my proof of concept I found a 10g example that used sub classes of the XMLRecord, and that is why I wanted to get the same example to work on 11g.
The alternative of passing a parameter through with InteractionSpecs, is an interesting though can not solve this problem. I don't have a problem with the javax.resource.cci.Record, I can determine the implementation of that in the conversion class it self.
The problem is the XMLRecord generated by the Oracle SOA Adapter Framework, some how I need a way to influence that to generate the correct implementation of the XMLRecord.
So your post is certainly helpfull if I was not trying to get this specific problem to work :).
But I am afraid that I will end up in implementing your sugestion.
Regards
Maikel.
Edited by: M. Dierdorp on 13-aug-2010 6:34 -
How to do XMLDSig using third-party JCA providers?
Hi all,
Can anyone please let me know how to do XMLDSig using third-party JCA providers? The Sun XMLDsig documentation says that "A JSR 105 implementation SHOULD use underlying JCA engine classes, such as java.security.Signature and java.security.MessageDigest to perform cryptographic operations", but it doesn't say how to define the JCA provider programmatically. I don't want to change the Providers order in the security.properties file.
Do we need to make any changes in the JCA provider classes to work with XMLDSig and XML encrypt?
I'd appreciate your help.
JoeHow to identify whether the third party app has registered URL scheme or not. I also send a request mail to the third party app developers regarding URL scheme, but there is no reply from them.
-
What is the recommended way of connecting to repository out of WebDAV, RMI, JNDI, and JCA connector possibilities provided by CQ 5.5?
Hi dp_adusumalli,
I recognized your list of ~8 questions you posted at around the same time, as I received that same list in our customer implementation from Arif A., from the India team, visiting San Jose. :-)
I provided him feedback for most of the questions, so please check back with Arif for that info.
For this particular question, can you provide specifics for the types of interactions you are interested in?
Understanding the kinds of things you need to achieve will help determine which of the CQ/CRX interfaces is best suited for the task(s).
I've collated a few points on this subject on this page:
Manipulating the Adobe WEM/CQ JCR
Regards,
Paul -
Hot to retrieve an authenticated user for JCA in a repository service?
Hi,
I implemented a repository service wich calls an ABAP Functionmodule via JCA and RFC. This connection has to be build up with the current logged in user.
But how can I get an authenticated ep6-user in the repository service received-event? Or is it possible to do this with an ep5-user?
I don't want to use username/password.
String sapsystem = "R3SYSTEM";
IConnectorGatewayService cgService = (IConnectorGatewayService)PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
ConnectionProperties connProps = new ConnectionProperties(locale, (IPrincipal)user);
IConnection connection = cgService.getConnection(sapsystem, connProps);
In the last line I got the error message:
com.sapportals.connector.connection.ConnectionFailedException: Connection Failed: Nested Exception. Failed to get connection. Please contact your admin.
Any ideas?
Thanks.Peter, the autheticated user is available from the portal request object. Get that one in your application and read from the UME all the properties you wanna get and build your web service call with it. It looks for me straight forward, what exactly is your problem?
cheers
Maybe you are looking for
-
IViews not loading correctly - BI Admin Cockpit
Hi All, I recently installed the BI Admin cockpit on the portal and having some problem with the iViews. When I access the cockpit from the BI Administration link, the reports don't seem to load but instead just the empty standard web template is dis
-
As title says. Normally in Gantt Chart View, above the tasks there's a line which displays the contents of the cell you have selected, and allows you to edit the contents without having to double click the cell. In my case, this line is not there, an
-
Run Admin Server with multiple Managed Servers each using different userid?
We currently run separate WebLogic domain instances for each business application in a Unix environment. Each one is created using a unix userid unique to that application and which owns all the files and is used to run the process when that particul
-
SSIS 2012 Project Deploymeny Progressively Slower
I've noticed a gradual increase in the amount of time it takes for me to deploy a project to the SSIS Catalog. First of all, is there a way to deploy only specific packages or do I need to deploy the project everytime a package is added or changed? I
-
How can I delete a page I've entered into a Dashboard Window
How can I delete a page I've entered into a Dashboard Window?