when call the portal mbean 

                UserModule mbean = (UserModule) MBeanProxyExt
  |         .create(UserModule.class, ObjectNameFactory
  |                 .create("portal:service=Module,type=User"));
  |             mbean.getUserCount();
the application throws exception as follows,
20:36:21,875 ERROR [HibernateUserModuleImpl] Cannot count users
  | 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:544)
  |     at 
org.jboss.portal.identity.db.HibernateUserModuleImpl.getCurrentSession(HibernateUserModuleImpl.java:298)
  |     at 
org.jboss.portal.identity.db.HibernateUserModuleImpl.getUserCount(HibernateUserModuleImpl.java:275)

I search some same problems on the forum but no good answers,
some one said we should put such config to jboss-porlet.xml
      <transaction>
  |          <trans-attribute>Required</trans-attribute>
  |       </transaction>

but i didn't call it in a portlet so it didn't work.
Anyone can explain the reason of 'Unable to locate current JTA '??

thanks.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149421
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to