J2EE Connector Architecture + EAR

Hi,

I am trying to package a JCA RAR inside an EAR but there doesnt seem to be an IntelliJ module that will allow me to do this. Am I missing something (I dont typically work with J2EE EAR/EJB).

We've got an EJB module and two JCA resources that we want built. (J2EE 1.3, Weblogic 8.1 SP4, IDEA 4.5).

Unfortunately, if I use an EJB module it requires the EJB xml descriptors to exist or define at least 1 EJB.

Recommendations?

Thanks,

-Tim

5 comments

The only way I could find to do it was to use an ant script to build my project.

0

I created a feature request for allowing archives and files other than EJB or Web modules to be added to the Application module so please vote on it if you need it.
http://www.jetbrains.net/jira/browse/IDEA-4866

0

I finally got something going. I had to do the RAR resource renaming in one of the EJBs. I have attached a brief description of my project incase someone else runs into the same situation. The only way I could get the JARs to be deployed where I wanted them was to have them as dependancies as part of an EJB.

I'm curious why the ALT-DD tag in application.xml is so crippled. If anything, it should be the JNDI names that should be overwritten, not the generic deployment descriptor. Because of that, I had to create 2 new projects and deploy 2 additional jars, instead of a single jar for the component and deploy the same component multiple times in the application.xml.

-



Library:MyProjectLevelLibrary
All common libraries stored in the EAR module APP-INF/lib directory

Library:Weblogic
weblogic 8.1sp4 jar

Java Module:MyCommonCode
src/...
src/log4j.properties
src/.../Logging.java
finds and inits log4j using the log4j.properties
loads Properties files using streams
uses Thread classloader, then Logging.class classloader to find the file

Library -> MyProjectLevelLibrary

Java Module:MyResourceAdapter
src/...

Module Settings -> Dependancies -> MyCommonCode

Library -> MyProjectLevelLibrary
Library -> Weblogic (needed for J2EE bindings)

Java Module:MyBatchResourceAdapterOnPort4000
src/META-INF/ra.xml
src/META-INF/weblogic-ra.xml

Module Settings -> Dependancies -> MyResourceAdapter
Module Settings -> Order/Export -> MyResourceAdapter

Java Module:MySyncResourceAdapterOnPort4004
src/META-INF/ra.xml
src/META-INF/weblogic-ra.xml

Module Settings -> Dependancies -> MyResourceAdapter
Module Settings -> Order/Export -> MyResourceAdapter

EJB Module:MyEJB
src/

Library -> MyProjectLevelLibrary
Library -> Weblogic

J2EE Build Settings -> EJB Module Jar File -> MyEJB.jar

Module Settings -> Dependancies -> MyBatchResourceAdapterOnPort4000
Module Settings -> Dependancies -> MySyncResourceAdapterOnPort4004
Library -> MyProjectLevelLibrary

EJB Module Settings -> Packaging -> MyBatchResourceAdapterOnPort4000
JAR module, link via manifest, copy to relative path: /MyRAR-X.rar

EJB Module Settings -> Packaging -> MySyncResourceAdapterOnPort4004
JAR module, link via manifest, copy to relative path: /MyRAR-Y.rar

EJB Module Settings -> Packaging -> MyCommonCode
JAR module, link via manifest, copy to relative path: /APP-INF/lib/MyCommonCode.rar

EJB Module Settings -> Packaging -> MyResourceAdapter
JAR module, link via manifest, copy to relative path: /APP-INF/lib/MyResourceAdapter.jar

EJB Module Settings -> Packaging -> MyProjectLevelLibrary
Link via manifest, copy to relative path: /APP-INF/lib


Application Module: MyEAR

J2EE Application Module Settings -> Modules and libraries -> MyEJB
Include module in build, relative path: MyEJB.jar

Road to discovery, it works!!! MyEJB.jar MyRAR-X MyRAR-Y J2EE Build Settings -> Application Archive ->]]> MyEAR.ear

0

What my previous post just goes to highlight is that there HAS to be an easier way to set things up. As it is, I cannot create an APP-INF/classes. Slightly more additional flexibility is needed over how things get packaged.

0

Please sign in to leave a comment.