6 Replies Latest reply on Nov 13, 2006 4:43 AM by Rashmi Setty

    Calling UserModule service

    Rashmi Setty Newbie

      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@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