Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.7.0
-
None
-
None
Description
This is a new regression I found in openejb trunk. A private method of EJB is defined in ejb-jar.xml as timeout method. It's legal from ejb 31 spec.18.2.5.3
"A timeout callback method can have public, private, protected, or package level access. A timeout callback method must not be declared as final or static."
In our code, we have logic to set the private method accessible.
org.apache.openejb.assembler.classic.MethodScheduleBuilder.build(BeanContext, EnterpriseBeanInfo)
{ ...... //get the timeout method from the info in DD or annotation. timeoutMethodOfSchedule = MethodInfoUtil.toMethod(clazz, info.method); //set the method accessible so that we could call it even it's a private method. SetAccessible.on(timeoutMethodOfSchedule); ..... }It used to work well. And I can confirm these logic was executed when I debug into it. Can anyone shed some light on this ? At least, how could I tell if the private method was accessible after calling SetAccessible.on() to it ?