geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: svn commit: r963537 - in /geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment: AdminObjectRefBuilder.java ResourceRefBuilder.java
Date Thu, 22 Jul 2010 15:57:56 GMT

On Jul 21, 2010, at 8:48 AM, Jarek Gawor wrote:

> On Wed, Jul 21, 2010 at 3:49 AM, David Jencks <david_jencks@yahoo.com> wrote:
>> 
>> On Jul 20, 2010, at 10:24 PM, Jarek Gawor wrote:
>> 
>>> David,
>>> 
>>> Most jndi lookups via the java namespace are supposed to return an
>>> unique instance on each lookup. If we route the java namespace lookups
>>> directly to service registry lookups we will no longer be returning
>>> unique instances because service registry lookups are cached
>>> automatically. So we really need to do what we have done before and
>>> lookup a gbean in SR and call .$getResource() on it. That also means
>>> that each gbean that implements ResourceSource interface must not
>>> implement the ServiceFactory interface where getService() calls
>>> $getResource().
>>> 
>> 
>> Does this mean that if we want to make the datasources available directly in the
osgi or aries namespace, perhaps always returning the same instance, and also want to satisfy
the uniqueness requirement for looking it up in the java: namespace, we need to register 2
services in the service registry?
> 
> Yes, I think so - if we want to lookup gbeans in service registry
> instead of the kernel registry. We could also revert the code and go
> back to old way of doing things. That is, lookup gbeans in kernel
> registry for java namespace and register service factories for these
> gbeans in service registry for osgi/aries namespace lookups.

After thinking about this a bit I think we should register the gbean for the MCF or ConnectionManager
as a service and, for javaee, use a reference that calls a createConnectionFactory() method
on this service.  This is fairly similar to what we used to do before https://issues.apache.org/jira/browse/GERONIMO-434

thanks
david jencks

> 
> Jarek


Mime
View raw message