This content has been marked as final.
Show 6 replies
-
1. Re: Calling UserModule service
theute Nov 10, 2006 10:11 AM (in response to rashmi_setty)You need to have a JTA transaction open before you call the method "createUser" on the UserModule if you are using the database implementation of the user module.
-
2. Re: Calling UserModule service
rashmi_setty Nov 11, 2006 2:11 AM (in response to rashmi_setty)Can u tell me how to open JTA transaction.
Thanks in advance -
3. Re: Calling UserModule service
bdaw Nov 11, 2006 6:33 AM (in response to rashmi_setty)in jboss-portlet.xml
<portlet-app>
<portlet-name>Name</portlet-name>
<trans-attribute>Required</trans-attribute>
..... -
4. Re: Calling UserModule service
rashmi_setty Nov 12, 2006 11:00 PM (in response to rashmi_setty)As i have metioned it is not portal application.It is just simple JSF application.I am not using Portlet.
Can anybody tell me how to open JTA transaction before calling UserModule -
5. Re: Calling UserModule service
cpage Nov 13, 2006 3:22 AM (in response to rashmi_setty)TransactionManager tm; try { tm = (TransactionManager)new InitialContext().lookup("java:/TransactionManager"); TypeX x = (TypeX)Transactions.required(tm, new Transactions.Runnable() { public Object run() throws Exception { ....return something in TypeX
look in the UserPortlet Code or in the IdentityLoginModule Code how they use UserModule services.
regards, -
6. Re: Calling UserModule service
rashmi_setty Nov 13, 2006 4:43 AM (in response to rashmi_setty)hi cpage,
Thx for your reply.
Actually can i open JTA Transaction as shown below.This code is working fine now.But i dont know whether i can call this way though i am getting result.UserTransaction ut = (UserTransaction)(initCtx.lookup("java:comp/UserTransaction")); ut.begin(); user = userModule.createUser(subID, userBean.getPwd(), "user@portal.com");
regards,