This content has been marked as final. Show 5 replies
You edit the weblogic-ra.xml of your resource adapter and set enable-access-outside-app to true.
The default value is false, which means you cannot access the resource outside of the application.
Look here (http://docs.oracle.com/cd/E17904_01/web.1111/e13732/weblogic_ra_xml.htm) for more information:
"enable-access-outside-app - As stated by the J2CA 1.5 Specification, if the resource adapter is packaged within an application (in other words, within an EAR),
only components within the application should have access to the resource adapter. This element allows you to override this functionality."
Thank you for answering,
The problem with this solution, is if you set "enable-access-outside-app" to true, you will not be able to use production redeployment.
As my application should be hot patchable, I need to manage production redeployment.
In order to manage production redeployment, if an Enterprise Application includes a JCA resource adapter module, the module:
- Must be JCA 1.5 compliant
- Must implement the weblogic.connector.extensions.Suspendable interface
- Must be used in an application-scoped manner, having enable-access-outside-app set to false (the default value).
I've tried and I have a deployment exception because of versioning..
In any case, I can't understand why I need to that as i'm in the same application.
I've defined my Shared lib EAR using its MANFIEST.MF file just like that :
And I reference it from my plain EAR using deployment plan (for dynamic configuration of my solution)
Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.1 Created-By: 1.6.0_22-b04 (Sun Microsystems Inc.) Implementation-Version: 1.1.3 Implementation-Vendor: XXXXXXX Software Specification-Version: 1.1 Specification-Title: xxxx Copyright: Copyright (c) 2012 XXXXXXX Weblogic-Application-Version: 1.1.3
I use this mechanism for more than 20 EAR shared lib linked to my classical EAR. it works well, everything seems to be well deployed but the lookup from EAJ to Adaptor raised this permission Exception...
<variable-definition> ... <variable> <name>xxxxSharedLibStatus</name> <value>false</value> </variable> ... </variable-definition> <module-override> <module-name>classicalEAR.ear</module-name> <module-type>ear</module-type> <module-descriptor external="false"> <root-element>weblogic-application</root-element> <uri>META-INF/weblogic-application.xml</uri> ... <variable-assignment> <name>xxxxSharedLibStatus</name> <xpath>/weblogic-application/library-ref/[library-name="xxxx.ear"]/exact-match</xpath> </variable-assignment> ... </module-descriptor> ... <config-root xsi:nil="true"></config-root> </deployment-plan>
Thank you if you can help.
I went though WLS doc again and my understanding is that WLS does NOT officially support embedded RAR in shared lib EAR.
A shared Java EE library can be any of the following:
* standalone EJB module
* standalone Web application module
* multiple EJB modules packaged in an enterprise application
* multiple Web application modules package in an enterprise application
* single plain JAR file