users@glassfish.java.net

Re: Deploying POJOs in GlassFish

From: <glassfish_at_javadesktop.org>
Date: Thu, 05 Jun 2008 14:54:09 PDT

I want to expose 2 kinds of services.

1. Infrastructure Services :- POJOs that can do logging, auditing etc

2. Business Logic Services: POJOs that would have the business logic
written (called over JNI) based on our user input. For example: on
user input we would need to stop this POJO or create new ones (so that
they can be looked up by name) in runtime.

The methods exposed by these POJOs would be invoked either by servlets
or EJBs that are deployed in the application server. But these POJOs
need to be looked up by name over JNDI.

Is the OSGi service registry or the HK2 service registry available for
look up from some EJB or servlet that is running in the app server?

From what I have learned from the documentation and the samples is
that the HK2 or OSGi bundles are more for infrastructure services or
customizing the runtime and should not have business logic.

I know I have other options like writing the business logic in EJBs
but I wanted to know if there was a way to deploy these POJOs in the
environment without the overhead of the EJB container.

Thanks for the reply Sahoo...

-Shreyas
[Message sent by forum member 'shreyasshinde' (shreyasshinde)]

http://forums.java.net/jive/thread.jspa?messageID=278641