Greetings,

I'm trying to invoke a EJB over HTTP and I followed the account
described below. It worked just fine in a client invoking to a server
name where the IP is the same for server and client.

However, when I access from outside, my server has another IP address in
the same network interface (but there is NAT in my firewall), and my
client blocks when calling the ejb (stateless):

-first it blocks on the lookup() (about 2 or 3 minutes)
-then it blocks forever on the create(), passing the narrow()!!

I thought the RMI over HTTP would solve my RMI problems about network
names. It appears only the HTTP solve the problem of PORTs and not of
address names. But I'm using the name instead the ip address in the
configuration of http-invoker.

How can I solve my problem here?

regards,
Pedro Salazar.

On Wed, 2003-12-10 at 07:56, Scheidl, Dietmar wrote:
> Hi,
> 
> The subject of your message states, that you want to use RMI over HTTP(S). Let me 
> assume you want to use it to communicate with your EJBs.
> 
> This is similar to the post in the forum: 
> http://www.jboss.org/thread.jsp?forum=61&thread=42853
> 
> You can use the http-invoker of JBoss. Some steps are neccessary to do so:
> 
> 1. Configure the http-invoker.sar:
>    /jboss/<server>/deploy/http-invoker.sar/META-INF/jboss-service.xml:
>    There you configure the invoker where to reach the server (InvokerURL or 
> InvokerURLPrefix and Suffix).
>    Use the InvokerURL if the URL of the server can not be guessed by 
> Prefix+Hostname+Suffix 
>    (e.g. DNS is other than hostname).
> 
>    /jboss/<server>/deploy/http-invoker.sar/invoker.war/WEB-INF/web.xml:
>    There you can change the mapping of the servlets (must match to the settings in 
> jboss-service.xml)
> 
> 2. The properties of your InitialContext on the client have to be changed to connect 
> to the servlet:
>    InitialContextFactory has to be changed to 
> org.jboss.naming.HttpNamingContextFactory,
>    ProviderUrl has changed to jnp://<yourserver>:<yourport>/invoker/JNDIFactory 
>    (for HTTPS use jnps:// instead of jnp://).
> 
> 3. Your EJB needs to know how to reach it (jboss.xml in your ejb.jar/META-INF). 
>    You have to configure an invoker-proxy-binding. That binding has to be assigned 
> to your EJB.
>    The interceptors can be taken from the standardjboss.xml. The important part is 
> the <invoker-mbean>-Tag.
> 
>    e.g. you have a SFSB (my example in the forum):
> 
>    <jboss>
>    ...
>       <session>
>          <ejb-name>UserSessionBean</ejb-name>
>          <jndi-name>UserSessionBean</jndi-name>
> 
>          <invoker-bindings>
>             <invoker>
>                <invoker-proxy-binding-name>http</invoker-proxy-binding-name>
>                <jndi-name>UserSessionBean</jndi-name>
>             </invoker>
>          </invoker-bindings>
>       </session>
>    ...
>       <invoker-proxy-bindings>
>          <invoker-proxy-binding>
>             <name>http</name>
>             <invoker-mbean>jboss:service=invoker,type=http</invoker-mbean>
>             <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
>             <proxy-factory-config>
>                <client-interceptors>
>                   <home>
>                      <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
>                      <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
>                      
> <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
>                      
> <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
>                   </home>
>                   <bean>
>                      
> <interceptor>org.jboss.proxy.ejb.StatefulSessionInterceptor</interceptor>
>                      <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
>                      
> <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
>                      
> <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
>                   </bean>
>                </client-interceptors>
>             </proxy-factory-config>
>          </invoker-proxy-binding>
>       </invoker-proxy-bindings>
>       ...
>     </jboss>
> 

-- 
-PS



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to