[Messaging, JMS & JBossMQ] - Re: Multiple persistence strategies in jbossMQ
by bortx
I'm so sorry, The text has wrong format. I post it again in order to be readable. Thank you.
1) Set up null-persistence-service.xml in deploy/jms. Change all object names so that they don't collide with the jdbc persistence manager. That is, NullDestinationManager, NullMessageCache, and NullPersistenceManager. In this step I haven't specified a CacheStore object, because it is not specified in null persistence configuration.
| <mbean code="org.jboss.mq.server.jmx.DestinationManager" name="jboss.mq:service=NullDestinationManager">
| <depends optional-attribute-name="MessageCache">jboss.mq:service=NullMessageCache</depends>
| <depends optional-attribute-name="PersistenceManager">jboss.mq:service=NullPersistenceManager</depends>
| <depends optional-attribute-name="StateManager">jboss.mq:service=StateManager</depends>
| </mbean>
|
| <mbean code="org.jboss.mq.server.MessageCache"
| name="jboss.mq:service=NullMessageCache">
| <attribute name="HighMemoryMark">50</attribute>
| <attribute name="MaxMemoryMark">60</attribute>
| <attribute name="CacheStore">jboss.mq:service=NullPersistenceManager</attribute>
| </mbean>
|
| <mbean code="org.jboss.mq.pm.none.PersistenceManager"
| name="jboss.mq:service=NullPersistenceManager">
| </mbean>
|
2) Create a 2nd invoker (NullInvoker) in jbossmq-service.xml that is a copy of the Invoker (with local versions of all configured interceptors.) NullInvoker uses NullDestinationManager.
| <!-- Null Invoker -->
| <mbean code="org.jboss.mq.server.jmx.Invoker" name="jboss.mq:service=NullInvoker">
| <depends optional-attribute-name="NextInterceptor">jboss.mq:service=NullTracingInterceptor</depends>
| <depends>jboss:service=Naming</depends>
| </mbean>
|
| <mbean code="org.jboss.mq.server.jmx.InterceptorLoader" name="jboss.mq:service=NullTracingInterceptor">
| <attribute name="InterceptorClass">org.jboss.mq.server.TracingInterceptor</attribute>
| <depends optional-attribute-name="NextInterceptor">jboss.mq:service=NullSecurityManager</depends>
| </mbean>
|
| <mbean code="org.jboss.mq.security.SecurityManager" name="jboss.mq:service=NullSecurityManager">
| <attribute name="DefaultSecurityConfig">
| <security>
| <role name="guest" read="true" write="true" create="true"/>
| </security>
| </attribute>
| <attribute name="SecurityDomain">java:/jaas/jbossmq</attribute>
| <depends optional-attribute-name="NextInterceptor">jboss.mq:service=NullDestinationManager</depends>
| </mbean>
|
3) Point jvm-il-service.xml at NullInvoker instead of Invoker.
| <mbean code="org.jboss.mq.il.jvm.JVMServerILService"
| name="jboss.mq:service=InvocationLayer,type=JVM">
| <depends optional-attribute-name="Invoker">jboss.mq:service=NullInvoker</depends>
| <attribute name="ConnectionFactoryJNDIRef">java:/ConnectionFactory</attribute>
| <attribute name="XAConnectionFactoryJNDIRef">java:/XAConnectionFactory</attribute>
| <attribute name="PingPeriod">0</attribute>
| </mbean>
|
4) Modify some of my local destinations to point at NullDestinationManager instead of DestinationManager.
| <mbean code="org.jboss.mq.server.jmx.Topic"
| name="jboss.mq.destination:service=Topic,name=LogginTopic">
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
| <attribute name="JNDIName">topic/SomCDRLog</attribute>
| </mbean>
|
| <mbean code="org.jboss.mq.server.jmx.Queue"
| name="jboss.mq.destination:service=Queue,name=ApplicationQueue">
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=NullDestinationManager</depends>
| <!-- <depends optional-attribute-name="SecurityManager">jboss.mq:service=NullSecurityManager</depends> -->
| <attribute name="JNDIName">queue/SomExecutableQueue
| </attribute>
| </mbean>
|
Then, I'm getting errors starting jboss that say
javax.jms.InvalidDestinationException: The destination TOPIC.LogginTopic does not exist !
I don't know what's going wrong, any help you can give me is appreciated.
Thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028728#4028728
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028728
19Â years, 1Â month
[JBoss jBPM] - Setting up JBoss database for deployment
by Hattifnat
Hello!
As a fresh Jboss user I came to a problem that is basic probably for most of you, but I cannot find a solution anywhere.
I am using jBPM-starters kit 3.1.4 and working in Eclipse with the JBoss plugin.
I try to create two processes, where one is nested in another as a subflow. The very simplified version of the problem is such:
Super-process:
<?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.1" name="Super">
| <start-state name="start">
| <transition name="" to="process1"></transition>
| </start-state>
| <process-state name="process1">
| <sub-process name="Sub" />
| <transition name="" to="end1"></transition>
| </process-state>
| <end-state name="end1"></end-state>
| </process-definition>
Sub-process:
<?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.1" name="Sub">
| <start-state name="start">
| <transition name="" to="end1"></transition>
| </start-state>
| <end-state name="end1"></end-state>
| </process-definition>
Then I try to run the super-process in a way suggested in this thread:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=93504
public class Test {
|
| public static void main(String[] args) {
|
| JbpmContext context = JbpmConfiguration.getInstance()
| .createJbpmContext();
|
| try {
| FileInputStream fis_super = new FileInputStream(
| "/path/Eclipse/workspace/SubflowTest/src/main/Super/processdefinition.xml");
| FileInputStream fis_sub = new FileInputStream(
| "/path/Eclipse/workspace/SubflowTest/src/main/Sub/processdefinition.xml");
|
| ProcessDefinition pdload_sub = ProcessDefinition
| .parseXmlInputStream(fis_sub);
| context.deployProcessDefinition(pdload_sub);
|
| ProcessDefinition pdload_super = ProcessDefinition
| .parseXmlInputStream(fis_super);
| context.deployProcessDefinition(pdload_super);
|
| GraphSession gs_caller = context.getGraphSession();
|
| // don't think I necessarily need to reload the process definitions
| // from the session but it doesn't make a difference
| ProcessDefinition pd_sub = gs_caller
| .findLatestProcessDefinition("Sub");
| ProcessDefinition pd_super = gs_caller
| .findLatestProcessDefinition("Super");
|
| ProcessInstance inst = new ProcessInstance(pd_super);
|
| // begin
| Token token = inst.getRootToken();
| ContextInstance contextInst = (ContextInstance) inst
| .getInstance(ContextInstance.class);
|
| System.out.println("getNode().getName(): "
| + token.getNode().getName());
|
| token.signal();
| System.out.println("getNode().getName(): "
| + token.getNode().getName());
| } catch (Exception e) {
| e.printStackTrace();
| } finally {
| context.close();
| }
| }
| }
The result of the execution is the well known "table JBPM_PROCESSDEFINITION not found" error (exactly:
10:49:44,916 [main] DEBUG DbPersistenceService : beginning hibernate transaction
| 10:49:44,959 [main] WARN JDBCExceptionReporter : SQL Error: -22, SQLState: S0002
| 10:49:44,960 [main] ERROR JDBCExceptionReporter : Table not found in statement [select top ? processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME2_4_, processdef0_.VERSION_ as VERSION3_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN4_4_, processdef0_.STARTSTATE_ as STARTSTATE5_4_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
| org.hibernate.exception.SQLGrammarException: could not execute query
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.loader.Loader.doList(Loader.java:2153)
| (...)
| Caused by: java.sql.SQLException: Table not found in statement [select top ? processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME2_4_, processdef0_.VERSION_ as VERSION3_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN4_4_, processdef0_.STARTSTATE_ as STARTSTATE5_4_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
| at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
| (...)
| 10:49:44,968 [main] ERROR GraphSession : org.hibernate.exception.SQLGrammarException: could not execute query
| org.jbpm.JbpmException: couldn't find process definition 'Sub'
| at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:157)
| at org.jbpm.db.GraphSession.deployProcessDefinition(GraphSession.java:67)
| at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
| at Test.main(Test.java:26)
| Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| (...)
| Caused by: java.sql.SQLException: Table not found in statement [select top ? processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME2_4_, processdef0_.VERSION_ as VERSION3_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN4_4_, processdef0_.STARTSTATE_ as STARTSTATE5_4_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
| at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
| (...)
| (I trimmed the log)
So one thing I understood from what I read in the forum and in the Internet - i have to set up the Hibernate database and create a table JBPM_PROCESSDEFINITION. But I couldn't find a hint on how to to it. Can it be done programatticaly? Or how should I do it in any other way (preferably nice and easy :P)?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028719#4028719
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028719
19Â years, 1Â month
[Messaging, JMS & JBossMQ] - Multiple persistence strategies in jbossMQ
by bortx
Hi,
I'm trying to configure different persistence strategies for my JMS queues and topics in jboss 4.0.5. What I need to do is
configure null persistance for the logging topic, and database persistance for the application queue. I hace seen this post
in jboss forum
http://www.jboss.org/index.html?module=bb&t=47828&op=viewtopic
and performed all the steps it says, but haven't made it to work.
These are the steps I have done:
1) Set up null-persistence-service.xml in deploy/jms. Change all object names so that they don't collide with the jdbc
persistence manager. That is, NullDestinationManager, NullMessageCache, and NullPersistenceManager. In this step I haven't
specified a CacheStore object, because it is not specified in null persistence configuration.
<depends optional-attribute-name="MessageCache">jboss.mq:service=NullMessageCache
<depends optional-attribute-name="PersistenceManager">jboss.mq:service=NullPersistenceManager
<depends optional-attribute-name="StateManager">jboss.mq:service=StateManager
50
60
jboss.mq:service=NullPersistenceManager
2) Create a 2nd invoker (NullInvoker) in jbossmq-service.xml that is a copy of the Invoker (with local versions of all
configured interceptors.) NullInvoker uses NullDestinationManager.
<!-- Null Invoker -->
<depends optional-attribute-name="NextInterceptor">jboss.mq:service=NullTracingInterceptor
jboss:service=Naming
org.jboss.mq.server.TracingInterceptor
<depends optional-attribute-name="NextInterceptor">jboss.mq:service=NullSecurityManager
java:/jaas/jbossmq
<depends optional-attribute-name="NextInterceptor">jboss.mq:service=NullDestinationManager
3) Point jvm-il-service.xml at NullInvoker instead of Invoker.
<depends optional-attribute-name="Invoker">jboss.mq:service=NullInvoker
java:/ConnectionFactory
java:/XAConnectionFactory
0
4) Modify some of my local destinations to point at NullDestinationManager instead of DestinationManager.
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager
topic/SomCDRLog
<depends optional-attribute-name="DestinationManager">jboss.mq:service=NullDestinationManager
<!-- <depends optional-attribute-name="SecurityManager">jboss.mq:service=NullSecurityManager -->
queue/SomExecutableQueue
Then, I'm getting errors starting jboss that say
javax.jms.InvalidDestinationException: The destination TOPIC.LogginTopic does not exist !
I don't know what's going wrong, any help you can give me is appreciated.
Thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028716#4028716
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028716
19Â years, 1Â month