3 Replies Latest reply on Sep 15, 2004 8:16 PM by skidvd

    Beginner question, deployment order problem

    skidvd

      I have an MDB that is accessed via the HTTPIL (instead of UIL2). It seems to be working just fine but has created a deployment order problem. If it is deployed after the container has been started all is fine. However, if it is deployed before container startup (ie. the jar file exists in the deploy directory before the container is started), the conatiner will hang during the deploy of this MDB.

      This problem seems to be directly related to the HTTPIL transport mechanism I'm setting up via the invoker-bindings, proxy-factory and container-config elements in the following jboss.xml file (I know this because commenting out the invoker-binding element in the message-driven element avoids the hang - bt of course does not use the HTTPIL as required in my instance):

      <!DOCTYPE jboss PUBLIC
       "-//JBoss//DTD JBOSS 3.2//EN"
       "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
      <jboss>
       <enterprise-beans>
       <message-driven>
       <ejb-name>ResultsBean</ejb-name>
       <destination-jndi-name>topic/discoveryResults</destination-jndi-name>
       <!--
       Use the following to tunnel over HTTPS
       -->
       <configuration-name>HTTPS Message Driven Bean</configuration-name>
       <invoker-bindings>
       <invoker>
       <invoker-proxy-binding-name>
       message-driven-bean-https</invoker-proxy-binding-name>
       </invoker>
       </invoker-bindings>
       <resource-ref>
       <res-ref-name>jms/TCF</res-ref-name>
       <jndi-name>HTTPCOnnectionFactory</jndi-name>
       </resource-ref>
       <depends>jboss.web:service=WebServer</depends>
      
       <depends>jboss.mq.destination:service=Topic,name=discoveryResults</depend>
       <depends>jboss.security:service=JaasSecurityDomain,domain=RMI+SSL</depend>
       <depends>jboss.mq:service=HTTPInvocationLayer,type=HTTPS</depends>
       <depends>jboss.mq:service=TracingInterceptor</depends>
       <depends>jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool</depends>
       <depends>jboss.mq:service=DestinationManager</depends>
       <depends>jboss.mq:service=SecurityManager</depends>
       <depends>jboss.mq.destination:service=Queue,name=DLQ</depends>
       <depends>jboss:service=Naming</depends>
       <depends>jboss:service=invoker,type=jrmp</depends>
       <depends>jboss:service=TransactionManager</depends>
       <depends>jboss:service=invoker,type=https,target=Naming</depends>
       <depends>jboss:service=invoker,type=https</depends>
       <depends>jboss.jmx:type=adaptor,name=Invoker</depends>
       <depends>jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory</depends>
       <depends>jboss.jmx:type=adaptor,name=Invoker</depends>
       <depends>jboss.mq:service=Invoker</depends>
       <depends>jboss.mq:service=InvocationLayer,type=UIL2</depends>
       <depends>jboss.mq:service=HTTPInvocationLayer,type=HTTPS</depends>
       <depends>jboss.mq:service=JMSProviderLoader,type=https,name=HTTPSJMSProvider,socketType=SSL</depends>
       <depends>jboss.mq:service=DestinationManager</depends>
       <depends>jboss.mq:service=SecurityManager</depends>
       <depends>jboss.mq:service=JMSProviderLoader,name=JMSProvider</depends>
       <depends>jboss.mq:service=JMSProviderLoader,type=https,name=HTTPSJMSProvider,socketType=SSL</depends>
       </message-driven>
       </enterprise-beans>
       <!-- A custom invoker for JMS/HTTPs -->
       <invoker-proxy-binding>
       <name>message-driven-bean-https</name>
       <invoker-mbean>
       <!--
       use for HTTPIL
       -->
       jboss.mq:service=HTTPInvocationLayer,type=HTTPS
       </invoker-mbean>
       <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-fac>
       <proxy-factory-config>
       <!--
       Use with HTTPIL
       -->
       <JMSProviderAdapterJNDI>HTTPSJMSProvider</JMSProviderAdapterJNDI>
       <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJN>
       <!-- WARN: Don't set this to zero until a bug in the pooled executor
       is fixed -->
       <MinimumSize>1</MinimumSize>
       <MaximumSize>15</MaximumSize>
       <KeepAliveMillis>30000</KeepAliveMillis>
       <MaxMessages>1</MaxMessages>
       <MDBConfig>
       <ReconnectIntervalSec>10</ReconnectIntervalSec>
       <DLQConfig>
       <DestinationQueue>queue/DLQ</DestinationQueue>
       <MaxTimesRedelivered>10</MaxTimesRedelivered>
       <TimeToLive>0</TimeToLive>
       </DLQConfig>
       </MDBConfig>
       </proxy-factory-config>
       </invoker-proxy-binding>
       </invoker-proxy-bindings>
      
       <container-configurations>
       <container-configuration>
       <container-name>HTTPS Message Driven Bean</container-name>
       <call-logging>true</call-logging>
       <invoker-proxy-binding-name>message-driven-bean-https</invoker-proxy-b>
       <container-interceptors>
       <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</i>
       <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
       <interceptor>org.jboss.ejb.plugins.RunAsSecurityInterceptor</interc>
       <!-- CMT -->
       <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterc
      eptorCMT</interceptor>
       <interceptor transaction="Container" metricsEnabled="false">org.jbo
      ss.ejb.plugins.MetricsInterceptor</interceptor>
       <interceptor transaction="Container">org.jboss.ejb.plugins.MessageD
      rivenInstanceInterceptor</interceptor>
       <!-- BMT -->
       <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
       <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor>
       <interceptor transaction="Bean" metricsEnabled="false">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
       <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor>
       </container-interceptors>
       <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
       <instance-cache></instance-cache>
       <persistence-manager></persistence-manager>
       <container-pool-conf>
       <MaximumSize>100</MaximumSize>
       </container-pool-conf>
       <depends>jboss.web:service=WebServer</depends>
      
       <depends>jboss.mq:service=DestinationManager</depends>
       <depends>jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool</depends>
       <depends>jboss.mq:service=SecurityManager</depends>
       <depends>jboss.mq.destination:service=Queue,name=DLQ</depends>
       <depends>jboss.mq.destination:service=Topic,name=discoveryResults</depends>
       <depends>jboss.security:service=JaasSecurityDomain,domain=RMI+SSL</depends>
       <depends>jboss.jca:service=CachedConnectionManager</depends>
       <depends>jboss:type=Service,name=PropertyEditorManager</depends>
       <depends>jboss.j2ee:service=ClientDeployer</depends>
       <depends>jboss.alerts:service=ConsoleAlertListener</depends>
       <depends>jboss.jca:service=CachedConnectionManager</depends>
       <depends>jboss:type=Service,name=PropertyEditorManager</depends>
       <depends>jboss.j2ee:service=ClientDeployer</depends>
       <depends>jboss.alerts:service=ConsoleAlertListener</depends>
       <depends>jboss.mq:service=HTTPInvocationLayer,type=HTTPS</depends>
       <depends>jboss.mq:service=TracingInterceptor</depends>
       <depends>jboss:service=Naming</depends>
       <depends>jboss:service=invoker,type=jrmp</depends>
       <depends>jboss:service=TransactionManager</depends>
       <depends>jboss:service=invoker,type=https,target=Naming</depends>
       <depends>jboss:service=invoker,type=https</depends>
       <depends>jboss.jmx:type=adaptor,name=Invoker</depends>
       <depends>jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory</depends>
       <depends>jboss.jmx:type=adaptor,name=Invoker</depends>
       <depends>jboss.mq:service=Invoker</depends>
       <depends>jboss.mq:service=InvocationLayer,type=UIL2</depends>
       <depends>jboss.mq:service=HTTPInvocationLayer,type=HTTPS</depends>
       <depends>jboss.mq:service=JMSProviderLoader,type=https,name=HTTPSJMSProvider,socketType=SSL</depends>
       <depends>jboss.mq:service=DestinationManager</depends>
       <depends>jboss.mq:service=SecurityManager</depends>
       <depends>jboss.mq:service=JMSProviderLoader,name=JMSProvider</depends>
      
       <depends>jboss.mq:service=JMSProviderLoader,type=https,name=HTTPSJMSProvi
      der,socketType=SSL</depends>
       </container-configuration>
       </container-configurations>
      </jboss>
      
      


      As you can see, I have been building up (incrementally adding one or two at a time) a large depends list in failed attempts to address this problem. However, I still end up in the same place - everything works fine if and only if the jar file is deployed AFTER container startup. If the container is started with the jar file in place, it will hang during the deloyment of the MDB.

      By the way, setting the EJBDeployer to DEBUG has not shed any light on this. I have additionally tried to use the jmx-console listIncompletelyDeployed MBeans to no avail, as it is NOT yet available when the container hangs on startup in response to this MDB.

      What depends or other items am I missing? What do I need to do to get this MDB (which appears to be working just fine otherwise) to NOT hang the container when it's associated jar file exists in the deploy directory at container startup time?

      Thanks in advance for your help!

        • 1. Re: Beginner question, deployment order problem
          skidvd

          Just wanted to mention that I have also tried to deploy this MDB insode an ear file (since ears are deployed by default after all jars and wars) - with exactly the same result - hung container during startup.

          I'm strongly suspectting that the HTTPIL needs to have the Tomcat Connector listening - which does not appear to happen until just after the container has initialized. Any ideas on how to denote a depends on that Connector being up?

          Thanks again!

          • 2. Re: Beginner question, deployment order problem
            genman


            Is your MDB reading messages from the local server queue? I don't think you need to do what you're doing. It looks like you're trying to connect to the local server, in which case you're very confused. The HTTPIL stuff is what the client uses to talk to the server, not the MDB to the server.

            Or, are you creating an MDB to talk to a different server? In which case, follow the examples given in the Wiki to create a JMSProvider.

            • 3. Re: Beginner question, deployment order problem
              skidvd

               

              "genman" wrote:

              Is your MDB reading messages from the local server queue? I don't think you need to do what you're doing. It looks like you're trying to connect to the local server, in which case you're very confused. The HTTPIL stuff is what the client uses to talk to the server, not the MDB to the server.

              Or, are you creating an MDB to talk to a different server? In which case, follow the examples given in the Wiki to create a JMSProvider.



              Genman:

              I am indeed very confused. Thank your for your helpful message!

              I have experience with "tunneling" EJB traffic over https, so I have been mistakenly assuming that there must be parallels in the JMS world (at least when both are in JBoss). For example, in the case of session beans, you override the invoker-bindings in the jboss.xml deployment descriptor to access the bean via https instead of normal RMI. From this, I had been incorrectly assuming that a parallel invoker-binding modification would be required for MDBs. However, as you pointed out, this is not the case (at least for locally accessed topics). I suppose this makes some sense as JMS pub traffic is more one way than is EJB/RMI traffic. Is it just by looking up the jndi HTTPConnectionFactory (instead of ConnectionFactory) that cause and https based proxy to be returned? Is this really the only key - in addition to having HTTPIL configured?

              Thanks again!