[Clustering/JBoss] - Re: Way to identify graceful startup/shutdown in cluster gro
by bstansberry@jboss.com
Hmm, this would take some work.
If you were asking about the server that's leaving you could listen for a JMX notification from the jboss.system:type=Server mbean of type "org.jboss.system.server.stopped". That notification is sent out at the beginning of a clean shutdown.
JGroups itself, when it issues a new view doesn't include information about what caused the change. When a node is suspected (i.e. is being excluded from the group due to suspected failure) it issues a notification before it issues a new view. But the intervening layers in JBoss don't expose any hooks for user code to get that "suspect" notification.
The org.jboss.ha.jmx.HAServiceMBeanSupport utility class has the ability to send JMX notifications around the cluster. Perhaps you could write a service that subclasses HAServiceMBeanSupport and listens for the local "org.jboss.system.server.stopped" notification from jboss.system:type=Server. It would then rebroadcast it around the cluster, including the node id of the node.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154077#4154077
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154077
17 years, 11 months
[JBoss jBPM] - Could not instantiate TransactionManagerLookup
by greenHand
I have the jbpm-enterprise.ear deployed in Weblogic 9.2.3. The jndi to the data source is also setup. I wrote a message driven bean to invoke jbpm with the following onMessage() method:
public void onMessage(Message msg) {
| try {
| InitialContext ctx = new InitialContext();
|
| RemoteCommandServiceHome commandServiceHome =
| (RemoteCommandServiceHome) ctx.lookup("ejb/CommandServiceBean");
| RemoteCommandService commandService = commandServiceHome.create();
| commandService.execute(new NewProcessInstanceCommand("MyProcessDef"));
| }
| catch (NamingException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| catch (RemoteException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| catch (CreateException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| catch (Exception e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| }
However, I got the "Could not instantiate TransactionManagerLookup" error when the message is received:
org.jbpm.JbpmException: couldn't execute org.jbpm.command.NewProcessInstanceCommand@139ed6f
at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:92)
at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl.execute(CommandServiceBean_jdfmx8_EOImpl.java:60)
at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:335)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl_923_WLStub.execute(Unknown Source)
at com.pbsg.mst.wf.WFStarterMDB.onMessage(WFStarterMDB.java:48)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:429)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
at com.ibm.mq.jms.MQMessageConsumer.receiveAsyncQ(MQMessageConsumer.java:2431)
at com.ibm.mq.jms.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:3816)
at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:420)
at java.lang.Thread.run(Thread.java:595)
org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup
at org.hibernate.transaction.TransactionManagerLookupFactory.getTransactionManagerLookup(TransactionManagerLookupFactory.java:47)
at org.hibernate.cfg.SettingsFactory.createTransactionManagerLookup(SettingsFactory.java:418)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:140)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:341)
at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
at org.jbpm.JbpmContext.newProcessInstance(JbpmContext.java:408)
at org.jbpm.command.NewProcessInstanceCommand.execute(NewProcessInstanceCommand.java:74)
at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:90)
at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl.execute(CommandServiceBean_jdfmx8_EOImpl.java:60)
at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:335)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl_923_WLStub.execute(Unknown Source)
at com.pbsg.mst.wf.WFStarterMDB.onMessage(WFStarterMDB.java:48)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:429)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
at com.ibm.mq.jms.MQMessageConsumer.receiveAsyncQ(MQMessageConsumer.java:2431)
at com.ibm.mq.jms.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:3816)
at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:420)
at java.lang.Thread.run(Thread.java:595)
>
Here is the hibernate.cfg.xml settings:
<session-factory>
|
| <!-- hibernate dialect -->
| <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
|
| <!-- JDBC connection properties (begin) ===
| <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
| <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
| <property name="hibernate.connection.username">name</property>
| <property name="hibernate.connection.password">pass</property>
| ==== JDBC connection properties (end) -->
|
| <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
|
| <!-- DataSource properties (begin) -->
| <property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDS</property>
| <!-- DataSource properties (end) -->
|
| <!-- JTA transaction properties (begin) ===
| <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
| <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WebLogicTransactionManagerLookup</property>
| ==== JTA transaction properties (end) -->
|
| <!-- CMT transaction properties (begin) -->
| <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
| <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WebLogicTransactionManagerLookup</property>
| <!-- CMT transaction properties (end) -->
Can anyone help? Thank you very much for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154060#4154060
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154060
17 years, 11 months
[JBoss Portal] - CMS Query - sub-directory isolation
by hispanic
I'm wondering if the portal CMS supports directory-specific queries. The CMS search function relies on the ...jcr.command.SearchCommand class. I took a look at the querystring it creates and see the following when I search for "jboss":
//*[jcr:contains(., 'jboss')]
When searching against the default portal content, this search returns more than a dozen matches, a few of which are located in the /default/images directory.
I modified the code a bit to determine the search function's ability to constrain the results to a specified directory, like so:
/default/images/*[jcr:contains(., 'jboss')]
and
//default/images/*[jcr:contains(., 'jboss')]
Both of these searches return zero matches. I don't have a lot of experience with XQuery/XPath, but I believe either of these queries should return several matches (e.g., back.gif, check.gif, etc.). Would someone please verify that directory-specific queries work (or don't work) in portal CMS? I don't see any unit tests demonstrating/proving this functionality.
I'm concerned about the CMS' scalability if searches are always being performed from the root. I'd like to be able to structure the CMS so that searches can be constrained to a branch of the tree.
JBoss Portal Version - v2.6.4 (download)
JBoss AS Version - v4.2.2
Database Vendor and Version - SQLServer 2005
JDBC Connector and Version - JTDS v1.2.2
OS Platform - Windows XP Pro SP2
Post any modified configuration files for the portal...
In order to test this, I had to extend some of the CMS-related classes and place them in the server\default\deploy\jboss-portal.sar\portal-cms.sar\lib directory.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154053#4154053
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154053
17 years, 11 months