public void stop(BundleContext ctx) throws Exception { OSGiManagedRuntime.deregisterServiceListener(ctx); if (svcReg != null) { svcReg.unregister(); svcReg = null; } this.ctx = null; }
@Override public void setRollbackOnly(Throwable cause) throws Exception { // there is no generic support for setting the rollback cause getTransactionManager().getTransaction().setRollbackOnly(); }
public void start(BundleContext ctx) throws Exception { this.ctx = ctx; PersistenceProvider provider = new PersistenceProviderImpl(); Hashtable<String, String> props = new Hashtable<String, String>(); // Aries queries for service providers by property "javax.persistence.provider" props.put(PERSISTENCE_PROVIDER_ARIES, OSGI_PERSISTENCE_PROVIDER); // The persistence service tracker in the geronimo spec api bundle examines // the property named "javax.persistence.PersistenceProvider" rather than // the the property provided for Aries. In order to properly track the OpenJPA // provider, this property must be set upon service registration. props.put(PERSISTENCE_PROVIDER, OSGI_PERSISTENCE_PROVIDER); svcReg = ctx.registerService(PERSISTENCE_PROVIDER, provider, props); OSGiManagedRuntime.registerServiceListener(ctx); }
@Override public void setRollbackOnly(Throwable cause) throws Exception { // there is no generic support for setting the rollback cause getTransactionManager().getTransaction().setRollbackOnly(); }
public void start(BundleContext ctx) throws Exception { this.ctx = ctx; PersistenceProvider provider = new PersistenceProviderImpl(); Hashtable<String, String> props = new Hashtable<String, String>(); // Aries queries for service providers by property "javax.persistence.provider" props.put(PERSISTENCE_PROVIDER_ARIES, OSGI_PERSISTENCE_PROVIDER); // The persistence service tracker in the geronimo spec api bundle examines // the property named "javax.persistence.PersistenceProvider" rather than // the the property provided for Aries. In order to properly track the OpenJPA // provider, this property must be set upon service registration. props.put(PERSISTENCE_PROVIDER, OSGI_PERSISTENCE_PROVIDER); svcReg = ctx.registerService(PERSISTENCE_PROVIDER, provider, props); OSGiManagedRuntime.registerServiceListener(ctx); }
public void stop(BundleContext ctx) throws Exception { OSGiManagedRuntime.deregisterServiceListener(ctx); if (svcReg != null) { svcReg.unregister(); svcReg = null; } this.ctx = null; }
@Override public void setRollbackOnly(Throwable cause) throws Exception { // there is no generic support for setting the rollback cause getTransactionManager().getTransaction().setRollbackOnly(); }
public void start(BundleContext ctx) throws Exception { this.ctx = ctx; PersistenceProvider provider = new PersistenceProviderImpl(); Hashtable<String, String> props = new Hashtable<String, String>(); // Aries queries for service providers by property "javax.persistence.provider" props.put(PERSISTENCE_PROVIDER_ARIES, OSGI_PERSISTENCE_PROVIDER); // The persistence service tracker in the geronimo spec api bundle examines // the property named "javax.persistence.PersistenceProvider" rather than // the the property provided for Aries. In order to properly track the OpenJPA // provider, this property must be set upon service registration. props.put(PERSISTENCE_PROVIDER, OSGI_PERSISTENCE_PROVIDER); svcReg = ctx.registerService(PERSISTENCE_PROVIDER, provider, props); OSGiManagedRuntime.registerServiceListener(ctx); }
public void stop(BundleContext ctx) throws Exception { OSGiManagedRuntime.deregisterServiceListener(ctx); if (svcReg != null) { svcReg.unregister(); svcReg = null; } this.ctx = null; }
@Override public void setRollbackOnly(Throwable cause) throws Exception { // there is no generic support for setting the rollback cause getTransactionManager().getTransaction().setRollbackOnly(); }
public void start(BundleContext ctx) throws Exception { this.ctx = ctx; PersistenceProvider provider = new PersistenceProviderImpl(); Hashtable<String, String> props = new Hashtable<String, String>(); // Aries queries for service providers by property "javax.persistence.provider" props.put(PERSISTENCE_PROVIDER_ARIES, OSGI_PERSISTENCE_PROVIDER); // The persistence service tracker in the geronimo spec api bundle examines // the property named "javax.persistence.PersistenceProvider" rather than // the the property provided for Aries. In order to properly track the OpenJPA // provider, this property must be set upon service registration. props.put(PERSISTENCE_PROVIDER, OSGI_PERSISTENCE_PROVIDER); svcReg = ctx.registerService(PERSISTENCE_PROVIDER, provider, props); OSGiManagedRuntime.registerServiceListener(ctx); }
public void stop(BundleContext ctx) throws Exception { OSGiManagedRuntime.deregisterServiceListener(ctx); if (svcReg != null) { svcReg.unregister(); svcReg = null; } this.ctx = null; }