dev@glassfish.java.net

Re: JNDI Timing/OSGi bundle

From: Ancoron Luciferis <ancoron.luciferis_at_googlemail.com>
Date: Wed, 06 Apr 2011 23:44:01 +0200

On 04/06/2011 10:15 PM, Robert Weeks wrote:
> Hello -
>
> We are using OSGi bundles which are referencing some jms resources that were defined in the initial setup of GlassFish (3.1).
>
> In 3.0.1 - when a restart of the domain took place, there was no issue with the lookup within the bundle, but it seems that in 3.1 - there is intermittent possibility of the lookup not being able to be found when the bundle is started - resulting in an exception being thrown.
>
> If I do a simple refresh of the bundle id (in the gogo shell), it finds it OK. So it seems there is a timing issue now on when the custom lookups are available.
>
> Has something changed with the jndi tree registering with 3.1 that would make this not be seen in time? This is worrisome because we need to make sure that the resources are available to us when the app is launched/re-launched.
>
> Thanks for any information.
>

Hi Robert,

I also use JMS in an OSGi bundle but I don't had any problems yet.

As I don't know how you're accessing the JMS resource(s) in particular I
just mention my setup for comparison:

* OSGi Service automatically exported by an EJB (Export-EJB header)
* reference to JMS resources via @Resource inside the EJB

...and that's it. Also I use the EMBEDDED configuration, as it turned
out, that LOCAL doesn't work out well, yet (not even with a standalone
domain config).


Maybe this gives you some pointers or you just present your way, to be
able to get more specific help.


Cheers,

        Ancoron

>
>
> Robert Weeks
> Senior Software Developer
> EXTENSION, INC.
> Email: rweeks_at_ext-inc.com
> Office: 260-797-0200 x4228
> General: 877-207-3753
> www.OpenTheRedBox.com
>
> Download the FREE EXTENSION Mobile App for iPhone and iPod Touch
> http://www.opentheredbox.com/iPhone_appDemo.php
>
> Email us at demo_at_ext-inc.com <mailto:demo_at_ext-inc.com> to pre-schedule a LIVE demo for our HealthAlert for Nurses solution at the AONE Conference in San Diego. Visit us at booth #118
>
>
>