-
1. Re: UserModule via JNDI
agathon Jun 8, 2006 10:55 PM (in response to agathon)I was able to resolve this issue. The solution is to create a "jboss-portlet.xml" file and inject the relevant services into the portlet context.
-
2. Re: UserModule via JNDI
thanvi Dec 18, 2006 5:07 AM (in response to agathon)Hi
I am tryign to connect to UserModule using the JNDI anme /portal/UserModule. Its throwing the excpetion.
I need to connect to userModule from my plain java class. How to go about it.
I have tried the followig
UserModule mod = (UserModule) new InitialContext().lookup("java:/portal/UserModule");
It gives the following error
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.getUserCount(UserModuleImpl.java:304)
at com.reuters.lipper.dwr.UserDAO.countUsers(UserDAO.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:239)
at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:81) -
3. Re: UserModule via JNDI
theute Dec 18, 2006 5:12 AM (in response to agathon)There are a couple of Forum topics about this.
-
4. Re: UserModule via JNDI
thanvi Dec 18, 2006 5:25 AM (in response to agathon)Is there a solution for this. I have beentryingto find in the forums
-
5. Re: UserModule via JNDI
theute Dec 18, 2006 5:35 AM (in response to agathon)Yes.
You need to open a JTA connection (or reuse one that is already open) before you do the call.UserTransaction ut = (UserTransaction)(initCtx.lookup("java:comp/UserTransaction")); ut.begin();
Would open one. -
6. Re: UserModule via JNDI
thanvi Dec 18, 2006 11:21 PM (in response to agathon)Thanks a lot
It worked. -
7. Re: UserModule via JNDI
meyerschalk Nov 13, 2007 11:37 PM (in response to agathon)I have the same problem when I access the usermodule through DWR,
Let me know if you get any information on this please