You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Donald Woods <dw...@apache.org> on 2010/03/15 17:51:58 UTC

How is TransactionManagerService registered

While working on OPENJPA-1524 reported by Tim, I'm trying to figure out
how the Aries TransactionManagerService is being registered in a generic
way so our OpenJPA code will work with any TM service provider.

In looking at the Aries transaction module, I'm not seeing how it is
being registered in the ServiceRegistry with a common OSGi name that
isn't Aries specific.

transaction/transaction-manager/target/sources/org/apache/aries/transaction/Activator.java:45
-
  props.put(Constants.SERVICE_PID, getName());
  bundleContext.registerService(ManagedServiceFactory.class.getName(),
this, props);

where getName() is -
  public String getName() {
    return "org.apache.aries.transaction";
  }

Shouldn't the Aries TransactionManagerService also be registered as
"javax.transaction.TransactionManager" or is that being handled outside
of the BundleActivator code?


-Donald

Re: How is TransactionManagerService registered

Posted by Brian De Pradine <PR...@uk.ibm.com>.
Hi Donald,

The interfaces are registered in the 
org.apache.aries.transaction.TransactionManagerService.start() method.

Cheers

Brian DePradine
Web Services Development
IBM Hursley
External  +44 (0) 1962 816319         Internal 246319

If you can't find the time to do it right the first time, where will you 
find the time to do it again?


alasdair.nottingham@gmail.com wrote on 15/03/2010 17:13:51:

> [image removed] 
> 
> Re: How is TransactionManagerService registered
> 
> Alasdair Nottingham 
> 
> to:
> 
> aries-dev
> 
> 15/03/2010 17:14
> 
> Sent by:
> 
> alasdair.nottingham@gmail.com
> 
> Please respond to aries-dev
> 
> It looks like it gets registered as a result of a config admin change.
> In any case if you look in the service registry using the
> javax.transaction.TransactionManager interface you should be able find
> it. This is part of the upcoming enterprise osgi specification.
> 
> Alasdair
> 
> On 15 March 2010 16:51, Donald Woods <dw...@apache.org> wrote:
> > While working on OPENJPA-1524 reported by Tim, I'm trying to figure 
out
> > how the Aries TransactionManagerService is being registered in a 
generic
> > way so our OpenJPA code will work with any TM service provider.
> >
> > In looking at the Aries transaction module, I'm not seeing how it is
> > being registered in the ServiceRegistry with a common OSGi name that
> > isn't Aries specific.
> >
> > transaction/transaction-manager/target/sources/org/apache/aries/
> transaction/Activator.java:45
> > -
> >  props.put(Constants.SERVICE_PID, getName());
> >  bundleContext.registerService(ManagedServiceFactory.class.getName(),
> > this, props);
> >
> > where getName() is -
> >  public String getName() {
> >    return "org.apache.aries.transaction";
> >  }
> >
> > Shouldn't the Aries TransactionManagerService also be registered as
> > "javax.transaction.TransactionManager" or is that being handled 
outside
> > of the BundleActivator code?
> >
> >
> > -Donald
> >
> 
> 
> 
> -- 
> Alasdair Nottingham
> not@apache.org






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






Re: How is TransactionManagerService registered

Posted by Alasdair Nottingham <no...@apache.org>.
It looks like it gets registered as a result of a config admin change.
In any case if you look in the service registry using the
javax.transaction.TransactionManager interface you should be able find
it. This is part of the upcoming enterprise osgi specification.

Alasdair

On 15 March 2010 16:51, Donald Woods <dw...@apache.org> wrote:
> While working on OPENJPA-1524 reported by Tim, I'm trying to figure out
> how the Aries TransactionManagerService is being registered in a generic
> way so our OpenJPA code will work with any TM service provider.
>
> In looking at the Aries transaction module, I'm not seeing how it is
> being registered in the ServiceRegistry with a common OSGi name that
> isn't Aries specific.
>
> transaction/transaction-manager/target/sources/org/apache/aries/transaction/Activator.java:45
> -
>  props.put(Constants.SERVICE_PID, getName());
>  bundleContext.registerService(ManagedServiceFactory.class.getName(),
> this, props);
>
> where getName() is -
>  public String getName() {
>    return "org.apache.aries.transaction";
>  }
>
> Shouldn't the Aries TransactionManagerService also be registered as
> "javax.transaction.TransactionManager" or is that being handled outside
> of the BundleActivator code?
>
>
> -Donald
>



-- 
Alasdair Nottingham
not@apache.org