[jBPM] - Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'.
by Ted Pan
Ted Pan [https://community.jboss.org/people/ted.pan] created the discussion
"Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'."
To view the discussion, visit: https://community.jboss.org/message/774673#774673
--------------------------------------------------------------
you need to add the user to takservice by using the following code
|
|
|
| Properties userGroups = new Properties(); |
|
|
|
| userGroups.setProperty("john", "user"); |
|
|
|
| UserGroupCallbackManager manager = UserGroupCallbackManager.getInstance(); |
|
|
|
| manager.setCallback(new DefaultUserGroupCallbackImpl(userGroups)); |
*or* implement a an UserGroupCallback. Then
UserGroupCallbackManager manager = UserGroupCallbackManager
.getInstance();
if (!manager.existsCallback()) {
UserGroupCallback userGroupCallback = new JBPMUserGroupCallback();
manager.setCallback(userGroupCallback);
}
this is the callback implementation:
public class JBPMUserGroupCallback implements UserGroupCallback {
@Override
public boolean existsGroup(String groupId) {
return true;
}
@Override
public boolean existsUser(String userId) {
return true;
}
@Override
public List<String> getGroupsForUser(String userId, List<String> groupIds,
List<String> allExistingGroupIds) {
if(groupIds != null) {
List<String> retList = new ArrayList<String>(groupIds);
// merge all groups
if(allExistingGroupIds != null) {
for(String grp : allExistingGroupIds) {
if(!retList.contains(grp)) {
retList.add(grp);
}
}
}
return retList;
} else {
//
// return empty list by default
//please note: there are different return value for different version of jPBM
//List<String> retList = new ArrayList<String>();
//retList.add("user");
//return retList;
//return new ArrayList<String>(); //for jBPM5.3.0.Final
return null; //for jBPM5.4.0.CR1
}
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/774673#774673]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month
[JBoss Cache] - JBossCache 'Malagueta' 3.2.11.GA and persistence.xml
by Somostetoi Kilato
Somostetoi Kilato [https://community.jboss.org/people/somostetoikilato] created the discussion
"JBossCache 'Malagueta' 3.2.11.GA and persistence.xml"
To view the discussion, visit: https://community.jboss.org/message/803140#803140
--------------------------------------------------------------
Hi,
Would anybody help me to configure my persistence-unit to use my cache?
Here is the cache definition file:
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<bean name="MyCacheConfig" class="org.jboss.cache.config.Configuration">
<property name="runtimeConfig">
<bean class="org.jboss.cache.config.RuntimeConfig">
<property name="transactionManager">
<inject bean="jboss:service=TransactionManager" property="TransactionManager"/>
</property>
</bean>
</property>
<property name="lockParentForChildInsertRemove">false</property>
<property name="lockAcquisitionTimeout">15000</property>
<property name="isolationLevel">REPEATABLE_READ</property>
<property name="concurrencyLevel">500</property>
<property name="useLockStriping">true</property>
<property name="writeSkewCheck">false</property>
<property name="exposeManagementStatistics">true</property>
</bean>
<bean name="MyCacheFactory" class="org.jboss.cache.DefaultCacheFactory">
<constructor factoryClass="org.jboss.cache.DefaultCacheFactory" factoryMethod="getInstance" />
</bean>
<bean name="MyCache" class="org.jboss.cache.Cache">
<constructor factoryMethod="createCache">
<factory bean="MyCacheFactory"/>
<parameter class="org.jboss.cache.config.Configuration">
<inject bean="MyCacheConfig"/>
</parameter>
<parameter class="boolean">false</parameter>
</constructor>
</bean>
<bean name="MyCacheJmxWrapper" class="org.jboss.cache.jmx.CacheJmxWrapper">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name=jboss.cache:service=MyCache, exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
<constructor>
<parameter>
<inject bean="MyCache"/>
</parameter>
</constructor>
</bean>
</deployment>
and this is the persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="sarsi_jpa">
<jta-data-source>java:/SarsiDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="validate"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.order_updates" value="true"/>
<property name="hibernate.connection.release_mode" value="after_statement"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
<property name="hibernate.cache.use_second_level_cache" value="true" />
<property name="hibernate.cache.use_query_cache" value="true" />
<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory" />
<property name="hibernate.session_factory_name" value="persistence.unit.sarsi"/>
</properties>
</persistence-unit>
</persistence>
If I click on printCacheDetails I get only these
> --- Cache1 ---
> / null
>
> ------------
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/803140#803140]
Start a new discussion in JBoss Cache at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month
[JBoss Web Services] - Asynchronous calls using JAX-WS
by Daniel Cote
Daniel Cote [https://community.jboss.org/people/daniel.cote.qc.ca] created the discussion
"Asynchronous calls using JAX-WS"
To view the discussion, visit: https://community.jboss.org/message/803107#803107
--------------------------------------------------------------
The context.
An "in-container" WebService issues an asynchronous call to another Webservice.
My program works correctly... I just want to clarify a technical aspect.
In using JbossFinal7.1.1 and *jbossws-cxf-4.1.1.Final.*
It seems that the cxf stack has an 'odd' behavior, comparing to what I'm used to see. In an async call, the invoker is not supposed to get any answer from the outgoing call: the invokee will send the answer to the address specified in the 'ReplyTo' URL conveyed in the soap header.
The executing stack has to figured out that the receiver receives the payload, and that's it!
In my previous experiences, with other AppServer, I never saw a "payload" sent back..
I was a bit confused to see an answer coming from the invokee... Here the log...
---------------------------------------------------------------------------------------------
Here, we're in the in-container WebService...
22:40:18,358 INFO (EJB default - 58) org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass Creating Service {urn:ihe:iti:xds-b:2007}DocumentRegistry_Service from class org.apache.cxf.jaxws.support.DummyImpl
Here, just before the call (extract from the code) to the other WebService...
|
|
|
|
|
| logger.logic("invokeOneWay called..."); |
|
|
|
|
|
| dispatch.invokeOneWay(invokeParameter); |
|
|
|
|
|
| logger.logic("invokeOneWay returned..."); |
22:40:18,358 CONF (EJB default - 58) com.ibm.ai.xds.soap.SoapClient.callJAXBWS invokeOneWay called...
A configured SoapHandler takes care of logging the outgoing payload
22:40:18,374 CONF (EJB default - 58) com.ibm.ai.xds.soap.EnvelopeSOAPHandler.handleMessage Calling handleMessage within com.ibm.ai.xds.soap.EnvelopeSOAPHandler
22:40:18,374 CONF (EJB default - 58) com.ibm.ai.xds.soap.EnvelopeSOAPHandler.handleMessage Outgoing SOAP response...
22:40:18,405 CONF (EJB default - 58) com.ibm.ai.xds.soap.EnvelopeSOAPHandler.logMessage [null] Message sent: payload:[<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:ns0="http://www.w3.org/2003/05/soap-envelope" ns0:mustUnderstand="1">urn:ihe:iti:2007:RegisterDocumentSet-b</wsa:Action><wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:ns0="http://www.w3.org/2003/05/soap-envelope" ns0:mustUnderstand="1"><wsa:Address>http://localhost:8080/XDSRepositoryWS/DocumentRepository_Service</wsa:Address></wsa:ReplyTo><wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/XDSRegistryWS/DocumentRegistry_Service</wsa:To><wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">fc12c6a5-7c32-4fbb-962c-596a6afae42a</wsa:MessageID></soap:Header><soap:Body>...</soap:Body></soap:Envelope>]
The invokee web service is started and send immediatly an ack with a "content" limited to the Headers, No Body (a non-empty body would not make sense...).
The invokee is also hosted by the same Jboss server
The payload is :
22:40:18,655 CONF (http-localhost-127.0.0.1-8080-3) com.ibm.ai.xds.webContext.XDSHandler.logMessage message sent... payload:[<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:a62d5c9e-aa4d-4e72-a0a8-319eb16c70fb</MessageID><To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To><ReplyTo xmlns="http://www.w3.org/2005/08/addressing"><Address>http://www.w3.org/2005/08/addressing/none</Address></ReplyTo><RelatesTo xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/unspecified</RelatesTo></soap:Header><soap:Body/></soap:Envelope>]
22:40:18,655 INFO (http-localhost-127.0.0.1-8080-3) com.ibm.ai.xds.webContext.XDSHandler.Msg sent to: [ 127.0.0.1] <-- response from call to action:[urn:ihe:iti:2007:RegisterDocumentSet-b] from :[127.0.0.1]
And just after, the invoking thread (EJB default - 58) logged that the invoke returned which ends this thread execution (whic is correct)
22:40:18,655 CONF (EJB default - 58) com.ibm.ai.xds.soap.SoapClient.callJAXBWS invokeOneWay returned...
22:40:18,655 INFO (EJB default - 58) com.ibm.ai.asyncCallMgr.CallItem.run runSpecific exit...
-----------------------------------------------------------------------------------------------------------------
Although the program worked correctly, I'm curious to know what is the correct behavior...
For comparision, I never saw that kind of acknowledge, using Websphere Application Server...
Here a capture using TCPMON, showing that the receiving service just close the connection (on WAS), at the HTTP level (no SOAP payload at all)
-----------------------------------------------------------------------------------------------------------------
HTTP/1.1 202 Accepted
X-Powered-By: Servlet/3.0
Content-Type: application/soap+xml; charset=UTF-8
Content-Length: 0
IBM-WAS-Reset-Connection: TRUE
Content-Language: fr-CA
*Connection: Close*
Date: Fri, 15 Mar 2013 03:14:29 GMT
Server: WebSphere Application Server/8.5
-----------------------------------------------------------------------------------------------------------------
Is this kind of detail left to the implementation of there is a requirement that is not correctly meet by one of those implementations.
Best regards,
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/803107#803107]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month
[Datasource Configuration] - use-strict-min and prefill with oracle ds xml
by Sapan Vashishth
Sapan Vashishth [https://community.jboss.org/people/sapan.vas] created the discussion
"use-strict-min and prefill with oracle ds xml"
To view the discussion, visit: https://community.jboss.org/message/802546#802546
--------------------------------------------------------------
Hi,
I have following configuration in my oracle-ds.xml for my oracle datasource on jboss 6.0.0 Finl
<?xml version="1.0" encoding="UTF-8" standalone="no"?><datasources>
<local-tx-datasource>
<jndi-name>GBOracleDS</jndi-name>
<connection-url> **** </connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
.......
........
<connection-property name="autoReconnect ">true</connection-property>
<min-pool-size>30</min-pool-size>
<max-pool-size>800</max-pool-size>
<prefill>true</prefill>
<use-strict-min>true</use-strict-min>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>5</idle-timeout-minutes>
<use-fast-fail>false</use-fast-fail>
<prepared-statement-cache-size>500</prepared-statement-cache-size>
<shared-prepared-statements>true</shared-prepared-statements>
.....................
...........................
</local-tx-datasource>
</datasources>
As per the name and documentation of prefill and use-strict-min there should be always conencions equal to minimum pool size specified.
But during the execution I see that the connection count does not show same,
It shows lesser connections that the min pool size and even goes to zero when no load on server.
This is causing issues in the performance runs as during the creation of the connections the request have to wait until the connection is available.
Is there something else that is required to be configured for the same or there is some issue with these parameters.
Thanks in advance
Sapan
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/802546#802546]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month
[jBPM] - jBPM timers and persistance
by eljan
eljan [https://community.jboss.org/people/eljan] created the discussion
"jBPM timers and persistance"
To view the discussion, visit: https://community.jboss.org/message/803026#803026
--------------------------------------------------------------
Hi
Do I understand correctly that currently there is no way for timers to trigger if the session they are in was not active during their scheduled activation time?
So for example, I have a process with a timer and that timer gets scheduled to activate in 3 minutes.
Suddenly my server crashes. I act quickly and get it running again in 5 minutes.
My persistent jBPM application reloads the session with the timer, but as I understand from trying it out and reading this forum this process is now broken. The timer will never fire, because at the time it was supposed to fire, the session was not active.
This behavior would be really undesired for my application scenario with long lasting persistent processes which might last even several years.
I wouldn't want to throw away such a long process, because of a small server hiccup.
Does timer escalation on a task have the same issue? I haven't tried this out yet.
If this is the case then is there an easy way to implement timer behavior myself while still using jBPM timer node and corresponding BPMN 2.0 element? (for example similar to the way I would register a WorkItemHandler for service tasks)
Otherwise it seems that I would need to implement timer as a service task, which I would like to avoid.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/803026#803026]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month