[JBoss ESB Development] - Per http-provider security for EBWS - possible?
by Carvel Baus
Carvel Baus [https://community.jboss.org/people/scalaenthusiast] created the discussion
"Per http-provider security for EBWS - possible?"
To view the discussion, visit: https://community.jboss.org/message/797141#797141
--------------------------------------------------------------
I am attempting to use an HTTPGateway together with a SOAPProxy action to proxy a webservice. I need to be able to provide multiple endpoints, each with a different security contract, for the proxied web service (the point of the multiple endpoints is to have different security configurations.) After reading this post, where a discussion took place about adding the war-security tag to the ESB, it seems that being able to specify different security configurations for each endpoint (configured here using separate http-bus tags) is not possible: https://community.jboss.org/message/349913#349913 https://community.jboss.org/message/349913
What would be nice, is to be able to configure separate security configurations for each http-bus reference.
So my question is: Is what I want to do actually possible (JBoss ESB 4.11) and I am just missing it? If not, should it be a feature? It would make what I am trying to do a whole lot easier. If not, it seems I have to deploy multiple war files to handle each end point with differing security contracts and then get the requests to the ESB to be passed onto the proxied web service. Being able to specify it all here in a single ESB deployment file would be great - makes managing it a whole lot easier.
Here is what my jboss-esb.xml looks like thus far:
{code:xml}
<?xml version = "1.0" encoding = "UTF-8"?>
<jbossesb
xmlns=" http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml... http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml..."
parameterReloadSecs="5">
<globals>
<!-- Security setting for all http-providers and all EBWSs in this jboss-esb.xml file.-->
<war-security method="BASIC" domain="JBossWS" />
</globals>
<providers>
<http-provider name="http">
<http-bus busid="noaSecurity"/>
<http-bus busid="pkiSecurity"/>
<http-bus busid="wcfSecurity"/>
</http-provider>
</providers>
<services>
<service category="Stock" name="Quote" description="Stock Quote" invmScope="GLOBAL">
<listeners>
<http-gateway name="GW-NOA" busidref="noaSecurity" urlPattern="noa/*" />
<http-gateway name="GW-PKI" busidref="pkiSecurity" urlPattern="pki/*"/>
<http-gateway name="GW-WCF" busidref="wcfSecurity" urlPattern="wcf/*"/>
</listeners>
<actions mep="RequestResponse">
<action name="proxy" class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy">
<property name="wsdl" value=" http://www.webservicex.net/stockquote.asmx?WSDL http://www.webservicex.net/stockquote.asmx?WSDL"/>
</action>
</actions>
</service>
</services>
</jbossesb>
{code}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/797141#797141]
Start a new discussion in JBoss ESB Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years
[jBPM Development] - How to get results form Work Item handler
by Ashutosh Kumar
Ashutosh Kumar [https://community.jboss.org/people/ashu.itbhu] created the discussion
"How to get results form Work Item handler"
To view the discussion, visit: https://community.jboss.org/message/798109#798109
--------------------------------------------------------------
I want to impl db handler and my dbhandler.wid file is like this...
------------------------------------------------------------ ----------------------------------------
In my WorkItemHandler impl class i have code like this
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
Map<String, Object> outputMap = new HashMap<String, Object>();
outputMap.put("results", emps);
manager.completeWorkItem(workItem.getId(), outputMap);
and in porcess i have
WI impl like
Result Mapping----->DB_OPS ---> map(java.util.HashMap)
but his is returning nothing from handler calss.... please let me know what wrong i am doing here.
Thanks....Ashutosh
import org.drools.process.core.datatype.impl.type.StringDataType;
import org.drools.process.core.datatype.impl.type.ObjectDataType;
[
// the Notification work item
[
"name" : "Database",
"parameters" : [
"GET_OR_UPDATE" : new StringDataType(),
"SQL" : new StringDataType(),
"ReturnMode" : new StringDataType(),
],
"results" : [
"DB_OPS" : new ObjectDataType(),
],
"displayName" : "Database",
"icon" : "icons/dbops.png"
]
]
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/798109#798109]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years
[jBPM Development] - org.jbpm.workflow.instance.WorkflowRuntimeException: -- Illegal method call. This session was previously disposed.
by Feki Ahmed
Feki Ahmed [https://community.jboss.org/people/bardelman] created the discussion
"org.jbpm.workflow.instance.WorkflowRuntimeException: -- Illegal method call. This session was previously disposed."
To view the discussion, visit: https://community.jboss.org/message/798071#798071
--------------------------------------------------------------
Hi,
i ve a simple java class with a main which i m using such as a test case.
All what i want to achieve is to get user task's from a loaded session which was previousely started and disposed.
i ve already seen questions asked about this issue(here: https://community.jboss.org/thread/201901 https://community.jboss.org/thread/201901) but still didn't find a solution for it anywhere. it s said that the session is disposed before transaction is completed which cause the mentioned error. and that the dispose must happen after transaction completion but i don't know what are transaction boundaries and how to know when it is completed.
this is the class with the main :
*************************************************************************************************************************
package com.salaboy.jbpm5;
import bitronix.tm.TransactionManagerServices;
import bitronix.tm.resource.jdbc.PoolingDataSource;
import com.salaboy.model.Person;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseFactory;
import org.drools.SystemEventListenerFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderError;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.impl.EnvironmentFactory;
import org.drools.io.impl.ClassPathResource;
import org.drools.persistence.jpa.JPAKnowledgeService;
import org.drools.runtime.*;
import org.drools.runtime.process.ProcessInstance;
import org.jbpm.process.workitem.wsht.LocalHTWorkItemHandler;
import org.jbpm.task.Group;
import org.jbpm.task.TaskService;
import org.jbpm.task.User;
import org.jbpm.task.query.TaskSummary;
import org.jbpm.task.service.local.LocalTaskService;
public class MytestMain {
private static PoolingDataSource ds;
public static void main(String[] args) {
ds = new PoolingDataSource();
//System.setProperty("java.naming.factory.initial", "bitronix.tm.jndi.BitronixInitialContextFactory");
ds.setUniqueName("jdbc/testDS1");
//NON XA CONFIGS
ds.setClassName("org.h2.jdbcx.JdbcDataSource");
ds.setMaxPoolSize(3);
ds.setAllowLocalTransactions(true);
ds.getDriverProperties().put("user", "sa");
ds.getDriverProperties().put("password", "sasa");
ds.getDriverProperties().put("URL", "jdbc:h2:mem:mydb");
//XA CONFIGS
// ds.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource");
// ds.setMaxPoolSize(3);
// ds.setAllowLocalTransactions(true);
// ds.getDriverProperties().put("user", "sa");
// ds.getDriverProperties().put("password", "sasa");
// ds.getDriverProperties().put("Url", "jdbc:h2:mem:mydb");
// ds.getDriverProperties().put("driverClassName", "org.h2.Driver");
ds.init();
///// FIN INITIALISATION
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(new ClassPathResource("process-async-interactions.bpmn"), ResourceType.BPMN2);
if (kbuilder.hasErrors()) {
for (KnowledgeBuilderError error : kbuilder.getErrors()) {
System.out.println(">>> Error:" + error.getMessage());
}
fail(">>> Knowledge couldn't be parsed! ");
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
Environment env = EnvironmentFactory.newEnvironment();
EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.runtime.ht");
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());
// Let's create a Persistence Knowledge Session
System.out.println(" >>> Let's create a Persistent Knowledge Session");
final StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);
int sessionId = ksession.getId();
// assertNotNull(sessionId);
// assertTrue(sessionId != 0);
// We need to register the WorkItems and Listeners that the session will use
TaskService client = createTaskService(emf);
LocalHTWorkItemHandler localHTWorkItemHandler = new LocalHTWorkItemHandler(client, ksession);
MockExternalServiceWorkItemHandler mockExternalServiceWorkItemHandler = new MockExternalServiceWorkItemHandler();
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", localHTWorkItemHandler);
ksession.getWorkItemManager().registerWorkItemHandler("External Service Call", mockExternalServiceWorkItemHandler);
//KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession);
// Let's create a Process Instance
Person person = new Person("Salaboy", 29);
Map<String, Object> params = new HashMap<String, Object>();
params.put("person", person);
//Each Command will generate an interaction
System.out.println(">>> Let's Create Process Instance");
ProcessInstance processInstance = ksession.createProcessInstance("com.salaboy.process.AsyncInteractions", params);
System.out.println(">>> Let's Start the Process Instance");
processInstance = ksession.startProcessInstance(processInstance.getId());
System.out.println(" >>> Looking for Salaboy's Tasks");
List<TaskSummary> salaboysTasks = client.getTasksAssignedAsPotentialOwner("salaboy", "en-UK");
//assertTrue(salaboysTasks.size() == 1);
System.out.println("salaboysTasks.size() : "+salaboysTasks.size());
TaskSummary salaboyTask = salaboysTasks.get(0);
System.out.println(" >>> Starting Salaboy's Task");
client.start(salaboyTask.getId(), "salaboy");
System.out.println(" >>> Completing Salaboy's Task");
client.complete(salaboyTask.getId(), "salaboy", null);
System.out.println(">>> Disposing Session");
ksession.dispose();
// Let's reload the session and create a different process instance inside it
StatefulKnowledgeSession loadedKsession = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null, env);
// All the listeners and WorkItemHandlers are volatile, so we need to register them each time that we reload the session
// from the DB.
LocalHTWorkItemHandler localHTWorkItemHandler2 = new LocalHTWorkItemHandler(client, ksession);
MockExternalServiceWorkItemHandler mockExternalServiceWorkItemHandler2 = new MockExternalServiceWorkItemHandler();
loadedKsession.getWorkItemManager().registerWorkItemHandler("Human Task", localHTWorkItemHandler2);
loadedKsession.getWorkItemManager().registerWorkItemHandler("External Service Call", mockExternalServiceWorkItemHandler2);
//Let's create another instance and start it.
System.out.println(">>> Let's Create Process Instance");
processInstance = loadedKsession.createProcessInstance("com.salaboy.process.AsyncInteractions", params);
System.out.println(">>> Let's Start the Process Instance");
long processInstanceTwo = processInstance.getId();
loadedKsession.startProcessInstance(processInstanceTwo);
System.out.println(">>> Disposing Session");
loadedKsession.dispose();
List<TaskSummary> adminTasks = client.getTasksAssignedAsPotentialOwner("Administrator", "en-UK");
//assertTrue(adminTasks.size() == 1);
System.out.println("adminTasks.size() : "+adminTasks.size());
TaskSummary adminTask = adminTasks.get(0);
client.start(adminTask.getId(), "Administrator");
client.complete(adminTask.getId(), "Administrator", null);
processInstance = ksession.getProcessInstance(processInstance.getId());
//The process instance was completed and it should be out of the Ksession.
//assertNull(processInstance);
if(processInstance==null)
System.out.println("processInstance is null ");
}
private static TaskService createTaskService(EntityManagerFactory emf) {
org.jbpm.task.service.TaskService taskService = new org.jbpm.task.service.TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
Map<String, User> users = new HashMap<String, User>();
users.put("salaboy", new User("salaboy"));
users.put("Administrator", new User("Administrator"));
Map<String, Group> groups = new HashMap<String, Group>();
taskService.addUsersAndGroups(users, groups);
TaskService client = new LocalTaskService(taskService);
return client;
}
}
*************************************************************************************************************************
and this is the log :
log4j:WARN No appenders could be found for logger (bitronix.tm.resource.jdbc.PoolingDataSource).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
>>> Let's create a Persistent Knowledge Session
Hibernate: insert into SessionInfo (id, lastModificationDate, rulesByteArray, startDate, OPTLOCK) values (null, ?, ?, ?, ?)
Hibernate: select task0_.id as col_0_0_, deadline1_.id as col_1_0_, deadline1_.deadline_date as col_2_0_ from Task task0_, Deadline deadline1_ where task0_.archived=0 and (deadline1_.id in (select startdeadl2_.id from Deadline startdeadl2_ where task0_.id=startdeadl2_.Deadlines_StartDeadLine_Id) or deadline1_.id in (select enddeadlin3_.id from Deadline enddeadlin3_ where task0_.id=enddeadlin3_.Deadlines_EndDeadLine_Id)) and deadline1_.escalated=0 order by deadline1_.deadline_date
Hibernate: select user0_.id as id8_0_ from OrganizationalEntity user0_ where user0_.id=? and user0_.DTYPE='User'
Hibernate: insert into OrganizationalEntity (DTYPE, id) values ('User', ?)
Hibernate: select user0_.id as id8_0_ from OrganizationalEntity user0_ where user0_.id=? and user0_.DTYPE='User'
Hibernate: insert into OrganizationalEntity (DTYPE, id) values ('User', ?)
>>> Let's Create Process Instance
Hibernate: insert into ProcessInstanceInfo (InstanceId, OPTLOCK, processId, startDate, lastReadDate, lastModificationDate, state, processInstanceByteArray) values (null, ?, ?, ?, ?, ?, ?, ?)
Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=?
Hibernate: update ProcessInstanceInfo set OPTLOCK=?, processId=?, startDate=?, lastReadDate=?, lastModificationDate=?, state=?, processInstanceByteArray=? where InstanceId=? and OPTLOCK=?
>>> Let's Start the Process Instance
Hibernate: select processins0_.InstanceId as InstanceId0_0_, processins0_.OPTLOCK as OPTLOCK0_0_, processins0_.processId as processId0_0_, processins0_.startDate as startDate0_0_, processins0_.lastReadDate as lastRead5_0_0_, processins0_.lastModificationDate as lastModi6_0_0_, processins0_.state as state0_0_, processins0_.processInstanceByteArray as processI8_0_0_ from ProcessInstanceInfo processins0_ where processins0_.InstanceId=?
Hibernate: insert into WorkItemInfo (workItemId, creationDate, name, processInstanceId, state, OPTLOCK, workItemByteArray) values (null, ?, ?, ?, ?, ?, ?)
Hibernate: select user_.id from OrganizationalEntity user_ where user_.id=?
Hibernate: insert into Task (id, archived, allowedToDelegate, taskInitiator_id, priority, activationTime, actualOwner_id, completedOn, createdBy_id, createdOn, documentAccessType, documentContentId, documentType, expirationTime, faultAccessType, faultContentId, faultName, faultType, outputAccessType, outputContentId, outputType, parentId, previousStatus, processId, processInstanceId, processSessionId, skipable, status, workItemId, OPTLOCK) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into I18NText (id, language, shortText, text) values (null, ?, ?, ?)
Hibernate: insert into I18NText (id, language, shortText, text) values (null, ?, ?, ?)
Hibernate: insert into Content (id, content) values (null, ?)
Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=?
Hibernate: select eventtypes0_.InstanceId as InstanceId0_, eventtypes0_.element as element0_ from EventTypes eventtypes0_ where eventtypes0_.InstanceId=?
Hibernate: update ProcessInstanceInfo set OPTLOCK=?, processId=?, startDate=?, lastReadDate=?, lastModificationDate=?, state=?, processInstanceByteArray=? where InstanceId=? and OPTLOCK=?
Hibernate: update WorkItemInfo set creationDate=?, name=?, processInstanceId=?, state=?, OPTLOCK=?, workItemByteArray=? where workItemId=? and OPTLOCK=?
Hibernate: update Task set archived=?, allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, completedOn=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processId=?, processInstanceId=?, processSessionId=?, skipable=?, status=?, workItemId=?, OPTLOCK=? where id=? and OPTLOCK=?
Hibernate: update I18NText set Task_Descriptions_Id=? where id=?
Hibernate: insert into PeopleAssignments_BAs (task_id, entity_id) values (?, ?)
Exception in thread "main" Hibernate: insert into PeopleAssignments_PotOwners (task_id, entity_id) values (?, ?)
Hibernate: update I18NText set Task_Subjects_Id=? where id=?
>>> Looking for Salaboy's Tasks
Hibernate: select task0_.id as col_0_0_, task0_.processInstanceId as col_1_0_, names5_.text as col_2_0_, subjects3_.text as col_3_0_, descriptio4_.text as col_4_0_, task0_.status as col_5_0_, task0_.priority as col_6_0_, task0_.skipable as col_7_0_, user2_.id as col_8_0_, user1_.id as col_9_0_, task0_.createdOn as col_10_0_, task0_.activationTime as col_11_0_, task0_.expirationTime as col_12_0_, task0_.processId as col_13_0_, task0_.processSessionId as col_14_0_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.createdBy_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join I18NText subjects3_ on task0_.id=subjects3_.Task_Subjects_Id left outer join I18NText descriptio4_ on task0_.id=descriptio4_.Task_Descriptions_Id left outer join I18NText names5_ on task0_.id=names5_.Task_Names_Id, OrganizationalEntity organizati6_ where task0_.archived=0 and (organizati6_.id=? or organizati6_.id in (?)) and (organizati6_.id in (select potentialo7_.entity_id from PeopleAssignments_PotOwners potentialo7_ where task0_.id=potentialo7_.task_id)) and (names5_.language=? or (select count(names8_.Task_Names_Id) from I18NText names8_ where task0_.id=names8_.Task_Names_Id)=0) and (subjects3_.language=? or (select count(subjects9_.Task_Subjects_Id) from I18NText subjects9_ where task0_.id=subjects9_.Task_Subjects_Id)=0) and (descriptio4_.language=? or (select count(descriptio10_.Task_Descriptions_Id) from I18NText descriptio10_ where task0_.id=descriptio10_.Task_Descriptions_Id)=0) and (task0_.status in ('Created' , 'Ready' , 'Reserved' , 'InProgress' , 'Suspended')) and (task0_.expirationTime is null)
Hibernate: select user0_.id as id8_0_ from OrganizationalEntity user0_ where user0_.id=? and user0_.DTYPE='User'
salaboysTasks.size() : 1
>>> Starting Salaboy's Task
Hibernate: update Task set archived=?, allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, completedOn=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processId=?, processInstanceId=?, processSessionId=?, skipable=?, status=?, workItemId=?, OPTLOCK=? where id=? and OPTLOCK=?
>>> Completing Salaboy's Task
Hibernate: update Task set archived=?, allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, completedOn=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processId=?, processInstanceId=?, processSessionId=?, skipable=?, status=?, workItemId=?, OPTLOCK=? where id=? and OPTLOCK=?
Hibernate: select workitemin0_.workItemId as workItemId16_0_, workitemin0_.creationDate as creation2_16_0_, workitemin0_.name as name16_0_, workitemin0_.processInstanceId as processI4_16_0_, workitemin0_.state as state16_0_, workitemin0_.OPTLOCK as OPTLOCK16_0_, workitemin0_.workItemByteArray as workItem7_16_0_ from WorkItemInfo workitemin0_ where workitemin0_.workItemId=?
Hibernate: select processins0_.InstanceId as InstanceId0_0_, processins0_.OPTLOCK as OPTLOCK0_0_, processins0_.processId as processId0_0_, processins0_.startDate as startDate0_0_, processins0_.lastReadDate as lastRead5_0_0_, processins0_.lastModificationDate as lastModi6_0_0_, processins0_.state as state0_0_, processins0_.processInstanceByteArray as processI8_0_0_ from ProcessInstanceInfo processins0_ where processins0_.InstanceId=?
Hibernate: insert into WorkItemInfo (workItemId, creationDate, name, processInstanceId, state, OPTLOCK, workItemByteArray) values (null, ?, ?, ?, ?, ?, ?)
>>> Completing an External Interaction
Hibernate: insert into WorkItemInfo (workItemId, creationDate, name, processInstanceId, state, OPTLOCK, workItemByteArray) values (null, ?, ?, ?, ?, ?, ?)
Hibernate: select user_.id from OrganizationalEntity user_ where user_.id=?
Hibernate: insert into Task (id, archived, allowedToDelegate, taskInitiator_id, priority, activationTime, actualOwner_id, completedOn, createdBy_id, createdOn, documentAccessType, documentContentId, documentType, expirationTime, faultAccessType, faultContentId, faultName, faultType, outputAccessType, outputContentId, outputType, parentId, previousStatus, processId, processInstanceId, processSessionId, skipable, status, workItemId, OPTLOCK) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into I18NText (id, language, shortText, text) values (null, ?, ?, ?)
Hibernate: insert into I18NText (id, language, shortText, text) values (null, ?, ?, ?)
Hibernate: insert into Content (id, content) values (null, ?)
Hibernate: select eventtypes0_.InstanceId as InstanceId0_, eventtypes0_.element as element0_ from EventTypes eventtypes0_ where eventtypes0_.InstanceId=?
Hibernate: update ProcessInstanceInfo set OPTLOCK=?, processId=?, startDate=?, lastReadDate=?, lastModificationDate=?, state=?, processInstanceByteArray=? where InstanceId=? and OPTLOCK=?
Hibernate: update WorkItemInfo set creationDate=?, name=?, processInstanceId=?, state=?, OPTLOCK=?, workItemByteArray=? where workItemId=? and OPTLOCK=?
Hibernate: insert into EventTypes (InstanceId, element) values (?, ?)
Hibernate: delete from WorkItemInfo where workItemId=? and OPTLOCK=?
Hibernate: delete from WorkItemInfo where workItemId=? and OPTLOCK=?
Hibernate: update Task set archived=?, allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, completedOn=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processId=?, processInstanceId=?, processSessionId=?, skipable=?, status=?, workItemId=?, OPTLOCK=? where id=? and OPTLOCK=?
Hibernate: update I18NText set Task_Descriptions_Id=? where id=?
Hibernate: insert into PeopleAssignments_BAs (task_id, entity_id) values (?, ?)
Hibernate: insert into PeopleAssignments_PotOwners (task_id, entity_id) values (?, ?)
Hibernate: update I18NText set Task_Subjects_Id=? where id=?
>>> Disposing Session
Hibernate: select sessioninf0_.id as id15_0_, sessioninf0_.lastModificationDate as lastModi2_15_0_, sessioninf0_.rulesByteArray as rulesByt3_15_0_, sessioninf0_.startDate as startDate15_0_, sessioninf0_.OPTLOCK as OPTLOCK15_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
>>> Let's Create Process Instance
Hibernate: insert into ProcessInstanceInfo (InstanceId, OPTLOCK, processId, startDate, lastReadDate, lastModificationDate, state, processInstanceByteArray) values (null, ?, ?, ?, ?, ?, ?, ?)
Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=?
Hibernate: update ProcessInstanceInfo set OPTLOCK=?, processId=?, startDate=?, lastReadDate=?, lastModificationDate=?, state=?, processInstanceByteArray=? where InstanceId=? and OPTLOCK=?
>>> Let's Start the Process Instance
Hibernate: select processins0_.InstanceId as InstanceId0_0_, processins0_.OPTLOCK as OPTLOCK0_0_, processins0_.processId as processId0_0_, processins0_.startDate as startDate0_0_, processins0_.lastReadDate as lastRead5_0_0_, processins0_.lastModificationDate as lastModi6_0_0_, processins0_.state as state0_0_, processins0_.processInstanceByteArray as processI8_0_0_ from ProcessInstanceInfo processins0_ where processins0_.InstanceId=?
Hibernate: insert into WorkItemInfo (workItemId, creationDate, name, processInstanceId, state, OPTLOCK, workItemByteArray) values (null, ?, ?, ?, ?, ?, ?)
org.jbpm.workflow.instance.WorkflowRuntimeException: [com.salaboy.process.AsyncInteractions:2 - User Interaction 1:2] -- Illegal method call. This session was previously disposed.
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:132)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
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:126)
at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170)
at org.drools.common.AbstractWorkingMemory.startProcessInstance(AbstractWorkingMemory.java:1108)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcessInstance(StatefulKnowledgeSessionImpl.java:330)
at org.drools.command.runtime.process.StartProcessInstanceCommand.execute(StartProcessInstanceCommand.java:46)
at org.drools.command.runtime.process.StartProcessInstanceCommand.execute(StartProcessInstanceCommand.java:25)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcessInstance(CommandBasedStatefulKnowledgeSession.java:237)
at com.salaboy.jbpm5.MytestMain.main(MytestMain.java:171)
Caused by: java.lang.IllegalStateException: Illegal method call. This session was previously disposed.
at org.drools.reteoo.DisposedReteooWorkingMemory.getProcessInstance(DisposedReteooWorkingMemory.java:382)
at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:297)
at org.drools.command.runtime.process.GetProcessInstanceCommand.execute(GetProcessInstanceCommand.java:48)
at org.drools.command.runtime.process.GetProcessInstanceCommand.execute(GetProcessInstanceCommand.java:25)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.getProcessInstance(CommandBasedStatefulKnowledgeSession.java:125)
at org.jbpm.process.workitem.wsht.AbstractHTWorkItemHandler.createTaskBasedOnWorkItemParams(AbstractHTWorkItemHandler.java:105)
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:178)
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
... 17 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/798071#798071]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years
[JBoss Tools Development] - Integration Tooling Release Process
by Paul Leacu
Paul Leacu [https://community.jboss.org/people/pleacu] modified the document:
"Integration Tooling Release Process"
To view the document, visit: https://community.jboss.org/docs/DOC-48326
--------------------------------------------------------------
h1. Overview
This document details the process for building and releasing composite/aggregate update sites for the JBoss integration tooling (formerly SOA tools).
h2. Goals
* Provide a light-weight process with minimal overhead for component owners.
* Provide an ever-current update site containing the latest, stable releases of integration tooling components.
* Allow component owners to independently manage their release schedules.
* Allow component owners to manage their own dependency stack.
h2. Assumptions
* Components use released versions of dependencies (i.e. stable builds).
* Component owners manage their own interdependencies with other integration components.
* Components and dependencies adhere to Eclipse API versioning rules.
h2. Implications
* Aggregate releases will be driven by component releases.
* Aggregate releases should manage themselves.
* Component nightly/milestone builds should always be compatible with other components in the aggregate.
h2. Definitions
* *Integration Stack (IS)* - all JBoss middleware integration tooling
* *IS configuration* - the definition of specific components and versions that make up the IS
* *IS build* - an update site (p2 repo) aggregating specific versions of integration tooling components.
* *Release types:** *stable* - an IS build aggregating stable (i.e. final) builds of all components that has been certified/tested by QA.
* *development* - an IS build aggregating stable builds of all components that has not been certified/tested by QA.
* *integration* - an IS build aggregating stable, development (e.g. beta) and/or integration builds of all components
* *next* - an internal IS build incorporating the latest integration builds of all components (i.e. the current "trunk" build). This will be used for identifying potential future incompatibilities.
Stable builds will align with a JBDS release in the same way JBT core builds do today. Development builds will reflect the current state of all stable components. Theoretically, any development build could be QA'd and promoted to stable (assuming no test failures). Integration builds allow for an "interim" stack which may be useful during a QA cycle (e.g. verifying a fix that requires updates to multiple components; a single component can be updated via the component update site). Next builds are used to identify potential incompatiblilities among components before they are integrated into a release and would occur weekly/monthly via a Hudson job (e.g. targeting JBT integration builds).
An IS build only needs to occur when the IS configuration changes. Because the IS stack is composed of stable components, configuration changes will only occur when individual components are released. For this reason, it is assumed the build would be invoked manually.
h1. Roles and Responsibilities
h2. Component Owners
1. *Component update site:* Component owners must provide an update site for each release of their component that is included in an IS build.
2. *Updating IS configuration:* Component owners must update the IS build configuration when a new version of their component is released. This ensures the IS is up-to-date.
3. *Respond to change requests:* Component owners must review IS configuration change requests and respond in a timely manner. If a requested change is incompatible with the current version of your component, provide details regarding when your component will be compatible, along with a patch containing changes to the IS configuration for your compatible release.
h2. Release Engineers
1. *Maintain build infrastructure:* Release engineers will be responsible for maintianing the build infrastructure, primarily the Jenkins jobs.
2. *Processing pull requests:* Release engineers will be responsible processing all pull requests related to IS configuration. This is to ensure consistency in the composition of the stack (e.g. components, component versions, IS version, etc.).
3. *Initiate IS builds:* Release engineers will be responsible for initiating IS builds.
4. *Build promotion:* Release engineers will be responsible for the promotion of IS builds (e.g. from development to stable).
h1. Release Process
h2. Component Updates
The following outlines the basic process for updating the IS configuration. Typically, this would occur when a component is released, but the same process is also used for updating shared dependencies (e.g. JBT core, third-party plugins, etc.).
1. Create a branch in the user repository for your IS configuration changes.
2. Modify the Integration Stack configuration for your updates, e.g. update URL for SwitchYard from 0.5.0.Final to 0.6.0.Final; update IS version from 0.9.0 to 0.9.1 (see versioning rules)1. For changes to your component within the aggregate: https://github.com/jbosstools/jbosstools-integration-stack/tree/master/ag... https://github.com/jbosstools/jbosstools-integration-stack/tree/master/ag.... Modify the https://github.com/jbosstools/jbosstools-integration-stack/blob/master/ag... compositeArtifacts.xml and https://github.com/jbosstools/jbosstools-integration-stack/blob/master/ag... compositeContent.xml files to point to the new component update site.
2. Modify the https://github.com/jbosstools/jbosstools-integration-stack/blob/master/ag... category.xml file as necessary for any feature changes (e.g. adding a feature).
3. Modify the project version in https://github.com/jbosstools/jbosstools-integration-stack/blob/master/ag... pom.xml.
2. For changes to dependencies: https://github.com/jbosstools/jbosstools-integration-stack/tree/master/ta... https://github.com/jbosstools/jbosstools-integration-stack/tree/master/ta.... Modify https://github.com/jbosstools/jbosstools-integration-stack/blob/master/ta... base.target or https://github.com/jbosstools/jbosstools-integration-stack/blob/master/ta... community.target
2. Modify project version in https://github.com/jbosstools/jbosstools-integration-stack/blob/master/ta... pom.xml
3. Ensure plugins are mirrored on jboss.org
3. Build locally to validate stack dependencies.
4. Create a https://issues.jboss.org/browse/JBTIS JBTIS JIRA task requesting update, e.g. update SwitchYard to 0.6.0.Final* Include link to github branch in task
* Include build results (e.g. SUCCESS or specific dependency resolution errors)
5. Create subtasks against each IS component for verification/approval* For components that failed the consistency check, mark subtasks appropriately, e.g. m2e-wtp version is inconsistent
6. Merge any changes required by other components from subtasks (e.g. update Savara to 2.1.0.Final)
7. Build IS locally to validate dependency consistency
8. Issue pull request against upstream IS configuration project
9. Process pull (by release engineer)
10. Invoke build job (by release engineer)
h2. Platform Updates
*Goal:* release updated IS within four weeks of JBT/JBDS core release.
1. Initiate platform update during JBT beta phase
2. Follow the component update process above (e.g. update JBT core from 3.3 to 4.0)
h2. JBoss Central Discovery Updates
*Goal:* Modify the JBoss Central mylyn discovery install/update mechanism.
JBoss Central, based on http://wiki.eclipse.org/Mylyn/Discovery Mylyn Discovery, is in part a UI for installing new features into Eclipse or JBDS. It provides a richer, yet simpler UI than what Eclipse's p2 Install Manager provides out of the box.
For detailed information see https://community.jboss.org/docs/DOC-48297 https://community.jboss.org/wiki/JBossCentralsSoftwareUpdateTab-HowDoesIt...
1. For changes to the discovery update: https://github.com/jbosstools/jbosstools-integration-stack/tree/master/ta... https://github.com/jbosstools/jbosstools-integration-stack/tree/master/di...
2. Follow the same git process as defined in the Components Updates section.
3. Modify the discovery connector descriptors and installation units as needed within the https://github.com/jbosstools/jbosstools-integration-stack/blob/master/di... discovery plugin.
4. Add any icons that may be required.
h2. Dependency Updates
The process for updating a shared dependency is the same as that for updating any other component, with the following additions:
1. Make sure the dependency is mirrored on jboss.org.
2. Make sure the dependency is not already included through JBT core.
If a dependency is included through JBT core, you will need to coordinate with the core team on the upgrade, as the change may impact components outside the IS.
h2. Versioning Rules - major.minor.update.build
*Major* should be updated for:
* Base platform changes, e.g. Eclipse Indigo->Juno, JBT 3.3->4.0
* Major component updates, e.g. SwitchYard 1.0->2.0
*Minor* should be updated for minor component updates, e.g. SwitchYard 0.5->0.6
*Update* should be updated for minor component updates, e.g. SwitchYard 0.5.0->0.5.1
*Build* should be updated for each build, e.g. when building against nightly/integration/development repositories
** Note, the basic assumption here is that components are adhering to basic API rules (per Eclipse; e.g. minor includes bug fixes and api additions, major may include breaking api changes).
h1. Update Site Locations
* *Integration builds: http://download.jboss.org/jbosstools/updates/integration/juno/integration... http://download.jboss.org/jbosstools/updates/integration/juno/integration...
* *Development builds: http://http://download.jboss.org/jbosstools/updates/development/juno/inte... http://http://download.jboss.org/jbosstools/updates/development/juno/inte...
* *Stable builds: http://http://download.jboss.org/jbosstools/updates/stable/juno/integrati... http://http://download.jboss.org/jbosstools/updates/stable/juno/integrati...
h1. Infrastructure
* *JIRA -* https://issues.jboss.org/browse/JBTIS https://issues.jboss.org/browse/JBTIS
* *Source -* https://github.com/jbosstools/jbosstools-integration-stack https://github.com/jbosstools/jbosstools-integration-stack* *target-platform* - provides a target platform defining all upstream dependencies for use by IS components (e.g. JBT core, third-party plugins)
* *aggregate-site* - provides category and feature definitions for the IS update site
* *discovery* - provides JBoss Central discovery support
* *Jenkins* - * *target platform* - https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-target-platform https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-target-platform
* *aggregate* - https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-aggregate https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-aggregate
* *aggregate publish/promote* - https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-aggregate-publish https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-aggregate-publish
* *discovery* - https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-discovery https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-discovery
* *install tests* - https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-4.0_stable_bra... https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/JBTIS-4.0_stable_bra...
h2. Target Platforms
The provided target platforms define all upstream dependencies available to an IS component. Two target platforms are provided: base and community. The base target platform includes all dependencies which are also included as part of JBDS. The community target extends the base target by including dependencies which are only available in community JBT releases. If your component needs to be included in a JBDS release, DO NOT use the community target platform. For more information and an example on how to refer to the target platform definition, see: https://github.com/jbosstools/jbosstools-integration-stack/blob/master/RE... https://github.com/jbosstools/jbosstools-integration-stack/blob/master/RE...
h1. Future Plans
1. Add support for executing component unit tests as part of the aggregate build. The goal being to help ensure the stability of the aggregate.
2. Add a "next" build that will build against upcoming core platforms (e.g. Kepler, JBT 4.1). This should serve as an early warning system to identify platform incompatibilities early in the process.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-48326]
Create a new document in JBoss Tools Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years
Re: [jboss-dev-forums] [JBoss AS 7 Development] - Multiple instances of JBoss AS7 on the same machine
by Johannes Koch
Johannes Koch [https://community.jboss.org/people/JoPe] commented on the document
"Multiple instances of JBoss AS7 on the same machine"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-16705#comment-11589
--------------------------------------------------
I think I don't quite understand approach #2: I cloned my existing JBoss AS installation directory and kept everything as it was, except for the file system paths and the port-offset parameter of the socket-binding-group. But when I try to start the second instance, the console output is "ERROR: transport error 202: bind failed: The address is already in use". Is there a part of approach #1 that I need to include in following approach #2?
The reason I went with approach #2 to begin with is that I want both instances to be reachable from the Internet, so I figured I'd have to bind them both to <any-address>. Or to the host's external IP address? Or am I completely missing something here?
--------------------------------------------------
12 years