You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by jimmy <ji...@inovelan.fr> on 2014/08/26 15:31:29 UTC

get transaction manager

Hi Im trying to use Jbpm + drools engine in karaf environnement.

Every jbpm integration example projects i've found are using spring.
But i don't want use spring.

I've already an entitymanager (using jpa transaction features)

The jbpm persistence api needs an entitymanagerfactory (i can get via
em.getEntityManagerFactory using blueprint)

But I need also an transaction manager (i see that aries provides this) -->
how can i get it ? (see reference osgiJtaTransactionManager)

Here is my blueprint but it does'nt work. -->
 Unable to start blueprint container for bundle com.inovelan.cloud.jbpm-impl
due to unresolved dependencies
[(objectClass=javax.transaction.TransactionManager)

 

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0"
xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0">

	<service interface="com.inovelan.cloud.jbpm.api.server.JbpmService">
		<bean class="com.inovelan.cloud.jbpm.impl.JbpmServiceImpl">
			
		</bean>
	</service>

	<reference id="osgiJtaTransactionManager"
interface="javax.transaction.TransactionManager"/>

	<bean class="com.inovelan.cloud.jbpm.impl.Activator">
	    <property name="transactionManager" ref="osgiJtaTransactionManager" />
		<jpa:context unitname="jbpm" property="entityManager"/>
		<tx:transaction method="*" value="Required"/>
	</bean>
	
</blueprint>












--
View this message in context: http://karaf.922171.n3.nabble.com/get-transaction-manager-tp4034925.html
Sent from the Karaf - User mailing list archive at Nabble.com.

RE: get transaction manager

Posted by Dutertry Nicolas <Ni...@HRACCESS.com>.
Hi,

I think you have to install the transaction feature.
Moreover, do not use <tx:transaction method="*" value="Required"/> in the bean "com.inovelan.cloud.jbpm.impl.Activator" because it already has a reference to the transaction manager.

Regards,
--
Nicolas Dutertry
-----Original Message-----
From: jimmy [mailto:jimmy.pannier@inovelan.fr] 
Sent: mardi 26 août 2014 15:31
To: user@karaf.apache.org
Subject: get transaction manager

Hi Im trying to use Jbpm + drools engine in karaf environnement.

Every jbpm integration example projects i've found are using spring.
But i don't want use spring.

I've already an entitymanager (using jpa transaction features)

The jbpm persistence api needs an entitymanagerfactory (i can get via em.getEntityManagerFactory using blueprint)

But I need also an transaction manager (i see that aries provides this) --> how can i get it ? (see reference osgiJtaTransactionManager)

Here is my blueprint but it does'nt work. -->  Unable to start blueprint container for bundle com.inovelan.cloud.jbpm-impl due to unresolved dependencies
[(objectClass=javax.transaction.TransactionManager)

 

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0"
xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0">

	<service interface="com.inovelan.cloud.jbpm.api.server.JbpmService">
		<bean class="com.inovelan.cloud.jbpm.impl.JbpmServiceImpl">
			
		</bean>
	</service>

	<reference id="osgiJtaTransactionManager"
interface="javax.transaction.TransactionManager"/>

	<bean class="com.inovelan.cloud.jbpm.impl.Activator">
	    <property name="transactionManager" ref="osgiJtaTransactionManager" />
		<jpa:context unitname="jbpm" property="entityManager"/>
		<tx:transaction method="*" value="Required"/>
	</bean>
	
</blueprint>












--
View this message in context: http://karaf.922171.n3.nabble.com/get-transaction-manager-tp4034925.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: get transaction manager

Posted by jimmy <ji...@inovelan.fr>.
Strange,

Restart the karaf instance solved the issue.

Thanks again.



--
View this message in context: http://karaf.922171.n3.nabble.com/get-transaction-manager-tp4034925p4034931.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: get transaction manager

Posted by jimmy <ji...@inovelan.fr>.
i don't have error anymore but my

 private TransactionManager   transactionManager;

in the activator is null  s:{



--
View this message in context: http://karaf.922171.n3.nabble.com/get-transaction-manager-tp4034925p4034930.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: get transaction manager

Posted by jimmy <ji...@inovelan.fr>.
Ok it was i don't import javax.transaction.

Thanks...



--
View this message in context: http://karaf.922171.n3.nabble.com/get-transaction-manager-tp4034925p4034929.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: get transaction manager

Posted by jimmy <ji...@inovelan.fr>.
Yes i've the feature transaction installed.

"service list | grep transaction"    gives :
 osgi.service.blueprint.namespace =
http://aries.apache.org/xmlns/transactions/v1.0.0
 osgi.service.blueprint.namespace =
http://aries.apache.org/xmlns/transactions/v1.2.0
 osgi.service.blueprint.namespace =
http://aries.apache.org/xmlns/transactions/v1.1.0
[org.apache.aries.transaction.AriesTransactionManager,
javax.transaction.TransactionManager,
javax.transaction.TransactionSynchronizationRegistry,
javax.transaction.UserTransaction,
org.apache.geronimo.transaction.manager.RecoverableTransactionManager]
 osgi.blueprint.container.symbolicname =
org.apache.aries.transaction.blueprint
 service.pid = org.apache.aries.transaction



in service list 
[org.apache.aries.quiesce.participant.QuiesceParticipant]
---------------------------------------------------------
 service.id = 652
Provided by : 
 Aries JPA Container Managed Contexts (118)

[org.apache.aries.transaction.AriesTransactionManager,
javax.transaction.TransactionManager,
javax.transaction.TransactionSynchronizationRegistry,
javax.transaction.UserTransaction,
org.apache.geronimo.transaction.manager.RecoverableTransactionManager]
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


But the bundle is always waiting for dependencies.
i've removed the <tx:transaction method="*" value="Required"/>  line. 


2014-08-26 16:13:08,190 | INFO  | rint Extender: 1 | BlueprintContainerImpl          
| 19 - org.apache.aries.blueprint.core - 1.4.0 | Bundle
com.inovelan.cloud.jbpm-impl is waiting for dependencies
[(objectClass=javax.transaction.TransactionManager)]




--
View this message in context: http://karaf.922171.n3.nabble.com/get-transaction-manager-tp4034925p4034928.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: get transaction manager

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Jimmy,

did you install the transaction feature ?

The transaction feature installs Aries JTA which provide the transaction 
manager as a service.

Regards
JB

On 08/26/2014 03:31 PM, jimmy wrote:
> Hi Im trying to use Jbpm + drools engine in karaf environnement.
>
> Every jbpm integration example projects i've found are using spring.
> But i don't want use spring.
>
> I've already an entitymanager (using jpa transaction features)
>
> The jbpm persistence api needs an entitymanagerfactory (i can get via
> em.getEntityManagerFactory using blueprint)
>
> But I need also an transaction manager (i see that aries provides this) -->
> how can i get it ? (see reference osgiJtaTransactionManager)
>
> Here is my blueprint but it does'nt work. -->
>   Unable to start blueprint container for bundle com.inovelan.cloud.jbpm-impl
> due to unresolved dependencies
> [(objectClass=javax.transaction.TransactionManager)
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0"
> xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0">
>
> 	<service interface="com.inovelan.cloud.jbpm.api.server.JbpmService">
> 		<bean class="com.inovelan.cloud.jbpm.impl.JbpmServiceImpl">
> 			
> 		</bean>
> 	</service>
>
> 	<reference id="osgiJtaTransactionManager"
> interface="javax.transaction.TransactionManager"/>
>
> 	<bean class="com.inovelan.cloud.jbpm.impl.Activator">
> 	    <property name="transactionManager" ref="osgiJtaTransactionManager" />
> 		<jpa:context unitname="jbpm" property="entityManager"/>
> 		<tx:transaction method="*" value="Required"/>
> 	</bean>
> 	
> </blueprint>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/get-transaction-manager-tp4034925.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com