Announcement Announcement Module
Collapse
No announcement yet.
EJB client call hangs because of Out of memory in Remote server. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • EJB client call hangs because of Out of memory in Remote server.

    My application is built on Spring 2.0 and running in Tomcat 5.
    We have a scenario where we need to call EJB (stateless ) in a remote server (JBoss) to get some information from that EJB
    It is expected that remote server could go to Out of memory state so often. We noticed that whenever this happens at remote server the page that make EJB call hangs for ever.

    WE have configured the EJB in our applicationContext.xml as below:



    <bean id="myJndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
    <props>
    <prop key="java.naming.factory.initial">${java.naming.fa ctory.initial}</prop>
    <prop key="java.naming.factory.url.pkgs">${java.naming.f actory.url.pkgs}</prop>
    <prop key="java.naming.provider.url">${java.naming.provi der.url}</prop>
    </props>
    </property>
    </bean>

    <bean id="myEJB" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiTemplate" ref="myJndiTemplate" />
    <property name="jndiName" value="MyJNDIName" />
    </bean>

    Is there any way I could apply a timeout on each call on this EJB on our side (Unfortunately we cannot touch the code in remote server)? Let say if the I am not receiving any result from remote server for 1 minute ,throw an exception and show user a valid error message, rather than waiting forever for the remote call to return.

    The error that is throwing on the Remote (Jboss ) server is
    "15:44:07,639 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
    15:44:07,686 ERROR [STDERR] Exception in thread "RMI TCP Connection(12)-124.3.63.69"
    Last edited by springrenjith; Dec 17th, 2008, 02:52 PM.

  • #2
    Did you ever get this solved?

    Comment


    • #3
      No .still this problem is not resolved

      Comment


      • #4
        Can you post the client code that it's making the EJB call?

        Comment

        Working...
        X