[jboss-user] [JBoss Portal] - Calling UserModule service

rashmi_setty do-not-reply at jboss.com
Fri Nov 10 08:57:49 EST 2006


Hi
We are using JBOSS Portal 2.4 GA
we have requirement where registration should be done in Simple JSF application and not using Portlet.
So we devleoped JSF application in which i am calling userModule as shown below

String userModuleJNDIName = "java:/portal/UserModule";
  |   UserModule userModule = (UserModule)(new InitialContext()).lookup(userModuleJNDIName);
  |  User user = userModule.createUser(subID, userBean.getPwd(),	"user at portal.com");
I deployed the this JSF application war file in  same Jboss Portal server.
I am getting userModule but while creating the user it throwing exception as
Caused by: org.hibernate.HibernateException: Unable to locate current JTA transaction
  | 	at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61)
  | at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:541)
  | 	at org.jboss.portal.identity.db.UserModuleImpl.getCurrentSession(UserModuleImpl.java:327)
  | 	at org.jboss.portal.identity.db.UserModuleImpl.createUser(UserModuleImpl.java:212)

Is this the corrct way to call userModule.Should i set some parameter in xml file

Please help
Thanx

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984882#3984882

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984882



More information about the jboss-user mailing list