users@glassfish.java.net

Re: Can I use a RAR for things other than JMS

From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
Date: Fri, 14 Dec 2007 12:22:04 +0530

On Fri, 2007-12-14 at 05:58 +0000, Stephen Connolly wrote:
> We have a number of resources that need to be, essentially, server
> singletons shared across all applications on the server instance.
>
> These singletons manage access to an off-server resource via a TCP &
> UDP messaging stack and then map those messages into an object model
> with the observer event model.
>
> I don't want to have each enterprise app forking a new TCP & UDP set
> of channels with event parsers building the object model and
> propagating events as this will generate extra load on the far end
> (which has limited resources)
>
> To my mind the RAR fits exactly what I want, but mostly I just see
> things that can be mapped to JMS.
>
Yes, ResourceAdapter will help to solve this issue. JMS support to
app.server happens through ResourceAdapter. Any type of external system
can be made (by developing a RAR) accessible to application deployed in
the app. server.
> How will this look to deployers, how will they configure the JNDI
> lookups? Will those using our API be able to just use resource
> injection to get our singleton...
They will lookup a connector resource.
>
> @Resource
> private com.mycompany.MyStackConnectionProxyFactory myStack;
Yes, possible.
>
> How will they package their applications? If they include the rar will
> that result in two connections again (which they get with the current
> jar approach that we use), or will the container see that it's the
> same rar as already deployed and expose that rar's classloader through
> some fancy rar magic.
RAR will be deployed separately. Applications will use resources.
(connector resource).

You can refer
http://java.sun.com/javaee/reference/code/index.jsp
J2EE 1.4 sample apps : /j2ee14/connectors/apps/mailconnector


Thanks,
- Jagadish
>
> I've more questions, but I think they can wait for now!
>
> -Stephen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>