[jboss-user] [Remoting] - Multiple problems with ServerInvokerServlet and HttpNamingCo

martin ganserer do-not-reply at jboss.com
Tue Nov 20 03:35:53 EST 2007


Hi experts of remoting!

My configuration is as follows:
I use JBOSS 4.2.2 GA (EJB3). A remote client (RCP) communicates with the server via the ServerInvokerServlet.
Basically everything works fine and the response time is very good. 
Here an example how I connect to the server:

		// Initialize initial context
  | 		Hashtable env = new java.util.Hashtable();
  | 
  | 		env.put(InitialContext.PROVIDER_URL, "http://myhost:8080/invoker/JNDIFactory");
  | 		env.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory");
  | 		env.put(InitialContext.SECURITY_PRINCIPAL, "user");
  | 		env.put(InitialContext.SECURITY_CREDENTIALS, "password");
  | 		env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
  | 		
  | 		try
  | 		{
  | 			ctx = new InitialContext(env);
  | 		}
  | 		catch (NamingException e1)
  | 		{
  | 			e1.printStackTrace();
  | 		}
  | 		
  | 		ctx.lookup(...)

Well, as I said it works basically. But I have some further demands, that I haven't been able to implement yet.

1. Security
The application I deploy on the server uses a simple log-in module, witch works great when I use RMI as transport protocol. 
If I use http as transport I get an error message that the user name is null! 
What do I have to configure to get this working?

2. Exeption handling
Due to a bug in JBOSS remoting I downloaded the latest version of remoting in order to catch remote exceptions on my client. The tutorials say that there is a client-side switch: NO_THROW_ON_ERROR.
Where do I have to set this command within my configuration?

3. Compression
I want to compress traffic between server and client. On the server side I use following configuration:


  | <mbean code="org.jboss.remoting.transport.Connector"
  |           name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
  |           <depends>jboss.aop:service=AspectDeployer</depends>
  |     <attribute name="Configuration">
  |            <config>
  |                 <invoker transport="servlet">
  |                      <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
  |                      <attribute name="serverBindPort">8080</attribute>
  |                      <attribute name="path">servlet-invoker/ServerInvokerServlet</attribute>
  |                      <attribute name="marshaller" isParam="true">org.jboss.remoting.marshal.compress.CompressingMarshaller</attribute>
  |                      <attribute name="unmarshaller" isParam="true">org.jboss.remoting.marshal.compress.CompressingUnMarshaller</attribute>
  |                  </invoker>
  |                 <handlers>
  |                     <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
  |                 </handlers>
  |            </config>
  |     </attribute>
  | </mbean>

At the moment I get an error message when I try this configuration on my server telling me that the header is not in GZIP-format. 
What do I have to do here on my client to use compression successfully?

Thank you very much in advance!!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106261#4106261

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106261



More information about the jboss-user mailing list