[jboss-user] [JBoss Portal] - Re: Wrong tx on thread in UserModule

je.a.le do-not-reply at jboss.com
Sun Mar 30 08:04:30 EDT 2008


look like the exception is from the transaction ; 

andif i'm correct, findUserByUserName return null when user not found. On my own code i use bean instead and throw the exception by myself :


  | ....
  | MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
  | UserModule userModule = (UserModule) MBeanProxy.get(UserModule.class,                            new ObjectName("portal:service=Module,type=User"), mbeanServer);
  | User user = userModule.findUserByUserName(userEvent.getUserId());
  | 
  | if (user == null) {
  |     throw new IdentityException();
  | }
  | ...
  | 

btw, I have to put my code inside a valid session/transaction, even I only doing read only transaction (!?)

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

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



More information about the jboss-user mailing list