You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wim Lambrecht <wi...@schaubroeck.be> on 2004/03/24 10:56:52 UTC

EJB Deployment descriptor configuration

Hi there,
 
This is actually a 'configuration' issue.
 
i have the following situation:
I want to assemble an J2EE application (ear) which consist of 2
EJB-JARS.
One of de EJB-JARS contains 'common' stuff (let's say, like
user-management, authentication, authorisation) and is an artifact
created via a seperate maven project (so, is independant of my project).
Let's call this one the COMMON-EJB.jar. Its contains all the usual
stuff, including the corresponding deployment descriptor "DD" (which is
the configurable part).
 
Now, this COMMON-EJB.jar is used in my current project and will be
packaged in the final production EAR. But, and this is the issue, i want
to re-configure the deployment descriptor (in my application context)
just before the EAR-packaging. I know that, if done manually, this is no
problem, but i'm looking for an automated way. 
Manually i should take the COMMON-EJB.jar, unjars it, change the DD to
my wishes, jar it again, and then use it in my EAR. 'Automated' is
something like:  the desired changes for the DD are described somewhere,
and some script (plugin, pregoal, whatever) applies those changes to the
original DD (by the way, DD doesn't support inheritance, like the
properties-cascade in Maven does). Which is then used in the production
EAR. 
Of course, the latter, involves some unjar/rejar too, but it should be
ideal that configuration takes place in an automated manner IN the
current project. 
So, in the end (in my project built), type 'maven' in the command line,
and that's it.
 
Any ideas, feelings, ...?
 
t i a
-wil-
 
P.S.
1. the EJB-jars in the common and in my project are built with the maven
xdoclet plugin. No problem in that matter.
2. what re-configurations do i have in mind ? Well: change
transaction-types on bean-methods ; add resourcerefs - like DataSources
- on enterprise beans, ... the usual stuff a deployer does, ... The
session-bean <> entity bean relations (ejbrefs) for instance can remain
xdoclet-generated IMHO. but here i don't want to (xdoclet)generate the
common beans things again, they should still be provided as a EJBJAR
generated in that other project earlier).
3. in fact, i guess this is a common issue, no ? Not only EJB Deployment
Descriptors, but all configurable things linked to (packaged inside) a
deliverable (properties-files, EAR DD's, WAR web-inf, etc.), will sooner
or later in de deploy-proces needs some re-configuration. But it should
be nice that this configurations   be applied automatically.