[jboss-user] [EJB] - EJB2.1 findByPrimaryKey and null argument

svnfightsvn do-not-reply at jboss.com
Fri Oct 23 14:23:30 EDT 2009


I'm trying to migrate an app from Weblogic to JBoss and I have a session bean managing entity beans.
In my session bean, I have a method to lookup an entity bean by its String primary key.  
If the value is null, then JBoss throws an java.lang.IllegalArgumentException: findByPrimaryKey called with null argument.
What gives with this?
Why can't the EntityContainer just throw an ObjectNotFoundException?
I find this very unsettling as this same code works fine under Weblogic and it properly throws an ObjectNotFoundException which my code properly catches and handles...

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

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



More information about the jboss-user mailing list