8 Replies Latest reply on May 26, 2008 2:41 AM by Andrew Rubinger

    Proxy Tasks for Delegation

    Andrew Rubinger Master

      I've committed the first round of development for EJB3 Proxy. Anyone with spare cycles (I believe Carlo volunteered himself) who wants to look at the following is more than welcome; this will help speed along JNDI Name Conflicts preventing many tests from passing.

      1) There are currently two test cases extending from a common base which contains all test logic. Each class tests an implementation of the ProxyFactoryRegistry, an object designed to keep track of / store Proxy Factories.

      The In-Memory tests are working; these are just backed by a HashMap.

      The JNDI tests are not; these require a backing JNDI Store.

      To fix, need standalone startup of the JNP Server (in a @BeforeClass method) and injection for the naming Context within the JndiProxyFactoryRegistry (I've placed comments in the code where this is appropriate).

      2) How do we get at a Managed MC Object from an unmanaged one? The JNDI ObjectFactories are instanciated by our JNP Server upon each lookup, so I've no way to make these objects MC Beans on their own. Best I can think is to either do a lookup (but I have no reference to the Kernel/ControllerContext) or introduce an aspect to inject the MC Bean as an instance when the ctor is called. Specifically, I'm talking about McProxyObjectFactory.

      3)The tests fail within the JUnit launcher for Eclipse, but this is a second-class citizen so long as all is kosher from the command line.