[Clustering/JBoss] - NameNotFound Exception on switching over
by kanth_seenu
I have setup two nodes in cluster
1. The first node starts the clustered service successfully
2. The second waits to start the service
Everything works fine upto this.
Once the first node goes down, the immediate task that has to happen is to publish a JMS message.
But what I get is just exceptions, thru Sys.out I am able to see the second node succeeds in isMasterNode check, but it is not able to publish the JMS message, may be due to the following exceptions
I have given the exceptions below. I am able to see similiar posts but with no answers. After many hours without any help I am posting it here
javax.naming.NameNotFoundException: ConnectionFactory not bound
| 17:33:03,669 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| 17:33:03,669 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| 17:33:03,669 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| 17:33:03,669 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
| 17:33:03,669 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
| 17:33:03,669 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| 17:33:03,669 ERROR [STDERR] at javax.naming.InitialContext.lookup(Unknown Source)
| 17:33:03,669 ERROR [STDERR] at com.framework.djms.util.JmsUtil.lookup(JmsUtil.java:124)
| 17:33:03,670 ERROR [STDERR] at com.framework.djms.util.JmsUtil.getTopicConnectionFactory(JmsUtil.java:160)
| 17:33:03,674 ERROR [STDERR] at com.framework.djms.publisher.TopicNonDurablePublisher.init(TopicNonDurablePublisher.java:47)
| 17:33:03,674 ERROR [STDERR] at com.framework.djms.common.PublisherManager.sendMessage(PublisherManager.java:140)
| 17:33:03,674 ERROR [STDERR] at com.framework.djms.common.PublisherManager.sendMessage(PublisherManager.java:100)
| 17:33:03,674 ERROR [STDERR] at com.server.common.startup.cluster.MyClusterService.startService(MyClusterService.java:54)
| 17:33:03,675 ERROR [STDERR] at com.server.common.startup.cluster.MyClusterService.startSingleton(MyClusterService.java:227)
| 17:33:03,676 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 17:33:03,676 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| 17:33:03,676 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:33:03,676 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:33:03,676 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 17:33:03,676 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 17:33:03,676 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| 17:33:03,676 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 17:33:03,676 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 17:33:03,676 ERROR [STDERR] at org.jboss.ha.singleton.HASingletonController.invokeSingletonMBeanMethod(HASingletonController.java:207)
| 17:33:03,677 ERROR [STDERR] at org.jboss.ha.singleton.HASingletonController.startSingleton(HASingletonController.java:144)
| 17:33:03,677 ERROR [STDERR] at org.jboss.ha.singleton.HASingletonSupport.makeThisNodeMaster(HASingletonSupport.java:197)
| 17:33:03,677 ERROR [STDERR] at org.jboss.ha.singleton.HASingletonSupport.partitionTopologyChanged(HASingletonSupport.java:133)
| 17:33:03,677 ERROR [STDERR] at org.jboss.ha.jmx.HAServiceMBeanSupport$1.replicantsChanged(HAServiceMBeanSupport.java:247)
| 17:33:03,677 ERROR [STDERR] at org.jboss.ha.framework.server.DistributedReplicantManagerImpl.notifyKeyListeners(DistributedReplicantManagerImpl.java:845)
| 17:33:03,677 ERROR [STDERR] at org.jboss.ha.framework.server.DistributedReplicantManagerImpl.processEvent(DistributedReplicantManagerImpl.java:386)
| 17:33:03,677 ERROR [STDERR] at org.jboss.ha.framework.server.AsynchEventHandler.run(AsynchEventHandler.java:107)
| 17:33:03,677 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
Followed by
provider failure detected for ServerStopPerfMDBean
| org.jboss.mq.SpyJMSException: Exiting on IOE; - nested throwable: (java.io.EOFException)
| at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
| at org.jboss.mq.Connection.asynchFailure(Connection.java:421)
| at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:174)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:439)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:371)
| at java.lang.Thread.run(Unknown Source)
| Caused by: java.io.EOFException
| at java.io.ObjectInputStream$BlockDataInputStream.readByte(Unknown Source)
| at java.io.ObjectInputStream.readByte(Unknown Source)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:316)
| ... 1 more
my jboss-service XML
| <server>
| <mbean code="org.jboss.ha.singleton.HASingletonController"
| name="com:service=MyService-HASingletonController">
| <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
| <depends>com:service=MyClusterService</depends>
| <attribute name="PartitionName">${jboss.partition.name:DefaultPartition}</attribute>
| <attribute name="TargetName">com:service=MyClusterService</attribute>
| <attribute name="TargetStartMethod">startSingleton</attribute>
| <attribute name="TargetStopMethod">stopSingleton</attribute>
| </mbean>
| <mbean code="com.server.common.startup.cluster.MyClusterService"
| name="com:service=MyClusterService">
| </mbean>
| </server>
|
Am I missing anything fundamental
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091967#4091967
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091967
18Â years, 6Â months
[JBoss Portal] - Re: User Identity modules in a Portlet?
by Antoine_h
For the first question, yes, the "transactionManager" is initialized by the Portlet Container.
It is a kind of Injection, like oftenly used in AOP (Aspect Oriented Programming), in EJB3 (for the persistenceManager), in Seam, etc...
Second question :
you are doing a Login Portlet : a portlet to do the login ?
if so : there are a few post on that.
it is not recommended : that's why the portal does not provide one !
the login is done by Tomcat (usual tomcat feature, with jsp page), and trying to have it in a portlet is not easy.
there is a Wiki on that :
http://wiki.jboss.org/wiki/Wiki.jsp?page=PortletLogin
and this post (among others) :
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=114467
using a jsp page is much more simple.
you can modify this page : login.jsp, in the portal-server.war
to make it look the way you want, and add a few features if necessary (cookie, and so...).
making a Login Portlet should be something to avoid, unless absolutely requiered (by the marketing ? ... try to explain it is very costly... and a simple jsp page is not a so bad alternative for the user experience of the portal).
for your question of going to the login.jsp page :
yes, that is the only way it can work as it is :
The portal container rely on Tomcat for the login process.
when a authenticated URL is called, the portal container redirect the request to tomcat authentification process, that call the login.jsp page.
Look at the web.xml in portal-server.war.
By the way, I have noticed it is no use to change the name of this page (myLogin.jsp).
It does not work... don't know why... something about Tomcat...
The best is to avoid to modify all this : let Tomcat do it the way it is... more reliable for security... and entering into modification inside Tomcat is a lot of work...
This Tomcat authentification process is also used by JBoss (outside the portal). Also by the SSO of JBoss. And it works in cluster...
That's many reason not to modify this...
About the way of writting your url :
String form_path="/auth/";
use the jsp tag for creating a portal url... much more reliable...
look at some example in the UserPortlet jsp pages...
hope I have understand well your question, and that this helps...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091965#4091965
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091965
18Â years, 6Â months
[Performance Tuning] - Thread creation impacts performance - SNMP stack
by dpocock
When an SNMP stack is used to send queries to remote SNMP agents, JBoss slows down. This is particularly severe when SNMP GetNext is used to browse a process table or other large table.
Various SNMP stacks, including the joeSNMP bundled with JBoss, and Westhawk SNMP stack, rely on thread creation. Usually there is a listening thread and a sending thread (for retries). These threads run in parallel to the main application.
J2EE prohibits arbitrary creation of threads. The various SNMP stacks do not create threads in a way that is safe for J2EE/JBoss.
In a typical `management station' application, a J2EE timer bean is used to send an SNMP get at regular intervals. E.g., every 60 seconds, an `SNMP Get' request is sent to discover the temperature reading of an external device.
What is the recommended way of implementing this application safely in the J2EE/JBoss environment? Is the joeSNMP stack bundled with JBoss modified to perform this function safely?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091957#4091957
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091957
18Â years, 6Â months