1 2 Previous Next 17 Replies Latest reply on Apr 29, 2013 9:53 AM by Vikas B

    Unable to find remote EJB from another node in the same cluster using distinct name

    Vikas B Newbie

      sample.war deployed on the two jboss instances with different distinct name within a cluster on the same machine with different port offset.

       

      sample.war deployed on cluster nodes :

       

      node 1  - sample.war - deployed with distinct name X

      node 2  - sample.war - deployed with distinct name Y

       

      When I try to access EJB with distinct name Y deployed on node 2 from EJB deployed on node 1, I get following error : but it works sometimes and sometimes it fails :

       

      java.lang.IllegalArgumentException: JBAS014155: Unknown deployment - app name:  module name: <moduleName> distinct name: Y              

       

      Any Idea ?

       

      Here is complete stack trace :

       

      at org.jboss.as.ejb3.remote.LocalEjbReceiver.findBean(LocalEjbReceiver.java:318)
      at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:143)
      at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
      at com.abc.ejb.client.JBossClientInterceptor.handleInvocation(JBossClientInterceptor.java:48)
      at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)
      at org.jboss.ejb.client.EJBHomeCreateInterceptor.handleInvocation(EJBHomeCreateInterceptor.java:79)
      at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)
      at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:42)
      at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)
      at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:125)
      at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)
      at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:177)
      at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:161)
      at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:124)
      at com.sun.proxy.$Proxy60.register(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at com.abc.infra.jndi.RemoteEjbInvocationHandler.doInvoke(RemoteEjbInvocationHandler.java:135)
      at com.abc.infra.jndi.RemoteEjbInvocationHandler.retry(RemoteEjbInvocationHandler.java:119)
      at com.abc.infra.jndi.RemoteEjbInvocationHandler.invokeMethod(RemoteEjbInvocationHandler.java:75)
      at com.abc.infra.jndi.RemoteEjbInvocationHandler.invoke(RemoteEjbInvocationHandler.java:174)
      at com.sun.proxy.$Proxy60.register(Unknown Source)
      at com.abc.tk.risk.service.MainWorker.register(MainWorker.java:109)
      at com.abc.tk.viewer.risk.ServiceWorker.initOnce(ServiceWorker.java:473)
      at com.abc.tk.viewer.risk.ServiceWorker.initialize(ServiceWorker.java:454)
      at com.abc.tk.viewer.service.viewerServerWorker$1.run(viewerServerWorker.java:291)
        • 1. Re: Unable to find remote EJB from another node in the same cluster using distinct name
          jaikiran pai Master

          What does your packaging look like and what are the contents of your jboss-ejb-client.xml? Which exact version of AS7 is this? How have you configured the distinct names?

          • 2. Re: Unable to find remote EJB from another node in the same cluster using distinct name
            Vikas B Newbie

            1) Packaging : It is war project contains mutiple EJBs.

             

            2) jboss-ejb-client.xml

            <?xml version="1.0" encoding="UTF-8"?>
            <jboss-ejb-client xmlns="urn:jboss:ejb-client:1.1">
            <client-context>
              <ejb-receivers>
               <remoting-ejb-receiver outbound-connection-ref="remote-server-connection"/>

            <!-- I have configured remote-server-connection in my standalone-full-ha.xml which points to node1 instance of jboss. -->
              </ejb-receivers>
              <clusters>
               <cluster name="ejb" max-allowed-connected-nodes="10" username="admin" security-realm="my-security-realm" connect-timeout="5000">
                <connection-creation-options>
                 <property name="org.xnio.Options.SSL_ENABLED" value="false"/>
                 <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="false"/>
                                <property name="org.xnio.Options.SASL_DISALLOWED_MECHANISMS" value="JBOSS-LOCAL-USER"/>
                                <property name="org.xnio.Options.SASL_POLICY_NOPLAINTEXT" value="false"/>
                
                </connection-creation-options>
               </cluster>
              </clusters>
            </client-context>
            </jboss-ejb-client>

            3) JBoss version 7.2.0.Final

             

            • 3. Re: Unable to find remote EJB from another node in the same cluster using distinct name
              jaikiran pai Master

              You'll have to provide more relevant details. Where is that jboss-ejb-client.xml located?

               

              What's the output of

               

              jar -tf yourwar.war

              • 4. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                Vikas B Newbie

                jboss-ejb-client.xml is in server.war/WEB-INF folder..

                 

                just a note, I have jboss-ejb3.xml as well in the same folder :

                 

                <?xml version="1.0" encoding="UTF-8"?>

                <jboss xmlns="http://www.jboss.com/xml/ns/javaee"

                       xmlns:jee="http://java.sun.com/xml/ns/javaee"

                       xmlns:c="urn:clustering:1.0"

                         xmlns:security="urn:security" >

                 

                    <jee:assembly-descriptor>

                     

                        <c:clustering>

                            <!-- <jee:ejb-name>*</jee:ejb-name> -->

                            <jee:ejb-name>com.abc.tk.service.RemoteXService</jee:ejb-name>

                            <jee:ejb-name>com.bac.tk.service.RemoteYService</jee:ejb-name>

                           

                            <c:clustered>true</c:clustered>

                        </c:clustering>

                    </jee:assembly-descriptor>

                </jboss>

                 

                Here is the output of my war file :

                 

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war.deployed

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\warContents.txt

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\index.jsp

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\riskStyle.css

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\beans.xml

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\ejb-jar.xml

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jboss-deployment-structure.xml

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jboss-ejb-client.xml

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jboss-ejb3.xml

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jboss-web.xml

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jsp

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\web.xml

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\META-INF

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\core

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\marketdata

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\presentation

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\risk

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\service

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\core\sql

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\core\sql\TenantWrappedConnection.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\core\sql\TenantWrappedDataSource.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\marketdata\server

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\marketdata\server\service

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\marketdata\server\service\MktDataServerBean.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\presentation\service

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\presentation\service\PresentationImplBean.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\presentation\service\PresentationServerBean.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\risk\Initializeserver.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\risk\service

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\risk\util

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\risk\service\CalculationImplBean.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\risk\service\CalculationServerImplBean.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\risk\util\ClientInfoComparator.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\com\abc\tk\service\DataSourceInitializer.class

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\META-INF\services

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\classes\META-INF\services\org.jboss.ejb.client.EJBClientInterceptor

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jsp\index.jsp

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jsp\menu.jsp

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jsp\monitoring

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jsp\monitoring\calculationServer.jsp

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\jsp\monitoring\presentationServer.jsp

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\acegi-security-1.0.7.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\activation-1.0.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\activemq-core-5.7.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\activemq-pool-5.7.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\analysis-metadata-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\antlr-2.7.6.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\aopalliance-1.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\apache-log4j-extras-1.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\asm-2.2.3.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\asm-commons-2.2.3.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\asm-util-2.2.3.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\aspectjrt-1.6.10.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\bondexoticnote-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\bondpricingsheet-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\calculation-server.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\calibration-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-appkit-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-calib-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-calibintegration-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-core-1.24.7.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-hibernate-core-1.3.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-jboss-client-context-1.1.1.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-logging-1.15.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-lowlatencymessaging-1.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-position-keeping-blotter-1.0.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-position-keeping-core-1.0.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-position-keeping-lookup-1.0.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-position-keeping-processing-1.0.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-position-keeping-routing-1.0.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-pricingscript-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-random-1.1.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-reuters-rfa-1.16.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-sqlinputvalidator-1.4.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abc-webadmin-1.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abcml-calculationserver-impl-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abcml-core-2.11-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abcml-erslimits-impl-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abcml-impl-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abcml-liquidity-reporting-impl-2.0.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abcml-pricingsheet-impl-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\abcml-taskstation-impl-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\cglib-nodep-2.1_3.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\commons-beanutils-1.8.3.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\commons-codec-1.4.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\commons-collections-3.2.1.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\commons-dbcp-1.4.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\commons-digester-1.7.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\commons-lang-2.6.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\commons-math-2.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\commons-net-2.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\commons-pool-1.6.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\concurrentweakhashmap-1.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\core-renderer-R8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\crdpricing-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\cws-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\deal-station-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\dom4j-1.6.1.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\edtftpj-pro-3.1.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\fx-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\groovy-1.6.3.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\hedge-accounting-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\hibernate-commons-annotations-4.0.1.Final.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\hibernate-core-4.1.6.Final.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\hibernate-impl-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\irdpricing-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\itext-2.0.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jama-1.0.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\javassist-3.6.0.GA.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jaxb-api-2.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jaxb-impl-2.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jaxb-impl-runtime-1.0.4.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jaxb1-impl-2.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jcommon-1.0.16.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-action-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-charts-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-common-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-components-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-dashboard-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-data-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-dialogs-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-diff-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-dock-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-editor-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-gantt-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-grids-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-pivot-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-properties-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-rss-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-shortcut-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jide-treemap-3.4.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\js-1.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jsr173_api-1.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jtidy-r938.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\jzlib-1.1.1.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\liquidity-classification-2.0.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\liquidity-core-2.0.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\liquidity-reporting-2.0.0.0-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\log4j-1.2.15.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\mktdata-viewer-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\mktdataserver-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\ocutil-2.4.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\persistence-service-1.14.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\poi-3.8.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\presentation-server.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\pricingGrid-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\pricingSheet-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\quartz-2.1.5.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\rfa.jar-7.2.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\sales-solution-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\scriptableOTC-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\serializer-2.7.1.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\simple-jndi-0.11.4.1.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-aop-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-beans-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-context-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-context-support-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-core-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-expression-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-jdbc-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-jms-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-orm-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-oxm-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\spring-tx-3.2.0.RELEASE.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\swift-xml-1.0.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\taskenrichment-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\taskstation-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\test-tools-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\timeHorizonSimulation-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\trade-blotter-13.1.0-FAILOVER-SNAPSHOT.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\velocity-dep-1.4.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\visad-1.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\xalan-2.7.1.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\xbean-spring-3.11.1.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\xercesImpl-2.9.0.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\xmlpull-1.1.3.1.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\xpp3_min-1.1.4c.jar

                C:\work\devtools\apps\jboss-as-7.2.0.Final\standalone-clustered-server-X\deployments\server.war\WEB-INF\lib\xstream-1.4.2.jar

                • 5. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                  Vikas B Newbie

                  ok here are two things I have observed :

                   

                  1) If you cache the proxy object (after doing the EJB lookup for node 2 -distinct name Y for the first time) on the node 1 and try to access the node 2 which is with distinct name Y using cached proxy with mutiple threads, then we get "java.lang.IllegalArgumentException: JBAS014155: Unknown deployment - app name:  module name:sample distinct name: Y". But if you try to do lookup every time on node 1 for node 2 then it works fine.

                   

                  2) I have also observed that we also get this exception if we try to registry a InvocationHandler while creating a proxy object. We have custom EJB invocation handler to implement retry logic. In the exception log I see it goes to node 1 to look for distinct name Y which is actually on node 2, hence it fails. Not sure why it does not fall back to node 2 to do lookup as both are part of same cluster.

                  • 6. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                    jaikiran pai Master

                    Vikky B wrote:

                     

                     

                     

                    1) If you cache the proxy object (after doing the EJB lookup for node 2 -distinct name Y for the first time) on the node 1 and try to access the node 2 which is with distinct name Y using cached proxy with mutiple threads, then we get "java.lang.IllegalArgumentException: JBAS014155: Unknown deployment - app name:  module name:sample distinct name: Y". But if you try to do lookup every time on node 1 for node 2 then it works fine.

                    Are you using remote-naming or EJB client API? See this for what the difference is https://docs.jboss.org/author/display/AS71/Remote+EJB+invocations+via+JNDI+-+EJB+client+API+or+remote-naming+project

                     

                     

                    Vikky B wrote:

                     

                     

                    2) I have also observed that we also get this exception if we try to registry a InvocationHandler while creating a proxy object.

                    We don't recommend doing that. In fact, don't do that.

                    • 7. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                      Vikas B Newbie

                      Jailiran, to answer your question on #1, I am using EJB Client API lookup. Is it ok ?

                       

                      and regrading # 2, Can you please shed some light on why is it not recommended to use CustomEJBInvocationHandler to do retry ?

                      • 8. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                        Vikas B Newbie

                        hi Jaikiran, did you get a chance to take a look at my previous comments ? Can you please suggest if I have to implement retry logic what would the right way to do it ?

                        • 10. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                          Vikas B Newbie

                          Two JBOSS instance : JBOSS instance-1 with EJB-1 deployed and JBOSS instance-2 EJB-2 deployed.

                           

                          We are trying to do EJB-2 lookup deployed on JBOSS instance-2 from JBOSS instance-1. So just in case the JBOSS instance-2 is down, we want to implement retry logic in JBOSS instance-1 EJB-1, so that if the JBOSS instance-2 is back then we can establish connection and move forward. Does it make sense ? please let me know if I should provide more information.

                          • 11. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                            jaikiran pai Master

                            Vikas B wrote:

                             

                             

                            We are trying to do EJB-2 lookup deployed on JBOSS instance-2 from JBOSS instance-1. So just in case the JBOSS instance-2 is down, we want to implement retry logic in JBOSS instance-1 EJB-1, so that if the JBOSS instance-2 is back then we can establish connection and move forward. Does it make sense ? please let me know if I should provide more information.

                            It's all available by default in the EJB client API implementation. You don't need custom implementation or configuration for that. I'm assuming EJB1 and EJB2 are both represented by the same app/module/bean/distinct-name combo. Is that the case?

                            • 12. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                              Vikas B Newbie

                              No, bean and distinct name are different and module name may be different.

                              • 13. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                                jaikiran pai Master

                                In that case you'll have to lookup those 2 different proxies and use the appropriate one when you want to "retry". Note that this isn't really a retry. You are essentially invoking a different bean altogether.

                                • 14. Re: Unable to find remote EJB from another node in the same cluster using distinct name
                                  Vikas B Newbie

                                  Jaikiran, I think I did not make it clear earlier, let me try again : EJB-1 deployed on JBOSS instance 1 is trying to lookup EJB-2 deployed on JBOSS instance 2, so if JBOSS instance 2 goes down for few naon sec so we do not want EJB-1 look up to be failed, we want to retry if it fails and try again.

                                   

                                  Code looks something like this :

                                   

                                  /**

                                  * Intercepts service invocations from server clients.

                                  *

                                  * Retries an invocation the specified number of times or if a deadlock exception is encountered.

                                  *

                                  */

                                  public class RemoteEjbInvocationHandler implements InvocationHandler {

                                   

                                      private static final String LOG_CATEGORY = RemoteEjbInvocationHandler.class.getName();

                                   

                                      private String jndiName;

                                     

                                      private Properties jndiEnvironment;

                                     

                                      private int retryCount = 3;

                                   

                                      private int retryDelay = 5;

                                   

                                      private int MAXDEADLOCKTRIES = 3;

                                   

                                      private List<String> noRetryMethods;

                                     

                                      /* the client-side EJB proxy that this invocation handler wraps */

                                      private Object ejb;

                                   

                                      private final static boolean traceEventLoop = DefaultsBase.getBooleanProperty("EVENT_LOOP_RMI_LOG", false);

                                     

                                      public RemoteEjbInvocationHandler(String jndiName, RMIProxyProperties rmiProxyProps, Properties jndiEnvironment) {       

                                          this.jndiName = jndiName;

                                          this.jndiEnvironment = jndiEnvironment;

                                          if(rmiProxyProps != null){

                                              this.retryCount = rmiProxyProps.getRetryCount();

                                              this.retryDelay = rmiProxyProps.getRetryDelay();

                                          }

                                      }

                                     

                                      public void setNoRetryMethods(List<String> noRetryMethods) {

                                          this.noRetryMethods = noRetryMethods;

                                      }

                                     

                                      /*

                                       * Method is public to allow test case to invoke it.

                                       */

                                      public boolean isDeadLock(RemoteException re) {

                                          if (re.detail != null && re.detail instanceof PersistenceException) {

                                              PersistenceException pe = (PersistenceException) re.detail;

                                              return pe.isDeadLock();

                                          }

                                          return false;

                                      }

                                     

                                      protected Object invokeMethod(Method method, Object[] args, String methodName) throws Throwable {       

                                          return retry(method, args, methodName);       

                                      }

                                         

                                      protected Object retry(Method method, Object[] args, String methodName)

                                              throws Throwable {       

                                          int retryCounter = 0;

                                          boolean exceptionFlag = false;

                                          Exception exception = null;

                                         

                                          boolean debug = Log.isCategoryLogged(LOG_CATEGORY) && Log.isDebug();

                                          while (retryCounter == 0

                                                  || (exceptionFlag == true && retryCounter <= retryCount)) {

                                              exceptionFlag = false;

                                              if (retryCounter > 0) {

                                                  if (noRetryMethods != null) {

                                                      if (this.noRetryMethods.contains(methodName)) {

                                                          throw exception;

                                                      }

                                                  }

                                                 

                                         

                                                  if (retryDelay > 0) {

                                                      Thread.sleep(retryDelay * 1000);

                                                  }

                                              }

                                   

                                     

                                                 

                                              try {

                                                  return doInvoke(method, args);

                                              } catch (IllegalStateException ise) {

                                         

                                                  exceptionFlag = true;

                                                  exception = ise;

                                              } catch (Exception ex) {

                                                  exception = ex;

                                              }

                                              retryCounter++;

                                          }

                                          throw exception;       

                                      }

                                   

                                      protected Object doInvoke(Method method, Object[] args)

                                              throws Throwable {

                                          Object targetEjb = getEjb();

                                          return method.invoke(targetEjb, args);

                                      }

                                     

                                      public synchronized Object getEjb() throws NamingException {

                                          if (ejb == null) {

                                              ejb = lookup();

                                          }

                                          return ejb;

                                      }

                                     

                                      private Object lookup() throws NamingException {

                                          InitialContext ctx = new InitialContext(jndiEnvironment);

                                          return ctx.lookup(getJndiName());

                                      }

                                     

                                      private String getJndiName() {

                                          return this.jndiName;

                                      }

                                   

                                      @Override

                                      public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

                                          try {

                                              if (traceEventLoop) {

                                                  if ("AWT-EventQueue-0".equals(Thread.currentThread().getName())) {

                                                      Log.system(Log.OUT, "RMI Call in EventLoop\n"

                                                              + com.abc.tk.core.Log.toString(new Exception()));

                                                  }

                                              }

                                              boolean profile = Log.isCategoryLogged(MonitoringCategories.MONITORING_CLIENTREQUEST);

                                              long beginFreeMemory = 0;

                                              long start = 0;

                                             

                                              if (profile) {               

                                                  beginFreeMemory = (Runtime.getRuntime().totalMemory() - Runtime

                                                          .getRuntime().freeMemory());

                                                  start = System.currentTimeMillis();

                                              }

                                   

                                              String methodName = method.getDeclaringClass().getName() + "." + method.getName();

                                              Object result = invokeMethod(method, args, methodName);

                                     

                                              return result;

                                          } catch (InvocationTargetException e) {           

                                              throw e.getTargetException();

                                          } catch (RemoteException re) {

                                              if (isDeadLock(re))

                                                  return retryWhenDeadlockException(method, args, null, 1);

                                              throw re;

                                          } catch (IllegalStateException ise) {

                                              String logMessage = "Unable to connect to " + getJndiName();

                                              throw new RuntimeException(logMessage);

                                          } catch (RuntimeException e) {

                                              // wrap it in another exception to add information about the service invoked

                                              throw new RuntimeException("Error invoking service " + getJndiName(), e);

                                          } catch (Exception e) {

                                             

                                              throw e;

                                          }

                                   

                                      }

                                   

                                   

                                      private Object retryWhenDeadlockException(Method method, Object[] args,

                                              RemoteException rem, int currentRetryCount) throws Throwable {

                                          if (currentRetryCount < MAXDEADLOCKTRIES) {

                                              currentRetryCount++;

                                              try {

                                                  return doInvoke(method, args);

                                              } catch (RemoteException re) {

                                                  if (isDeadLock(re)) {

                                                      return retryWhenDeadlockException(method, args, re,

                                                              currentRetryCount);

                                                  }

                                                  throw re;

                                              } catch (Exception ex) {

                                                  throw ex;

                                              }

                                          }

                                          throw rem;

                                      }

                                     

                                   

                                  }

                                  1 2 Previous Next