[JBoss Messaging] - Can't get ConnectionFactory for JMS from JNDI when using custom security domain
by Somefname1 Somelname1
Somefname1 Somelname1 [https://community.jboss.org/people/mybrandnewusername] created the discussion
"Can't get ConnectionFactory for JMS from JNDI when using custom security domain"
To view the discussion, visit: https://community.jboss.org/message/808534#808534
--------------------------------------------------------------
I'm running hornet JMS and EJB on jboss-as-7.2.0.Final with my custom security domain. But in JMS test I can't get ConnectionFactory. When I do not use my security domain for remoting subsystem, JMS works fine. EJB works fine with my security domain.
I use standalone-full.xml for my test with several changes:
1. security realm
{code:xml}
<security-realm name="MYRealm">
<authentication>
<jaas name="mydomain"/>
</authentication>
</security-realm>
{code}
2. security domain
{code:xml}
<security-domain name="mydomain">
<authentication>
<login-module code="my.module.MyLoginModule" flag="required" module="my.module"/>
</authentication>
</security-domain>
{code}
3. my queue
{code:xml}
<jms-queue name="DemoInfoQ">
<entry name="jms/queue/DemoInfoQ"/>
<entry name="java:jboss/exported/jms/queue/DemoInfoQ"/>
</jms-queue>
{code}
4. set my security realm for remoting subsystem
{code:xml}
<subsystem xmlns="urn:jboss:domain:remoting:1.1">
<connector name="remoting-connector" socket-binding="remoting" security-realm="MYRealm"/>
</subsystem>
{code}
When I change security realm for remoting subsystem (4) to "ApplicationRealm" or nothing, JMS works. But with MYRealm my test client gives an exception, when I try to lookup ConnectionFactory:
{code}
javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://localhost:4447]
{code}
Why do I get such a strange error and how can I fix that? I expect some kind of security exception at least. "my.module.MyLoginModule" allows all (for test purpose), and (once again) EJB woks ok with my realm.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/808534#808534]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[JBoss Messaging] - Network failure problem
by fregg
fregg [https://community.jboss.org/people/fregg] created the discussion
"Network failure problem"
To view the discussion, visit: https://community.jboss.org/message/808492#808492
--------------------------------------------------------------
Hi,
Our goal is to provide stable solution that will protect us from most common failures eg. one JBM node failure or network failure.
We have clustered JBoss Messaging 1.4.8 and standalone application server JBoss 5.1.
On JBoss messaging we have clustered queue 'QueueA' deployed.
On JBoss 5.1 we have a MDB consuming from 'QueueA'.
We tested our configuration against node failure and it works fine.
After crash of one node via hard kill or machine restart MDB is connecting to the second node and consumes messages.
However we are puzzled by the following case: if we block the connection to one node, on the client machine, via iptables DROP we notice that MDB is hanging.
We tried with with very different bisocket and connection factories configurations but the problem remains unresolved.
Interesting thing is that the control connections to the node that is not blocked are closed immiedately after iptables block and client still tries to connect to blocked node.
Is it a known issue? Can we find somewhere proper messaging and client configuration?
Thanks in advance
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/808492#808492]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - JBPM HUMAN TASK, TASK SERVER
by RSTVMA LDHYAGF
RSTVMA LDHYAGF [https://community.jboss.org/people/mab1990.amu] created the discussion
"JBPM HUMAN TASK, TASK SERVER"
To view the discussion, visit: https://community.jboss.org/message/746278#746278
--------------------------------------------------------------
Hello,
can someone please help me with this: I created my JBPM project with some human task in but when i try to run it this error pops out:
| 0 | 05/07 11:17:53,531[main] ERROR workitem.wsht.GenericHTWorkItemHandler.executeWorkItem -
Thu Jul 05 11:17:53 WAT 2012: Error when creating task on task server for work item id 1. Error reported by task server: Task operation request timed out |
java.lang.RuntimeException: Task operation request timed out
| | at org.jbpm.task.service.SyncTaskServiceWrapper.addTask(SyncTaskServiceWrapper.java:118) |
| | at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:145) |
| | at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70) |
| | at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164) |
| | at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49) |
| | at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) |
| | at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) |
| | at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188) |
| | at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:303) |
| | at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:168) |
| | at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:138) |
| | at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1082) |
| | at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320) |
| | at com.principal.PrincipalProcess.main(PrincipalProcess.java:30) |
Process Started..........
I don't know if i have to set something in order to connect to the server, because i have set the IpAddress and the port but still from the localhost:8080/jbpm-console i can't see my processes i only see the evaluation.bpmn that i got from the jbpm-installer folder
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/746278#746278]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
Re: [jboss-user] [JBoss Web Services] - JBossWS - AS 7 FAQ
by Alexander Holbreich
Alexander Holbreich [https://community.jboss.org/people/shuron] commented on the document
"JBossWS - AS 7 FAQ"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-16722#comment-11893
--------------------------------------------------
How should jboss-deployment-structure.xml look like to be able to use @InInterceptor annotation on own services.
I'm getting "transitiv dependencies" exception,
"org.apache.cxf.interceptor.Fault: Could not create annotation object: x.y.z.TestInterceptor",
Caused by: java.lang.InstantiationException: x.y.z.TestInterceptor
We use JBoss EAP 6. and i've tried all variants of
|
|
| <module name="org.jboss.ws.cxf.jbossws-cxf-server" export="true" /> |
|
|
|
| <module name="org.jboss.ws.cxf.jbossws-cxf-client" export="true" /> |
|
|
| <module name="org.apache.cxf" services="export" export="true" /> |
|
--------------------------------------------------
13 years
[JNDI and Naming] - container independent datasource jndi name in persistence.xml
by Jean-Philippe Steck
Jean-Philippe Steck [https://community.jboss.org/people/jpsteck] created the discussion
"container independent datasource jndi name in persistence.xml"
To view the discussion, visit: https://community.jboss.org/message/808396#808396
--------------------------------------------------------------
Hello,
I'm setting up a prototype application that has to be container independent, as far as possible.
I started with Jboss-as-7.1.1, and now I'm trying to migrate this prototype to Glassfish 3.
First problem I found is the jndi name of the datasource used in my persistence.xml file.
In JBoss, I have declared a datasource with the jndi name "java:jboss/datasources/MyDS" in standalone.xml. And I use that name "java:jboss/datasources/MyDS" in persistence.xml.
Now in Glassfish, the declared datasource is "jdbc/MyDS". If I change my persistence.xml to "jdbc/MyDS", everything works.
But I can't set a jndi name with a ":" in Glassfish, so I have to touch something to the JBoss side.
But how can I use the same persistence.xml file for both application server ?
What I've done is to change the datasource definition in jboss standalone.xml :
I defined a "java:/jdbc/MyDS" datasource with use-java-context="false"
And now it's working on both JBoss and Glassfish with the same exact persistence.xml file, having the jta-datasource set to "jdbc/MyDS".
My question : is it the right way to achieve this portability ?
What is the exact consequence of use-java-context=false ? I read that it makes the datasource available to an external client. Does it implies security issues ?
My next step will be to test the portability of using a JMS Queue, and then other app server.
Has anyone such experience to share about application server portability ?
Thanks
--JPS
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/808396#808396]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - Task Server Problem
by Jonathan Albornoz
Jonathan Albornoz [https://community.jboss.org/people/betoflint] created the discussion
"Task Server Problem"
To view the discussion, visit: https://community.jboss.org/message/808331#808331
--------------------------------------------------------------
Hi, i have a problem with my java application with jboss 7.0.2, jbpm 5.3 and oracle.
i run my application and not have problem, but in a few minuts, the server task is blocked, and the log told me that can´t retrieve task.
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.drools.SystemEventListenerFactory;
import org.jbpm.task.service.TaskService;
import org.jbpm.task.service.TaskServiceSession;
import org.jbpm.task.service.mina.MinaTaskServer;
public class levantarServidorTareas {
public static void main(String[] args) {
try {
EntityManagerFactory emf = Persistence
.createEntityManagerFactory("org.jbpm.task");
TaskService taskService = new TaskService(emf,
SystemEventListenerFactory.getSystemEventListener());
TaskServiceSession ts = taskService.createSession();
MinaTaskServer server = new MinaTaskServer(taskService);
Thread thread = new Thread(server);
thread.start();
System.out
.println("Servidor de Tareas se inició Correctamente...!!"); //The server task start correctly
} catch (Exception e) {
System.out.println("Servidor de Tareas no se pudo Iniciar...!!"); //The server task is not correctly
}
}
}
THIS IS MY CLASE JBPM ASSOCIATED TO MY APPLICATION
|| *Clase Jbpm* ||
| package cl.mop.ryc.bpm.bo;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.drools.KnowledgeBaseFactory;
import org.drools.base.MapGlobalResolver;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.persistence.jpa.JPAKnowledgeService;
import org.drools.runtime.Environment;
import org.drools.runtime.EnvironmentName;
import org.drools.runtime.KnowledgeSessionConfiguration;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.process.ProcessInstance;
import org.jbpm.process.audit.JPAWorkingMemoryDbLogger;
import org.jbpm.process.workitem.wsht.MinaHTWorkItemHandler;
import bitronix.tm.TransactionManagerServices;
public class ClasesJbpm {
public EntityManagerFactory emf;
public Environment env;
public StatefulKnowledgeSession ksession;
public MinaHTWorkItemHandler hornetQHTWorkItemHandler;
public JPAWorkingMemoryDbLogger logger;
public org.jbpm.task.TaskService client;
public void persistenciaSesion() {
emf = Persistence
.createEntityManagerFactory("org.jbpm.persistence.jpa");
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties
.put("drools.processInstanceManagerFactory",
"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory",
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory
.newKnowledgeSessionConfiguration(properties);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("HumanTask.bpmn"),
ResourceType.BPMN2);
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(
kbuilder.newKnowledgeBase(), config, env);
}
public void persistenciaSesionLoad(int id) {
emf = Persistence
.createEntityManagerFactory("org.jbpm.persistence.jpa");
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties
.put("drools.processInstanceManagerFactory",
"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory",
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory
.newKnowledgeSessionConfiguration(properties);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("HumanTask.bpmn"),
ResourceType.BPMN2);
ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(id,
kbuilder.newKnowledgeBase(), config, env);
}
public void persistenciaSesionConcesion() {
emf = Persistence
.createEntityManagerFactory("org.jbpm.persistence.jpa");
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties
.put("drools.processInstanceManagerFactory",
"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory",
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory
.newKnowledgeSessionConfiguration(properties);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("Concesiones.bpmn"),
ResourceType.BPMN2);
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(
kbuilder.newKnowledgeBase(), config, env);
}
public void persistenciaSesionTransparencia() {
emf = Persistence
.createEntityManagerFactory("org.jbpm.persistence.jpa");
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties
.put("drools.processInstanceManagerFactory",
"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory",
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory
.newKnowledgeSessionConfiguration(properties);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(
ResourceFactory.newClassPathResource("Transparencia.bpmn"),
ResourceType.BPMN2);
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(
kbuilder.newKnowledgeBase(), config, env);
}
public void persistenciaSesionActoresRelevantes() {
emf = Persistence
.createEntityManagerFactory("org.jbpm.persistence.jpa");
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties
.put("drools.processInstanceManagerFactory",
"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory",
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory
.newKnowledgeSessionConfiguration(properties);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(
ResourceFactory.newClassPathResource("ActoresRelevantes.bpmn"),
ResourceType.BPMN2);
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(
kbuilder.newKnowledgeBase(), config, env);
}
public void persistenciaSesionLoadActoresRelevantes(int id) {
emf = Persistence
.createEntityManagerFactory("org.jbpm.persistence.jpa");
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties
.put("drools.processInstanceManagerFactory",
"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory",
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory
.newKnowledgeSessionConfiguration(properties);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(
ResourceFactory.newClassPathResource("ActoresRelevantes.bpmn"),
ResourceType.BPMN2);
ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(id,
kbuilder.newKnowledgeBase(), config, env);
}
public void persistenciaSesionLoadTransparencia(int id) {
emf = Persistence
.createEntityManagerFactory("org.jbpm.persistence.jpa");
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties
.put("drools.processInstanceManagerFactory",
"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory",
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory
.newKnowledgeSessionConfiguration(properties);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(
ResourceFactory.newClassPathResource("Transparencia.bpmn"),
ResourceType.BPMN2);
ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(id,
kbuilder.newKnowledgeBase(), config, env);
}
public void persistenciaSesionLoadConcesion(int id) {
emf = Persistence
.createEntityManagerFactory("org.jbpm.persistence.jpa");
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties
.put("drools.processInstanceManagerFactory",
"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory",
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory
.newKnowledgeSessionConfiguration(properties);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("Concesiones.bpmn"),
ResourceType.BPMN2);
ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(id,
kbuilder.newKnowledgeBase(), config, env);
}
public void registrarWorkItemHandler() {
hornetQHTWorkItemHandler = new MinaHTWorkItemHandler(ksession);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task",
hornetQHTWorkItemHandler);
hornetQHTWorkItemHandler.setIpAddress("127.0.0.1");
hornetQHTWorkItemHandler.setPort(9123);
hornetQHTWorkItemHandler.connect();
ksession.getWorkItemManager().registerWorkItemHandler("Human Task",
hornetQHTWorkItemHandler);
}
public void registrarLogger() {
logger = new JPAWorkingMemoryDbLogger(ksession);
}
public void instanciarProceso(String idProceso, Map<String, Object> params) {
ksession.startProcess(idProceso, params);
}
public ProcessInstance instanciarProceso(String idProceso) {
ProcessInstance pi = ksession.startProcess(idProceso);
return pi;
}
public ProcessInstance instanciarProcesoParam(String idProceso,
HashMap<String, Object> param) {
ProcessInstance pi = ksession.startProcess(idProceso, param);
return pi;
}
public void obtenerCliente() {
client = hornetQHTWorkItemHandler.getClient();
}
public void cerrarConexion() {
try {
client.disconnect();
hornetQHTWorkItemHandler.dispose();
} catch (Exception e) {
e.printStackTrace();
}
logger.dispose();
ksession.dispose();
}
} |
|
|
AND FINALLY MY PERSISTENCE.XML ASSOCIATED TO THE APP
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence"
xmlns:orm=" http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd http://java.sun.com/xml/ns/persistence/orm_1_0.xsd">
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver" />
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@172.16.1.35:1521:prodbeta" />
<property name="hibernate.connection.username" value="jbpm5" />
<property name="hibernate.connection.password" value="ryc" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />
</properties>
</persistence-unit>
<persistence-unit name="org.jbpm.task">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<mapping-file>META-INF/Taskorm.xml</mapping-file>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.User</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.default_schema" value="jbpm5"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@172.16.1.35:1521:prodbeta" />
<property name="hibernate.connection.username" value="jbpm5"/>
<property name="hibernate.connection.password" value="ryc"/>
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>
</persistence>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/808331#808331]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - Re: Start an Process From a State
by Jiri Svitak
Jiri Svitak [https://community.jboss.org/people/jsvitak] created the discussion
"Re: Start an Process From a State"
To view the discussion, visit: https://community.jboss.org/message/808265#808265
--------------------------------------------------------------
Hello Fabio,
I am not sure if I have correctly understood your scenario. But you can implement own service tasks - work item definitions and handlers for them, which are java classes. Refer to Domain-specific processes chapter in the documentation. In these service tasks you can implement own java code, which is able to query database for information or to persist some information to the database.
Usually you start business process, it runs several nodes and stops for example at the first human task. The process execution ends here and engine returns from startProcess method. You can restore the engine execution when completing a task. User completes his task and immediately in the same time the process execution is restored in order to execute next nodes in process flow. I can recommend the book jBPM 5 Developer Guide, where you can find more information how to develop these scenarios.
Params which you supply when starting the process are mapped to process variables, these can be accessed anywhere in the process directly or using kcontext, refer to 6.8.1 Data section of the documentation for more details.
I do not know what you mean by 'a specific state'. Usually the execution of suspended process is restored after human task, or asynchronous service task. If you want to start another flow in the process during its execution, use signals and catch events.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/808265#808265]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years