[JCA/JBoss] - Limited number of retries when looking for remote JNDI (copi
by StephaneFR
Hello,
I've post my question in the JBoss Messaging forum but timfox ask me to post it in this forum instead. So, I copy / paste my original post (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=149680) :
Here's our environment :
- JBossAS 5.0.0GA with embedded jar files running on windows XP under eclipse ganymede (development environment).
- JBoss Messaging 1.4.2 GA
We have two JBossAS servers running on two physicals separated servers. One produce messages (let's call it serverP), the other consume them through a MDB (call it serverC).
We are not using bridges or clusters. We are using default configuration files with only jms-ds.xml modified to activate remote JNDI.
ServerC is connected to serverP via remote JNDI configured in jms-ds.xml.
When servers starts together, all is working fine.
When serverC starts alone, the JNDI lookup failed and 5 retries are done (one every 10 seconds). If serverP starts after these 5 retries, the connection between the two servers is not established and the only way we have found to force the reconnection is to restart serverC after serverP has started. This must not be the case in production environment.
We have tried to put the property jnp.maxRetries to -1 but it seems this is only working in clustered configuration.
We don't want to use clusters because in this case, we must declare a database datasource for storing waiting messages and we don't want to add more load to our database.
Is-it possible that serverC retries the lookup until it success ?
Thanks a lot,
Stephane.
The jms-ds.xml file (without original comments) :
<?xml version="1.0" encoding="UTF-8"?>
|
| <connection-factories>
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider,server=mf060114">
| <attribute name="ProviderName">QueuehostJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
| <attribute name="FactoryRef">java:/ConnectionFactory</attribute>
| <attribute name="QueueFactoryRef">ConnectionFactory</attribute>
| <attribute name="TopicFactoryRef">ConnectionFactory</attribute>
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jnp.interfaces
| java.naming.provider.url=mf060114:1099
| </attribute>
| </mbean>
|
| <tx-connection-factory>
| <jndi-name>JmsXA</jndi-name>
| <xa-transaction/>
| <rar-name>jms-ra.rar</rar-name>
| <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
| <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
| <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/RemoteJMSProvider</config-property>
| <max-pool-size>20</max-pool-size>
| <security-domain-and-application>JmsXARealm</security-domain-and-application>
| <depends>jboss.messaging:service=ServerPeer</depends>
| </tx-connection-factory>
|
| </connection-factories>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206461#4206461
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206461
17 years, 2 months
[JBoss Messaging] - Re: ClassCastException when casting ObjectMessage object
by chicken
after I added these line of codes in the Catch clause:
System.out.println(CustomMessageBean.class.getClassLoader().toString() + " - " + CustomMessageBean.class.getProtectionDomain().getCodeSource().getLocation().toString());
| System.out.println(mailBeanJMS.getClass().getClassLoader().toString() + " - " + mailBeanJMS.getClass().getProtectionDomain().getCodeSource().getLocation().toString());
mailBeanJMS is an object of CustomMessageBean type
I get new error:
17:59:05,623 INFO [STDOUT] ERROR. : java.lang.ClassCastException: mail.CustomMessageBean
| 17:59:05,624 INFO [WebappClassLoader] Illegal access: this web application instance has been stopped already. Could not load java.security.ProtectionDomain. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
| java.lang.IllegalStateException
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:148)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
| at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
| at org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
|
| 17:59:05,631 INFO [STDOUT] WebappClassLoader
| delegate: false
| repositories:
| - file:/export/home/JBoss/jboss-eap-4.3/jboss-as/server/default/deploy/webapps.war/WEB-INF/classes/mail/CustomMessageBean.class
| 17:59:05,633 ERROR [ClientConsumer] RuntimeException was thrown from onMessage, 139265 will be redelivered
| java.lang.NullPointerException
| at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:149)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
| at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
| at org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
|
| 17:59:05,645 INFO [STDOUT] ERROR. : java.lang.ClassCastException: mail.CustomMessageBean
| 17:59:05,646 INFO [STDOUT] WebappClassLoader
| delegate: false
| repositories:
| - file:/export/home/JBoss/jboss-eap-4.3/jboss-as/server/default/deploy/webapps.war/WEB-INF/classes/mail/CustomMessageBean.class
| 17:59:05,647 ERROR [ClientConsumer] RuntimeException was thrown from onMessage, 139265 will be redelivered
| java.lang.NullPointerException
| at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:149)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
| at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
| at org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
| 17:59:05,649 INFO [STDOUT] onMessage at JMS Receiver
| 17:59:05,652 INFO [STDOUT] ERROR. : java.lang.ClassCastException: mail.CustomMessageBean
| 17:59:05,653 INFO [STDOUT] WebappClassLoader
| delegate: false
| repositories:
| - file:/export/home/JBoss/jboss-eap-4.3/jboss-as/server/default/deploy/webapps.war/WEB-INF/classes/mail/CustomMessageBean.class
| 17:59:05,654 ERROR [ClientConsumer] RuntimeException was thrown from onMessage, 139265 will be redelivered
| java.lang.NullPointerException
| at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:149)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
| at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
| at org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
| 17:59:05,656 INFO [STDOUT] onMessage at JMS Receiver
do you know the cause of problem? I did understand the new API clearly
Thank for your help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206460#4206460
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206460
17 years, 2 months
[Beginners Corner] - Re: Questions for general use of JBoss 5.0?
by dickson1888
Hi Peter,
Thanks for your help.
About the question 2 and 3, I install Embedded Jopr 1.1 in JBoss 5.0. Inside the Admin console (Embedded Jopr), it won't show the web application (war, ear, ...etc) and then I don't know what it can do. As the install guide said this current version is for JBoss 4.2.x, that is not for 5.0 (something is incompatible). I start to watch the demo video to explore the usage of this GUI.
About question 4, I will spend time to search the "isolation" for library later. Thanks for your advise.
About the question5 (basis authentication), I don't understand what you mean. I mean that I set some .htaccess to protect webpage in Apache (ldap, password file) and also I set some authentication (maybe custom JAAS to check against ldap or password file) in a web application of JBoss server. After I login Apache to view some webpage, I go to view the protected webpage in JBoss in the same browser session. This URL request send to JBoss (should include the authentication data in the header). Does the JBoss popup to ask the input username and password again? It seems something related to "single signon".
( Apache is front end web server; JBoss is backend application server. )
Thanks for any help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206459#4206459
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206459
17 years, 2 months