users@glassfish.java.net

Re: JBoss SAR replacement

From: Binod <Binod.Pg_at_Sun.COM>
Date: Mon, 24 Sep 2007 16:58:42 +0530

Jörg Henne wrote:
> Binod schrieb:
>> Jörg Henne wrote:
>>>
>>> * Deploy services other than J2EE apps. Think, for example,
>>> implementations of classic UNIX services like NFS, TFTP etc.
>> What exactly your app do? Would resource adapters (JSR 112) be a choice?
> we are using SARs for a host of different use cases. Providing
> services to the outside (not within the application server!) like in
> the example I gave, which should be present once the application
> server is up is the most common tune. Other use cases could be
> replaced by using timer beans.
> RAs are not an option, I'm afraid, because they don't - to my current
> knowledge - sport life-cycle hooks: they are initialized
JSR 112 specifies lifecycle of resource adapters.
http://java.sun.com/javaee/5/docs/api/javax/resource/spi/ResourceAdapter.html
Please look at the start() method of the RA. They do get invoked during
AS startup.
http://java.sun.com/javaee/5/docs/tutorial/doc/bnckb.html
> only when their services are requested for the first time. Let's look
> at the TFTP example: in that case we need to provide the TFTP service
> by opening the corresponding port for UDP communication as soon as the
> AS is up. There is no Web
If you want to wrap a specific protocol into a portable application,
then resource adapters
is the way to go. Note that you can also feed the incoming (non-jms)
traffic to an MDB.
> Application or EJB requesting the service by looking up a RA
> connection from JNDI and therefor no way to launch the service.
That is correct from a connector 1.0 perspective. Connector 1.5 has
improved on that
quite a bit.

thanks,
Binod.
>
> Joerg Henne
>