Hi all,
   I am using portal 2.0.1RC1 and jbpm 3.0.2.

   I want to use the JBoss portal datasource to get the User details and his 
roles instead of the jbpm datasource.  The current jboss-service.xml of jbpm is 

< mbean code="org.jbpm.db.jmx.JbpmService" 
name="jboss.jbpm:name=DefaultJbpm,service=JbpmService" description="Default 
jBPM Service">
    < attribute name="JndiName">java:/jbpm/JbpmSessionFactory
< depends>jboss.jca:service=DataSourceBinding,name=DefaultDS
 < /depends>
  < /mbean>


I changed the datasource from "DefaultDS" to "PortalDS".  However, when I tried 
to call the following line in UserBean.java of sample webapp,

userModule = (UserModule)new 
InitialContext().lookup(ModuleConstants.USERMODULE_JNDINAME);

it gives me an null pointer exception as follows:


15:07:07,818 INFO  [STDOUT] java.lang.NullPointerException
15:07:07,828 INFO  [STDOUT]     at 
org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:509)
15:07:07,828 INFO  [STDOUT]     at org.jboss.portal.core.impl.user.UserModuleImp
l.getSession(UserModuleImpl.java:219)
15:07:07,828 INFO  [STDOUT]     at 
org.jboss.portal.core.impl.user.UserModuleImpl.getUserCount(UserModuleImpl.java:198)
15:07:07,828 INFO  [STDOUT]     at 
org.jbpm.webapp.bean.UserBean.getUserSelectItems(UserBean.java:76)

It is not able to getCurrentSession of "portal"
 SessionFactory sf = (SessionFactory)new 
InitialContext().lookup("java:portal/SessionFactory");
 Session session = sf.getCurrentSession();

How do I change the jboss-service.xml and hibernate.cfg.xml to make jbpm get 
the session of portal.

Thanks

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to