users@glassfish.java.net

Re: Deploying POJOs in GlassFish

From: Sahoo <Sahoo_at_Sun.COM>
Date: Wed, 04 Jun 2008 22:51:12 -0700

I am assuming you are using GFv3. Writing HK2 or OSGi bundle is the only
option. Since we don't publish any user defined services to JNDI by
default, you have to do that. Let me ask a few questions to you.
What is your use case?
What kind of services are you going to publish to JNDI?
How are you going to look them up from some other modules?
Why do you want to communicate using JNDI and not the HK2 service
registry(Habitat api) or OSGi service registry that's available when you
run in GFv3?

Thanks,
Sahoo

Shreyas Shinde wrote:
> Hello,
>
> I am trying to deploy POJOs (plain java classes) into the application
> server so that I can access them by name over JNDI. I don't want to
> use the EJB or the Servlet model for this and wanted to know if there
> is any way I could do this.
>
> I have looked into writing service modules for HK2 and OSGi but I am
> not sure if it is the right approach for this.
>
> Is there a good approach for doing this?
>
> Thanks,
>
>