Globally, you need to provide a transaction to the UserModule.
more detail :
the UserModule uses hibernate to query the database about the user.
it will do so inside a JTA transaction, for all the advantages of using transactions with
database processing.
but, the user module does not build it's own transaction.
it must be provided by the container.
the container provide the transaction to any instance who ask for it.
This is usually done by injection.
in the portlets, the injection of the transaction is done by adding the "transaction
required" element in the portlet descriptor. This is in the jboss-portlet.xml
description file.
you can see this in the jboss-portlet.xml that is in the identity module (see the identity
sar)
in your servlet, there is no (not yet) the transaction injection, for the user module.
you have to tell that your servlet processing needs a transaction.
that's where I am not sure anymore : I don't know much about the servlet.
but I guess that with some annotation, you should get this transaction injected on the
servlet methods etc...
search in the web about : transaction injection servlet tomcat etc...
look also about the transaction manager of jboss : may be also possible to call it by jndi
and get the current transaction for the current thread etc...
look also at hibernate / transaction / injection etc...
hope this help for a start
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138240#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...