[Design of EJB 3.0] - Re: EJBTHREE-1423 Test case for @RemoteBinding
by jaikiran
"ALRubinger" wrote :
| I just checked current HEAD of SVN; Proxy is still on Beta35:
|
| $ mvn dependency:tree -Dincludes=org.jboss.metadata |grep metadata
| | [INFO] \- org.jboss.metadata:jboss-metadata:jar:1.0.0.Beta35:compile
|
That's one thing i found strange, this morning, when i started on this. The ejb3-build pom had this:
| <dependency>
| <groupId>org.jboss.metadata</groupId>
| <artifactId>jboss-metadata</artifactId>
| <version>1.0.0.Beta36</version>
| </dependency>
But from the maven build logs (i did a clean install), i saw that only beta 35 was downloaded. So just as a hack, i added the 1.0.0.Beta36 to the ejb3-proxy module and rebuild the proxy module. This time i did see that the Beta36 was downloaded.
"ALRubinger" wrote :
| The error you're seeing is because the interceptors themselves are declared in a configured interceptor stack, which is required. @see ejb3-interceptors-aop.xml (either in EJB3 Core src/main/resources or EJB3 Proxy src/test/resources). Problem is that you need for your test to load up these definitions;
|
Makes sense.
"ALRubinger" wrote :
| this is what I'd meant by "Add to setupBeforeClass the boilerplate for deploying *-aop.xml, example in JndiSessionRegistrarTestCaseBase (else tests will fail)". :)
|
Hadn't grasped it when i read it earlier. But i understand now :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171080#4171080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171080
17 years, 7 months
[Design of EJB 3.0] - Re: EJBTHREE-1454 Encapsulate Container infomation in TO/VO
by ALRubinger
"jaikiran" wrote : 1) Is there any naming convention that is followed for VO in the project?
I wonder if we can simplify this further:
The contract between the EJB3 Core Containers and EJB3 Proxy is InvokableContext. Because this whole process of JNDI Binding doesn't cross a network boundary, you can probably skip the whole value object thing and just pass in the Container itself.
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)...
"jaikiran" wrote : you think, we should even encapsulate the jndi context in the VO?
Yes, by the same mechanism, use whatever "getContext" or "getInitialContext" is available in EJB3 Core Containers and add this to the InvokableContext contract.
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171068#4171068
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171068
17 years, 7 months
[Design of EJB 3.0] - Re: EJBTHREE-1423 Test case for @RemoteBinding
by ALRubinger
"jaikiran" wrote : I tested this with jboss-metadata 1.0.0.Beta36.
I just checked current HEAD of SVN; Proxy is still on Beta35:
$ mvn dependency:tree -Dincludes=org.jboss.metadata |grep metadata
| [INFO] \- org.jboss.metadata:jboss-metadata:jar:1.0.0.Beta35:compile
So I've just bumped the parent to the latest EJB3 Build SNAPSHOT, which will bring in Beta36.
"jaikiran" wrote : My test cases which work on Remote beans are failing. The ones working with Local beans pass. Here's the exception, i see for all my remote bean test cases:
| Caused by: java.lang.AssertionError: Could not find Advice Stack with name: StatelessSessionClientInterceptors
| | at org.jboss.ejb3.proxy.factory.ProxyFactoryBase.getInterceptors(ProxyFactoryBase.java:185)
| | at
|
| Looks like there's some change related to EJBTHREE-1345 as part of which now atleast one interceptor is mandatory for remote beans?
The error you're seeing is because the interceptors themselves are declared in a configured interceptor stack, which is required. @see ejb3-interceptors-aop.xml (either in EJB3 Core src/main/resources or EJB3 Proxy src/test/resources). Problem is that you need for your test to load up these definitions; this is what I'd meant by "Add to setupBeforeClass the boilerplate for deploying *-aop.xml, example in JndiSessionRegistrarTestCaseBase (else tests will fail)". :)
"jaikiran" wrote : 1) What exactly are these client interceptors that is being checked for?
Stack, stack. :) In the case of the EJB3 Proxy Unit Tests, just the InvokeRemoteInterceptor. In EJB3 Core, they handle Client>Server Tx Propagation, bypassing the network stack on a @Remote invocation that takes place locally, propagation of security contexts, etc.
"jaikiran" wrote : 2) Why do we mandate these interceptors only for remote proxy and not for local proxy?
Locally we just don't *need* to do that much; all is executed within the same JVM and Thread; see ProxyInvocationHandlerbase.getContainerLocally().
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171062#4171062
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171062
17 years, 7 months
[Design of EJB 3.0] - EJBTHREE-1454 Encapsulate Container infomation in TO/VO
by jaikiran
Andrew,
1) Is there any naming convention that is followed for VO in the project?
2) As per the JIRA:
anonymous wrote : public StatefulSessionProxyFactoryBase(final String name, final String containerName, final String containerGuid,
| final JBossSessionBeanMetaData metadata, final ClassLoader classloader, final Advisor advisor)
|
| Where containerName, containerGuid, metadata, CL, and Advisor are all properties of the target container.
|
I do see that, while registering in JNDI, the jndi context is being passed to the registrar along with the other session container properties. Do you think, we should even encapsulate the jndi context in the VO?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171033#4171033
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171033
17 years, 7 months