[jboss-dev-forums] [Design of EJB 3.0] - Re: EJBTHREE-1423 Test case for @RemoteBinding

ALRubinger do-not-reply at jboss.com
Mon Aug 18 10:25:43 EDT 2008


"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



More information about the jboss-dev-forums mailing list