Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Gemini Naming - Service Damping
Gemini Naming - Service Damping [message #813486] Mon, 05 March 2012 10:27 Go to next message
Magnus Jungsbluth is currently offline Magnus Jungsbluth
Messages: 5
Registered: July 2011
Junior Member
Hi there,

having used Gemini Naming 1.0.0.M1 together with Gemini JPA I found some issues that I would like to discuss. I'm willing to contribute code in case...

1) The OSGi Enterprise spec allows for arbitrary JNDI Names specified by osgi.jndi.service.name, yet Gemini Naming makes assumptions that a slash may not occur. Example: use "jdbc/MyDS" as JNDI name and Gemini Naming will assume that "osgi:service/jdbc/MyDS" should contain a valid OSGi filter after the second slash. The workaround is to use the longhand notation.

2) The OSGi Enterprise spec does not clearly state what a jndi provider should do in case a service is not (yet) available. I would suggest that a configurable time is waited before returning either a NamingException or the service proxy. In a dynamic environment like OSGi it is almost impossible to make sure all servcices are already there.

In case a service disapears, the spec only mandates that a replacement should be used (if available). Nothing prevents the application to wait on proxy access until either a timeout occurs or a replacement service appears. The whole point of using proxies is to damp the service dynamics.

This behaviour would also be in accordance to what blueprint does (wait until available, damp if service is lost). Apache Aries JNDI also has the feature btw.

Without this feature starting up an enterprise OSGi app with JPA and Naming becomes a real challenge. If you assume for example that DataSources are configured dynamically through ManagedServiceFactoryS, the exact point in time where a DataSource becomes available is not known.

As I said, I would be willing to write and provide a patch that:
- Uses a system property gemini.naming.wait.timeout with a default of 0
- Blocks service querying until a service is found
- Waits on rebind in the proxy implementation.

regards,
Magnus
Re: Gemini Naming - Service Damping [message #813787 is a reply to message #813486] Mon, 05 March 2012 18:00 Go to previous messageGo to next message
Michael Keith is currently offline Michael Keith
Messages: 215
Registered: July 2009
Senior Member
Hi Magnus,

Please enter a separate bug for each of (1) and (2). I don't see a problem with (1), but there are some discussion points around (2) that I would like to make sure are captured along with the enhancement request.

Thanks,
-Mike
Re: Gemini Naming - Service Damping [message #814303 is a reply to message #813787] Tue, 06 March 2012 09:35 Go to previous message
Magnus Jungsbluth is currently offline Magnus Jungsbluth
Messages: 5
Registered: July 2011
Junior Member
Done:

- bugs.eclipse.org/bugs/show_bug.cgi?id=373336

- bugs.eclipse.org/bugs/show_bug.cgi?id=373337
Previous Topic:[Gemini JPA] How Gemini JPA choose the right DBAccess version ?
Next Topic:Gemini Naming 1.0.0.M02
Goto Forum:
  


Current Time: Thu Oct 23 17:20:27 GMT 2014

Powered by FUDForum. Page generated in 0.01791 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software