[Design of JBoss Remoting, Unified Invokers] - Remoting 2: Servlet Invoker
by ALRubinger
I've got failing integration tests for the following construct:
@Stateless
| @RemoteBindings({
| @RemoteBinding(clientBindUrl="http://localhost:8080/servlet-invoker/ServerInvokerServlet", jndiBinding="StatelessHttp")
| })
| @Remote(StatelessRemote.class)
| public class StatelessBean implements StatelessRemote
Server error is:
01:42:45,616 ERROR [STDERR] java.lang.reflect.UndeclaredThrowableException
| 01:42:45,616 ERROR [STDERR] at $Proxy108.processRequest(Unknown Source)
| 01:42:45,616 ERROR [STDERR] at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.processRequest(ServerInvokerServlet.java:144)
| 01:42:45,616 ERROR [STDERR] at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.doPost(ServerInvokerServlet.java:177)
| 01:42:45,616 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| 01:42:45,617 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| 01:42:45,617 ERROR [STDERR] at
| Trimmed for brevity
| 01:42:45,618 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: Unable to find operation processRequest(javax.servlet.http.HttpServletRequest,[B,javax.servlet.http.HttpServletResponse)
My config is:
<!-- Unified invoker (based on remoting) -->
| <mbean code="org.jboss.invocation.unified.server.UnifiedInvoker"
| name="jboss:service=invoker,type=unified,transport=servlet">
| <depends>jboss:service=TransactionManager</depends>
| <depends>jboss.remoting:service=invoker,transport=servlet</depends>
| </mbean>
|
| <mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:service=invoker,transport=servlet"
| display-name="Servlet transport Connector">
| <attribute name="Configuration">
| <config>
| <invoker transport="servlet">
| <attribute name="dataType" isParam="true">invocation</attribute>
| <attribute name="marshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
| <attribute name="unmarshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
| <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
| <attribute name="serverBindPort">8080</attribute>
| <attribute name="path">servlet-invoker/ServerInvokerServlet</attribute>
| </invoker>
| <handlers>
| <handler subsystem="invoker">jboss:service=invoker,type=unified,transport=servlet</handler>
| </handlers>
| </config>
| </attribute>
| </mbean>
JBossAS 5.0.0.GA has jboss-remoting 2.5.0.SP2. I've checked this out from https://svn.jboss.org/repos/jbossremoting/remoting2/tags/2.5.0.SP2/, but when running the build (just "ant" w/ no args), I get:
-rw-rw-r-- 1 alrubinger alrubinger 1045131 2009-01-10 23:36 output/lib/jboss-remoting.jar
AS has:
-rw-rw-r-- 1 alrubinger alrubinger 1074220 2009-01-10 21:31 client/jboss-remoting.jar
Additionally, I'm seeing different file sizes for ServerInvokerServlet:
My build from tags:
7519 01-10-09 23:36 org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.class]
AS Version (reports 2.5.0.SP2):
8304 11-21-08 02:28 org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.class
So two questions:
1) Do we know why ServerInvokerServlet is causing errors?
2) Why the mismatch between the 2.5.0.SP2 artifacts in the repo and what I'm building from tags?
This is reproducible by building AS from trunk, then:
1) Set $JBOSS_HOME to your build of AS
2) svn co http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/testsuite/ .
3) mvn install
4) ant -f build-test.xml invoker-test
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200815#4200815
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200815
17 years, 2 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Wild card Subscriptions
by timfox
I have created a bunch more tests that fail using the current address manager, some come straight from the AMQP spec:
| public void testAddressManager2() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| am.addMapping(new SimpleString("a.b.c.#"), binding1);
|
| //# should match zero or more words (see AMQP spec 0.10, 2.3.1.3)
| Bindings bindings = am.getBindings(new SimpleString("a.b.c"));
|
| assertTrue(bindings.getBindings().contains(binding1));
| assertEquals(1, bindings.getBindings().size());
| }
|
| public void testAddressManager3() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| am.addMapping(new SimpleString("a.b.c.#"), binding1);
|
| //# should match zero or more words (see AMQP spec 0.10, 2.3.1.3)
| Bindings bindings = am.getBindings(new SimpleString("a.b.c.d"));
|
| assertTrue(bindings.getBindings().contains(binding1));
| assertEquals(1, bindings.getBindings().size());
| }
|
| public void testAddressManager4() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| try
| {
| //Should fail, a.b.c# is not a valid key - all tokens should be delimited by '.'
| am.addMapping(new SimpleString("a.b.c#"), binding1);
|
| fail("Should throw exception");
| }
| catch (Exception e)
| {
| //Ok
| }
|
| }
|
| public void testAddressManager5() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| try
| {
| am.addMapping(new SimpleString("#a.b.c"), binding1);
|
| fail("Should throw exception");
| }
| catch (Exception e)
| {
| //Ok
| }
|
| }
|
| public void testAddressManager6() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| try
| {
| am.addMapping(new SimpleString("#*a.b.c"), binding1);
|
| fail("Should throw exception");
| }
| catch (Exception e)
| {
| //Ok
| }
|
| }
|
| public void testAddressManager7() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| try
| {
| //Should fail, a.b.c* is not a valid key - all tokens should be delimited by '.'
| am.addMapping(new SimpleString("a.b.c*"), binding1);
|
| fail("Should throw exception");
| }
| catch (Exception e)
| {
| //Ok
| }
|
| }
|
| public void testAddressManager8() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| try
| {
| am.addMapping(new SimpleString("*a.b.c"), binding1);
|
| fail("Should throw exception");
| }
| catch (Exception e)
| {
| //Ok
| }
|
| }
|
| public void testAddressManager9() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| try
| {
| am.addMapping(new SimpleString(".."), binding1);
|
| fail("Should throw exception");
| }
| catch (Exception e)
| {
| //Ok
| }
|
| }
|
| public void testAddressManager10() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| //Should fail, a.b.c# is not a valid key - all tokens should be delimited by '.'
| am.addMapping(new SimpleString("*.stock.#"), binding1);
|
| Bindings bindings = am.getBindings(new SimpleString("usd.stock"));
|
| assertTrue(bindings.getBindings().contains(binding1));
| }
|
| public void testAddressManager11() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| //Should fail, a.b.c# is not a valid key - all tokens should be delimited by '.'
| am.addMapping(new SimpleString("*.stock.#"), binding1);
|
| Bindings bindings = am.getBindings(new SimpleString("eur.stock.db"));
|
| assertTrue(bindings.getBindings().contains(binding1));
| }
|
| public void testAddressManager12() throws Exception
| {
| AddressManager am = new WildcardAddressManager();
|
| Binding binding1 = new MyBinding();
|
| //Should fail, a.b.c# is not a valid key - all tokens should be delimited by '.'
| am.addMapping(new SimpleString("*.stock.#"), binding1);
|
| Bindings bindings = am.getBindings(new SimpleString("stock.nasdaq"));
|
| assertNull(bindings.getBindings());
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200763#4200763
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200763
17 years, 2 months