[Design of EJB 3.0] - Re: EJBTHREE-1454 Encapsulate Container infomation in TO/VO
by jaikiran
"ALRubinger" wrote :
| So try adding accessors for the properties mentioned to InvokableContext, making sure they line up with the actual method names used by EJB3 Core SessionSpecContainers, and then EJB3 core can do a JndiSessionRegistrar.bindEjb(otherParams,this)...
|
We can introduce these on InvokableContext:
Index: D:/JBoss/EJB3/proxy/src/main/java/org/jboss/ejb3/proxy/container/InvokableContext.java
| ===================================================================
| --- D:/JBoss/EJB3/proxy/src/main/java/org/jboss/ejb3/proxy/container/InvokableContext.java (revision 77145)
| +++ D:/JBoss/EJB3/proxy/src/main/java/org/jboss/ejb3/proxy/container/InvokableContext.java (working copy)
| @@ -21,9 +21,13 @@
| */
| package org.jboss.ejb3.proxy.container;
|
| +import javax.naming.InitialContext;
| +
| +import org.jboss.aop.Advisor;
| import org.jboss.aop.joinpoint.Invocation;
| import org.jboss.aop.joinpoint.InvocationResponse;
| import org.jboss.ejb3.common.lang.SerializableMethod;
| +import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
|
| +
| + /**
| + * Returns the initial context
| + * @return
| + */
| + InitialContext getInitialContext();
| +
| + /**
| + * Returns the session bean metadata
| + * @return
| + */
| + JBossSessionBeanMetaData getMetaData();
| +
| + /**
| + * Returns the classloader associated with this {@link InvokableContext}
| + * @return
| + */
| + ClassLoader getClassloader();
| +
| + /**
| + * Returns the name of the container
| + * @return
| + */
| + String getName();
| +
| + /**
| + * Returns the global unique id of the container
| + * @return
| + */
| + String getGuid();
| +
| + /**
| + * Returns the advisor to use for generated proxies
| + * @return
| + */
| + Advisor getAdvisor();
| }
|
Some related questions:
1) The interface InvokableContext sounds generic and probably can be used to carry out any generic invocation. So is it appropriate to introduce getGuid (and similar) method here? What i mean is, do all invocable objects need to have a Guid?
2) The following 2 methods are not available in the EJB3 Core SessionSpecContainers. Introducing these on InvokableContext will require an (straightforward) implementation in the SessionSpecContainers:
String getName(); // Currently the EJB3 core, generates a name based on getObjectName().getCanonicalName()
|
| String getGuid(); // EJB3 Core, currently uses Ejb3Registry.guid(this) to generate this
|
3) I see that the getAdvisor method is deprecated on the EJBContainer:
| @Deprecated
| public Advisor getAdvisor()
| {
| return beanContainer._getAdvisor();
| }
Any specific reason?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171511#4171511
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171511
17 years, 7 months
[Design of EJB 3.0] - Re: EJBTHREE-1423 Test case for @RemoteBinding
by jaikiran
I am done with the testcase. They are passing :)
"ALRubinger" wrote :
| Some change requests to your patch (mostly housekeeping):
|
| * Add to setupBeforeClass the boilerplate for deploying *-aop.xml,
| example in JndiSessionRegistrarTestCaseBase (else tests will fail)
|
Done
"ALRubinger" wrote :
| * Add tests that the explicit addresses are also unbound upon undeploy
|
Done.
"ALRubinger" wrote :
| Also, the package name / class name of the test could be more in-line with those you've done for JndiSessionRegistrarTestCaseBase; they both test pretty much the same thing, only difference is that this new one uses explicit bindings as opposed to the default. Maybe they could be merged?
|
Yes, that's a good point.
"ALRubinger" wrote :
| I'd just like it to be ultra-clear what these tests do from their names alone (JndiSessionRegistrarTestCaseBase sounds pretty vauge). Open to your suggestions here and then we'll move things around to be friendlier.
|
How about merging these tests into a JNDIBindingTestCase, since all these tests, check that the ejb objects are properly bound/unbound to/from JNDI?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171489#4171489
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171489
17 years, 7 months