You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Timothy Ward (JIRA)" <ji...@apache.org> on 2010/02/19 18:18:27 UTC
[jira] Commented: (OPENJPA-1524) ManagedRuntime does not work for
OSGi
[ https://issues.apache.org/jira/browse/OPENJPA-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835831#action_12835831 ]
Timothy Ward commented on OPENJPA-1524:
---------------------------------------
One implementation suggestion would be to use a ServiceTracker to keep track of the JTA services. This would allow for lazy lookup and also provide a notification if the service is unregistered.
This should then be possible to implement as a relatively simple subclass of RegistryManagedRuntime that overrides getTransactionManager(). I don't know if you have a nice mechanism to pass a BundleContext yet, but I don't think that should pose a significant problem.
> ManagedRuntime does not work for OSGi
> -------------------------------------
>
> Key: OPENJPA-1524
> URL: https://issues.apache.org/jira/browse/OPENJPA-1524
> Project: OpenJPA
> Issue Type: Bug
> Components: osgi
> Affects Versions: 2.0.0-beta
> Reporter: Timothy Ward
>
> In an OSGi runtime there is no TransactionManager registered in JNDI
> It is possible to use an osgi:services/ lookup, but it is much safer, and better practice to look up the resource in the OSGi service registry.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.