users@glassfish.java.net

EJB, SOAP, loose coupling and portability?

From: Kristian Rink <lists_at_zimmer428.net>
Date: Thu, 16 Oct 2008 10:08:04 +0200

Folks;

again being dumped into kind of an architectural question where I both lack
experience and knowledge of where to look / read to get a good clue, hoping
for some kind hints on that. I'm still into partly restructuring our system,
mainly wanting to make use of EJBs and web applications along with Glassfish
and NetBeans IDE, wanting to address the following requirements:

- Applications should be loosely coupled; specifically we do want to be
capable of deploying application (EJB,war) modules seperately from each
other without having to redeploy all "dependencies" these modules are using.

- Applications should be deployable to different servers (local test,
staging test, production) without requiring any reconfiguration (i.e.
service references / SOAP endpoint URLs, ...).

- Communication between applications should allow for using both
asynchronous and synchronous approaches.

So far we're playing with NetBeans ant projects and maven2 artifacts, with
different results:

- Using EJB remoting, it _seems_ (my experience so far - maybe I just didn't
figure out how to do it right...) that as soon as redeploying an EJB module,
modules depending upon EJBs in this module (injected via @EJB annotation)
cease working because the EJB references aren't there anymore.

- Using SOAP remoting and (NetBeans generated) Web Service clients is rather
good so far, except for that the endpoint URL (http://hostname:port/...) is
hard-coded in the auto-generated stubs, so moving the stuff between staging
and production system always ends up at the very least in manually modifying
and rebuilding code which is not desirable in my opinion.

- Using an EAR would make us capable of using EJB remoting but would leave
us with a much more coarse-grained packaging where redeploying simple
modules is not that easy anymore.


So asking the EJB/Glassfish/NetBeans pro's: Any suggestions on how to get
out of this? Using EAR and assuming this is the best we can get? Using EJB
remoting and accepting that redeploying specific modules will end up in
having to redeploy others as well? Using SOAP remoting and either messing
with the hard-coded URL references or eventually filing an issue against
NetBeans tooling requesting to make this configurable? Any other options I
missed so far?

Any hints, especially documentation pointers on those packaging aspects of
Java EE applications, much appreciated. :)

Cheers & best regards,
Kristian


-- 
Kristian Rink
cell    :  +49 176 2447 2771
business: http://www.planconnect.de
personal: http://pictorial.zimmer428.net
"we command the system. calling all recievers.
we are noisy people for a better living".
(covenant - "monochrome")