• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS Configuration

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

Deployment the ear in jboss server
I am using jboss-4.0.3 and jdk1.5 .


I configure the following file for to connect the JMS
1. ejb-jar.xml file --ATServer

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar id="ejb-jar_ID">
<display-name>ATServer</display-name>
<enterprise-beans>
<message-driven id="ATServer">
<ejb-name>ATServer</ejb-name>
<ejb-class>com.fnf.xes.framework.pa.TextMdbAdaptor</ejb-class>
<transaction-type>Bean</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<env-entry>
<description>messages-directory</description>
<env-entry-name>messages-directory</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>messages</env-entry-value>
</env-entry>
<env-entry>
<description>boc config file</description>
<env-entry-name>xes/TextMdbAdaptorBocConfigName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>xesBocConfig.xml</env-entry-value>
</env-entry>
<env-entry>
<description>Business Componenet Name</description>
<env-entry-name>xes/BusinessComponentName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>com.fnf.xes.tp.services.atserver.ATServer
</env-entry-value>
</env-entry>
<env-entry>
<description>Data Source Name</description>
<env-entry-name>data-source</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>TPDataSource</env-entry-value>
</env-entry>
<resource-ref id="ResourceRef_1">
<description>TouchPoint DataSource</description>
<res-ref-name>jdbc/TPDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref id="ResourceRef_2">
<description>TouchPoint QueueFactory</description>
<res-ref-name>jms/QueueFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-env-ref id="ResourceEnvRef_1">
<description></description>
<resource-env-ref-name>ATServerQ</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
</message-driven>
</enterprise-beans>
</ejb-jar>

ATServer.Datasource.Name=TPDataSource
ATServer.Datasource.Jndi.Name=jdbc/TPDataSource
ATServer.Queue.Name=ATServerQ
ATServer.Queue.Jndi.Name=jms/ATServerQ
ATServer.ListenerPort.Name=ATServerListenerPort


1. Managing the JMS Destination in
C:\jboss-4.0.3\server\default\deploy\jms\jbossmq-destinations-service.xml

<mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=ATSERVER"> <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends> </mbean>

2. Defining a destination in
C:\jboss-4.0.3\server\default\deploy\jboss.xml

<enterprise-beans>
<message-driven>
<ejb-name>ATServer</ejb-name>
<destination-jndi-name>jms/ATServerQ</destination-jndi-name>
<configuration-name> WSMQ Message Driven Bean </configuration-name>
<mdb-subscription-id>WSMQMessageDrivenBean</mdb-subscription-id>
<mdb-user>admin</mdb-user>
<mdb-passwd>admin</mdb-passwd>
<invoker-bindings>
<invoker>
<invoker-proxy-binding-name>wsmq-message-driven-bean
</invoker-proxy-binding-name>
</invoker>
</invoker-bindings>
<resource-ref>
<res-ref-name>TPQCF</res-ref-name>
<jndi-name>jms/TPQCF</jndi-name>
</resource-ref>
</message-driven> </enterprise-beans>

3. Specifying Source Queue for MDB in
C:\jboss-4.0.3\server\default\conf\standardjboss.xml

<invoker-proxy-binding>
<name>wsmq-message-driven-bean</name>
<invoker-mbean>whatever</invoker-mbean>
<proxy-factory>
org.jboss.ejb.plugins.jms.JMSContainerInvoker
</proxy-factory>
<proxy-factory-config>
<JMSProviderAdapterJNDI>WSMQProvider
</JMSProviderAdapterJNDI>
<ServerSessionPoolFactoryJNDI>StdJMSPool
</ServerSessionPoolFactoryJNDI>
<MaximumSize>15</MaximumSize>
<MaxMessages>1</MaxMessages>
<MDBConfig>
<ReconnectIntervalSec>10
</ReconnectIntervalSec>
<DLQConfig>
<!-- Use this for Windows
file system JNDI namespace -->
<DestinationQueue>queue\\DLQ
</DestinationQueue>
<MaxTimesRedelivered>10
</MaxTimesRedelivered>
<TimeToLive>0</TimeToLive>
</DLQConfig>
</MDBConfig>
</proxy-factory-config>
</invoker-proxy-binding>

<container-configuration>
<container-name>WSMQ Message Driven Bean
</container-name>
<call-logging>false</call-logging>
<invoker-proxy-binding-name>
wsmq-message-driven-bean
</invoker-proxy-binding-name>
<container-interceptors>
<interceptor>
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
</interceptor>
<interceptor>
org.jboss.ejb.plugins.LogInterceptor
</interceptor>
<interceptor>
org.jboss.ejb.plugins.RunAsSecurityInterceptor
</interceptor>
<!-- CMT -->
<interceptor transaction="Container">
org.jboss.ejb.plugins.TxInterceptorCMT
</interceptor>
<interceptor transaction="Container">
org.jboss.ejb.plugins.CallValidationInterceptor
</interceptor>
<interceptor transaction="Container"
metricsEnabled="true">
org.jboss.ejb.plugins.MetricsInterceptor
</interceptor>
<interceptor transaction="Container">
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
</interceptor>
<!-- BMT -->
<interceptor transaction="Bean">
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
</interceptor>
<interceptor transaction="Bean">
org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
</interceptor>
<interceptor transaction="Bean">
org.jboss.ejb.plugins.CallValidationInterceptor
</interceptor>
<interceptor transaction="Bean"
metricsEnabled="true">
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>
</container-configuration>

I got the following error When I deploy the ear file anybody can help to resolve the problems

Please Tell for this ATServer---EJB Component

ATServer.Datasource.Name=TPDataSource
ATServer.Datasource.Jndi.Name=jdbc/TPDataSource
ATServer.Queue.Name=ATServerQ
ATServer.Queue.Jndi.Name=jms/ATServerQ
ATServer.ListenerPort.Name=ATServerListenerPort

In Jboss where I configured the ListenerPort in jboss
2006-04-12 16:37:49,428 ERROR NamingException - Service Registration failed.
Advace Thanks
Cheers
Snehin
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic