[jboss-dev-forums] [Design of EJB 3.0] - Re: EJBTHREE-1454 Encapsulate Container infomation in TO/VO
jaikiran
do-not-reply at jboss.com
Wed Aug 20 10:06:57 EDT 2008
"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
More information about the jboss-dev-forums
mailing list