[jboss-jira] [JBoss JIRA] Created: (JBAS-6609) JBAS 5 allows create methods for EJB2x home interface client view with the name 'create' only
Szymon Dembek (JIRA)
jira-events at lists.jboss.org
Tue Mar 10 20:33:22 EDT 2009
JBAS 5 allows create methods for EJB2x home interface client view with the name 'create' only
---------------------------------------------------------------------------------------------
Key: JBAS-6609
URL: https://jira.jboss.org/jira/browse/JBAS-6609
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB3
Affects Versions: JBossAS-5.0.1.GA
Environment: WindowsXP SP2
Reporter: Szymon Dembek
Assignee: Carlo de Wolf
According to EJB3 spec, home/local home interfaces for ejb3 stateful session bean (adopted to ejb2x client view) can have multiple create<METHOD> methods. The requirement is that their names begin with "create". Each of this methods must have corresponding @Init method or ejbCreate<METHOD> methods in the bean class.
When I was trying to run a bean with many create methods in its local home interface under JBOSS 5.0.1, I got an exception:
"IllegalArgumentException - illegal home method ..." (followed by the signature of the method) thrown from the org.jboss.ejb3.session.SessionSpecContainer class.
The create method's signature in local home interface is:
public TestSF2xLocal createA() throws CreateException;
where TestSF2xLocal is the bean's local component interface for 2.x client view. The bean class has a @Init method defined in it:
@Init("createA") public void doInitA() ...
I looked into the source code for ejb3 module a bit and found out, that the invokeHomeMethod method of the SessionSpecContainer class compares the name of the method being called to "create":
if (method.getName().equals(Ejb2xMethodNames.METHOD_NAME_HOME_CREATE))
{
return this.invokeHomeCreate(method, args);
}
As this comparison fails in my case, an exception is thrown:
else
{
throw new IllegalArgumentException("illegal home method " + method);
}
The very same bean works fine with Glassfish 2. I'd suggest that JBoss behaviour is against the spec in this case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list