Also moved to a new thread.
On Jan 21, 2010, at 8:27 AM, Gurkan Erdogdu wrote:
Hi David;
I would also like to help on JCDI integration :)
What!? I'm shocked. Never would have guessed ;)
Anyway, a critical piece we'll need for the integration is some way
that the @Scope manager (OWB) can remove Stateful beans even though
these beans may not have a remove method. The best way to do this is
to craft up something a bit like the old 2.1 days when there was a
standard remove method on every EJB proxy.
We add this interface to every proxy:
org.apache.openejb.core.ivm.IntraVmProxy
In the simplest case, we just add a remove() method to that guy.
Maybe more elegantly, we make a new interface just for this directly
under the org.apache.openejb package and maybe have the IntraVmProxy
interface just extend it.
The "_invoke" method of the EjbHomeProxyHandler would be coded to
ignore the remove method. The "_invoke" method of the
"EjbObjectProxyHandler" would be coded to spot it and then call the
"remove(...)" method of the EjbObjectProxyHandler just like it would
do for an EJBObject.remove call.
We might have to pass a different method instance into that remove
method for it work. Likely it will have to be an instance of either
the EJBLocalObject.remove method or the EJBObject.remove method for
the container to understand it.
That's the general idea anyway. Something along these lines should
work.
-David