You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lloyd Davies <ll...@gamesys.co.uk> on 2005/07/29 13:28:23 UTC

Maven, EJBs and clashing JNDI names

Hi all,

 

I hope I have correctly registered myself on this mailing list.

 

My company have recently migrated their java projects from Ant to Maven.
It's has all gone pretty smoothly until now.

 

We have a number of components, including ears, ejb-jars, jars etc. 2 of my
ears contain the same ejb jar file. I would like to deploy both of these
ears to the same instance of JBoss but I can't because the jndi names for
the EJBs inside the common ejb-jar files are the same and therefore clash on
deployment.

 

Can anyone tell me how I can handle this without breaking Maven's best
practices and making the 2 copies of the ejb-jar file different?

 

Many thanks,

Lloyd.


Re: Maven, EJBs and clashing JNDI names

Posted by Jesse McConnell <je...@gmail.com>.
or have a subproject seperating those ejbs out so they get differen
ejb-jar.xml files

like 

/code
/ejb1
/ejb2

where the code is the shared stuff and is a dependency of both, but
you can stick different resources in the subdirs of ejb1 and ejb2

On 7/29/05, Lloyd Davies <ll...@gamesys.co.uk> wrote:
> Thanks for the idea! I hadn't considered that.
> 
> We could do that. However, I think it would have a big impact on
> performance; we would need to use remote interfaces instead of local ones
> and, since our deployments are scoped, we'd have to turn on Call-By-Value
> option in JBoss which I understand would also affect performance.
> 
> I think that would rule this option out.
> 
> Thanks,
> Lloyd.
> 
> -----Original Message-----
> From: Adam Hardy [mailto:adam.maven@cyberspaceroad.com] 
> Sent: 29 July 2005 16:51
> To: Maven Users List
> Subject: Re: Maven, EJBs and clashing JNDI names
> 
> Lloyd Davies on 29/07/05 12:28, wrote:
> > My company have recently migrated their java projects from Ant to Maven.
> > It's has all gone pretty smoothly until now.
> > 
> >  
> > 
> > We have a number of components, including ears, ejb-jars, jars etc. 2 of
> my
> > ears contain the same ejb jar file. I would like to deploy both of these
> > ears to the same instance of JBoss but I can't because the jndi names for
> > the EJBs inside the common ejb-jar files are the same and therefore clash
> on
> > deployment.
> > 
> > Can anyone tell me how I can handle this without breaking Maven's best
> > practices and making the 2 copies of the ejb-jar file different?
> 
> Can you seperate out that EJB into its own EAR?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.9.7/60 - Release Date: 28/07/2005
>  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


-- 
--
jesse mcconnell

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven, EJBs and clashing JNDI names

Posted by Matthew L Daniel <md...@scdi.com>.
>> Can you seperate out that EJB into its own EAR?
> We could do that. However, I think it would have a big impact on
> performance; we would need to use remote interfaces instead of local ones

I don't claim to be an EJB expert, but it is my understanding that Local
(vs Remote) is the distinction between intra and extra-VM (or AppServer
instance), not per deployment artifact. Thus, just splitting it out into
two separate EARs would not invalidate Local interfaces.

My proposed alternate would be the injection of custom deployment
descriptors immediately before bundling the EJB (or whatever) artifact,
so the ejb:deploy'ed artifact would be AS neutral and only when it is
"consumed" by an application would it be "branded" with the DD.

If you are discussing M1, then maven.xml and a preGoal could do this. 

If you are using M2 then I'll defer to more experienced persons but from
what I know of M2, you'd write a PreBundleDDInjector plugin so everyone
will benefit from your experiences.

  My USD$0.02,
  -- /v\atthew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Maven, EJBs and clashing JNDI names

Posted by Lloyd Davies <ll...@gamesys.co.uk>.
Thanks for the idea! I hadn't considered that.

We could do that. However, I think it would have a big impact on
performance; we would need to use remote interfaces instead of local ones
and, since our deployments are scoped, we'd have to turn on Call-By-Value
option in JBoss which I understand would also affect performance.

I think that would rule this option out.

Thanks,
Lloyd.

-----Original Message-----
From: Adam Hardy [mailto:adam.maven@cyberspaceroad.com] 
Sent: 29 July 2005 16:51
To: Maven Users List
Subject: Re: Maven, EJBs and clashing JNDI names

Lloyd Davies on 29/07/05 12:28, wrote:
> My company have recently migrated their java projects from Ant to Maven.
> It's has all gone pretty smoothly until now.
> 
>  
> 
> We have a number of components, including ears, ejb-jars, jars etc. 2 of
my
> ears contain the same ejb jar file. I would like to deploy both of these
> ears to the same instance of JBoss but I can't because the jndi names for
> the EJBs inside the common ejb-jar files are the same and therefore clash
on
> deployment.
> 
> Can anyone tell me how I can handle this without breaking Maven's best
> practices and making the 2 copies of the ejb-jar file different?

Can you seperate out that EJB into its own EAR?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.9.7/60 - Release Date: 28/07/2005
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven, EJBs and clashing JNDI names

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Lloyd Davies on 29/07/05 12:28, wrote:
> My company have recently migrated their java projects from Ant to Maven.
> It's has all gone pretty smoothly until now.
> 
>  
> 
> We have a number of components, including ears, ejb-jars, jars etc. 2 of my
> ears contain the same ejb jar file. I would like to deploy both of these
> ears to the same instance of JBoss but I can't because the jndi names for
> the EJBs inside the common ejb-jar files are the same and therefore clash on
> deployment.
> 
> Can anyone tell me how I can handle this without breaking Maven's best
> practices and making the 2 copies of the ejb-jar file different?

Can you seperate out that EJB into its own EAR?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Maven, EJBs and clashing JNDI names

Posted by Lloyd Davies <ll...@gamesys.co.uk>.
This looks perfect! I can leave my ejb jars intact and externalise the
deployment config. Thanks for your help!

-----Original Message-----
From: David Jencks [mailto:david_jencks@yahoo.com] 
Sent: 30 July 2005 08:39
To: Maven Users List
Subject: Re: Maven, EJBs and clashing JNDI names

Can't you do something with an alt-dd specified in the application.xml? 
  I'm not familiar with what jboss is doing now with vendor plans, but 
if they aren't required to be in the ejb-jar they would also not 
collide.

Alternatively if you wish to live very dangerously :-) you could use 
geronimo which does not have a name collision problem between 
applications.

david jencks

On Jul 29, 2005, at 4:28 AM, Lloyd Davies wrote:

> Hi all,
>
>
>
> I hope I have correctly registered myself on this mailing list.
>
>
>
> My company have recently migrated their java projects from Ant to 
> Maven.
> It's has all gone pretty smoothly until now.
>
>
>
> We have a number of components, including ears, ejb-jars, jars etc. 2 
> of my
> ears contain the same ejb jar file. I would like to deploy both of 
> these
> ears to the same instance of JBoss but I can't because the jndi names 
> for
> the EJBs inside the common ejb-jar files are the same and therefore 
> clash on
> deployment.
>
>
>
> Can anyone tell me how I can handle this without breaking Maven's best
> practices and making the 2 copies of the ejb-jar file different?
>
>
>
> Many thanks,
>
> Lloyd.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.9.7/60 - Release Date: 28/07/2005
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven, EJBs and clashing JNDI names

Posted by David Jencks <da...@yahoo.com>.
Can't you do something with an alt-dd specified in the application.xml? 
  I'm not familiar with what jboss is doing now with vendor plans, but 
if they aren't required to be in the ejb-jar they would also not 
collide.

Alternatively if you wish to live very dangerously :-) you could use 
geronimo which does not have a name collision problem between 
applications.

david jencks

On Jul 29, 2005, at 4:28 AM, Lloyd Davies wrote:

> Hi all,
>
>
>
> I hope I have correctly registered myself on this mailing list.
>
>
>
> My company have recently migrated their java projects from Ant to 
> Maven.
> It's has all gone pretty smoothly until now.
>
>
>
> We have a number of components, including ears, ejb-jars, jars etc. 2 
> of my
> ears contain the same ejb jar file. I would like to deploy both of 
> these
> ears to the same instance of JBoss but I can't because the jndi names 
> for
> the EJBs inside the common ejb-jar files are the same and therefore 
> clash on
> deployment.
>
>
>
> Can anyone tell me how I can handle this without breaking Maven's best
> practices and making the 2 copies of the ejb-jar file different?
>
>
>
> Many thanks,
>
> Lloyd.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org