Announcement Announcement Module
Collapse
No announcement yet.
Multiple Instances of "Core" EJB jars Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple Instances of "Core" EJB jars

    Let's say I have a jar file with "core" business logic in it. As a part of this jar are a couple of MDB that are used to perform some tasks. This jar is then packaged as apart of each instance of the app in an ear that also contains a war. Each instance is in fact it's own "site".

    The problem I am facing is how can I dynamically specifiy the JNDI name of the MDB without resorting to ant copy filter tricks when building the ear? Is there a more generic way? And no, I can't pull the EJB jar out and just deploy that and let the web apps share.

    Thanks,
    Patrick

  • #2
    I'll try and clarify what I am asking for as this would seem to be a fairly common problem. Or maybe it didn't become a problem because all those 3rd Party Components that J2EE/EJB were supposed to create never really materialized. (Or maybe this is the reason they didn't materialize)

    Say I want to package an EJB that does some really nifty stuff. We'll call it SuperEJB. Now this is packaged up in a nice cute little JAR file with a deployment descripter and jndi-name of SuperEJB . Now, once that is done, only one app per JVM can deploy the EJB otherwise a JNDI namespace collision would occur. (Unless I am missing something there) How could the user of the packaged bean alter the JNDI name to something more app specific? Is there a standard way?

    Or how about a really cool MDB that listens to a JMS Queue? The deployment descriptor has to tell it what Queue to listen to (not only that, an app server specific deployment descriptor). Well, if I want two apps colocated in the same JVM to have different queues, how could I specify that without opening up the JAR that the MDB is in?

    Seems like I either missed a large chapter in the EJB book, or multiple instance deployment is severly limited.

    Thanks,
    Patrick

    Comment

    Working...
    X