First of all, thanks a lot for your replies Marc!

I have progressed a little bit in my understanding, and I think I managed to 
get a working system, so I want to describe to you what I have done. If experts 
are around they could may be comment on the procedure.

Starting from the beginning:
- I need to access a JBOSS 4.2.0GA stateless session bean from a remote
client.
- my client being behind a firewall I decided to pass my invocations via http, 
but I need to be sure that is http only !

Reading forums + doc I have done the following changes to a standard jboss 
installation (on a "server" machine).

1) I have added servlet-invoker.war from the jboss remoting 2.0 package (copy 
the war in deploy dir), performing the following modification in the config 
file WEB-INF/web.xml:

   

  |   <param-name>locatorUrl</param-name>
  |   
<param-value>servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet</param-value>
  |   <description>The servlet server invoker locator url</description>
  | 

2) I have added a Connector using a xxx-service.xml file that I have created 
and put in /server/default/deploy


  | <server>
  |    <mbean code="org.jboss.remoting.transport.Connector"
  |         name="jboss.remoting:service=Connector,transport=Servlet"
  |         display-name="Servlet transport Connector">
  |      <attribute name="InvokerLocator">
  |         
servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet
  |      </attribute>
  |      <attribute name="Configuration">
  |         <config>
  |          <handlers>
  |             <handler 
subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
  |          </handlers>
  |         </config>
  |      </attribute>
  |    </mbean>
  | </server>
  | 

Now I start jboss running with option -b :

  | run.sh -b myhost.domain.name
  | 

I think this is important in order to associate the hostname to the variable 
jboss.bind.address, so to avoid ip number substitutions that would have a bad 
effect on the firewall....

3) I have installed on the same jboss-server machine a Squid proxy server, 
configured to listen to port 3128 with the appropriate acl (see Squid 
documentation)

4) I have forwarded the 3128 port into localhost 13128 using ssh tunneling (-L 
options)

5) now I can for example access the JMX console if I configure in my web 
browser the proxy server to be localhost 13128

6) I run the client program using in java command line the options:
   

  | java -Dhttp.proxyHost=localhost -Dhttp.proxyPort=13128 xxxx
  | 

and it works !

Now my question is :
Could I avoid to use an external proxy server ?

Andrea

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050049
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to