Search code examples
glassfishjava-ee-6glassfish-3ear

Designing a pluggable app as multiple EARs in Java EE 6


I'm kinda new to Java EE 6 and most of what I'm reading is tutorial-oriented, simple cases. I can't find an answer to pretty basic question, so looking to you guys for help.

I have a system I am designing to have pluggable components in a Java EE 6 App Server (Glassfish v3). There will always be a core (deployed as an EAR), and then a series of pluggable components that may or may not be deployed on any given app server, each one of which is packaged as an EAR itself.

Is this a reasonable design? Will transactions work across EJBs that are live in separate EARs? Can EJBs in one ear send JMS messages that are consumed by MDBs in another EAR?

This related question was inconclusive.


Solution

  • Will transactions work across EJBs that are live in separate EARs?

    Yes but you need to use JTA

    Can EJBs in one ear send JMS messages that are consumed by MDBs in another EAR?

    Yes and that is the whole point of message queuing.