[JBoss jBPM] - Re: pooled actors not persisted
by dmitri.ilyin
uups.
the jbpm config was removed from post. Here ist :
| <jbpm-context>
| <service name="persistence">
| <factory>
| <bean class="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory">
| <field name="sessionFactoryJndiName">
| <string value="EjfinSessionFactory" />
| </field>
| </bean>
| </factory>
| </service>
| <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
| <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
| <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
| <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
| <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
| </jbpm-context>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185665#4185665
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185665
17 years, 5 months
[JBoss jBPM] - Re: pooled actors not persisted
by dmitri.ilyin
i could localize the problem but i have no idea how to solve it.
We run JBoss 4.2.3 with JBPM3.2.3. We use EJB3 (JPA) for Entity Beans and JTA Transactions.
So, we have only one Hibernate configuration for hole Enterprise App. Hibernate session-factory is configured for JNDI and we use only this JNDI name for resolving the session factory for JPA "persistence-unit" and for "jBPM configuration". Here our jbpm config:
--------------
<jbpm-context>
</jbpm-context>
--------------
The need this contruction couse we must work with Entity Beans and JBPM in one transaction. We just start JTA transaction and make changes with Entities and JBPM manipulations within it.
It seems that in our configuration jBPM calls hibernate JPA implementation for persisting and JPA can not persisitence by reachability that follows that objects must be persisted explicitly. In case of pooled actors jBPM thinks they will be persisted automaticaly by hibernate but JPA don't do it.
Are there any tricks?
thanks a lot for any help.
Dmitri
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185664#4185664
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185664
17 years, 5 months
[JBossWS] - jax-ws soap protocol handler and white space.
by mignaak
I have an issue with a soap protocol handler that works fine in jbossws 2.0.3.
Since 2.0.4 it has stopped working because it seems every white space character is stripped away from the message by the runtime.
This handler adds a header to the soap envelope and fills this header with lines of text separated with a newline character.
Any hint as to what is happening?
Many thanks
Here is the source code.
public class MefHandlerClient implements SOAPHandler {
public Set getHeaders() {
return null;
}
public boolean handleMessage(SOAPMessageContext smc) {
try {
Boolean outboundProperty = (Boolean) smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
if (outboundProperty.booleanValue() == true) {
SOAPMessage sm = smc.getMessage();
SOAPPart part = sm.getSOAPPart();
SOAPEnvelope envelope = part.getEnvelope();
SOAPHeader sh = envelope.getHeader();
if (sh == null)
sh = envelope.addHeader();
QName n = new QName(
"http://schemas.xmlsoap.org/ws/2002/04/secext",
"BinarySecurityToken",
"wsse");
envelope.addNamespaceDeclaration("wsse", "http://schemas.xmlsoap.org/ws/2002/04/secext");
SOAPHeaderElement she = sh.addHeaderElement(n);
QName id = new QName("Id");
she.addAttribute(id, "SecurityToken");
QName eType= new QName("EncodingType");
she.addAttribute(eType, "wsse:Base64Binary");
QName vType= new QName("ValueType");
she.addAttribute(vType, "wsse:X509v3");
InputStream firma = getClass().getClassLoader().getResourceAsStream("cert.pem");
BufferedReader br = new BufferedReader(new InputStreamReader(firma));
String temp = br.readLine();
while (temp != null) {
String temp2 = br.readLine();
if (!temp.contains("CERTIFICATE")) {
if (temp2 != null)
temp += System.getProperty("line.separator");
SOAPElement riga = she.addTextNode(temp);
}
temp = temp2;
}
}
} catch(Throwable x) {
System.out.println(x);
}
return true;
}
public boolean handleFault(SOAPMessageContext smc) {
return true;
}
public void close(MessageContext messageContext) {
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185660#4185660
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185660
17 years, 5 months
[JBoss Cache: Core Edition] - Re: LRUPolicy eviction policy
by lovelyliatroim
So here is the config for the test
| <region name="/evictiontest/LRU" policyClass="org.jboss.cache.eviction.LRUPolicy">
| <attribute name="maxNodes">3</attribute>
| <attribute name="timeToLiveSeconds">30</attribute>
| <attribute name="maxAgeSeconds">30</attribute>
| </region>
|
|
My sample test case
| public void evictionTest(String configPath) throws Exception{
| CacheFactory factory = DefaultCacheFactory.getInstance();
| Cache cache = factory.createCache(configPath);
| CacheJmxWrapperMBean wrapper = new CacheJmxWrapper(cache);
| wrapper.create();
| wrapper.start();
| System.out.println("Cache created");
|
| String lruPath="/evictiontest/LRU/a/b/c";
| Fqn lruFQN =Fqn.fromString(lruPath);
|
| String expPath="/evictiontest/EXP/a/b/c";
| Fqn expFQN =Fqn.fromString(expPath);
|
| String key ="data";
| HashMap testData = new HashMap();
| testData.put("Client", "Bond,James");
|
| cache.put(lruFQN,key, testData);
|
| HashMap val = (HashMap)cache.get(lruFQN, key);
| System.out.println("Value taken from hash "+val.toString());
|
| //Test Max Nodes attribute now and how that works
| for(int i = 0; i < 10 ;i ++){
| lruFQN =Fqn.fromString(lruPath+i);
| cache.put(lruFQN,key, testData);
| }
| System.out.println("Added more nodes than allowed to region " + wrapper.printCacheDetails());
|
| int counter = 0;
| while(true){
| counter = counter + 10;
| Thread.currentThread().sleep(10000);
| System.out.println("Slept "+counter +" secs " + wrapper.printCacheDetails());
|
| }
|
|
Output that i see
| Cache created
| Value taken from hash {Client=Bond,James}
| Added more nodes than allowed to region / null
| /evictiontest null
| /LRU null
| /a null
| /b null
| /c5 {data={Client=Bond,James}}
| /c6 {data={Client=Bond,James}}
| /c8 {data={Client=Bond,James}}
| /c {data={Client=Bond,James}}
| /c7 {data={Client=Bond,James}}
| /c9 {data={Client=Bond,James}}
| /c2 {data={Client=Bond,James}}
| /c0 {data={Client=Bond,James}}
| /c1 {data={Client=Bond,James}}
| /c4 {data={Client=Bond,James}}
| /c3 {data={Client=Bond,James}}
|
| Slept 10 secs / null
| /evictiontest null
| /LRU null
| /a null
| /b null
| /c8 {data={Client=Bond,James}}
| /c7 {data={Client=Bond,James}}
| /c9 {data={Client=Bond,James}}
|
| Slept 20 secs / null
| /evictiontest null
| /LRU null
| /a null
| /b null
| /c8 {data={Client=Bond,James}}
| /c7 {data={Client=Bond,James}}
| /c9 {data={Client=Bond,James}}
|
| Slept 30 secs / null
| /evictiontest null
| /LRU null
| /a null
| /b null
| /c8 {data={Client=Bond,James}}
| /c7 {data={Client=Bond,James}}
| /c9 {data={Client=Bond,James}}
|
| Slept 40 secs / null
| /evictiontest null
| /LRU null
| /a null
| /b null
|
|
Eviction timer thread runs every 3 seconds. So back to the original question, how does maxNodes work?? Its configured as 3, so is that 3 nodes with data below the region or is it 3 nodes regardless of data below the region?? It looks to me like it is nodes with data!! Is this the expected behaviour??
The remaining 3 records get evicted after they have lived their life expectancy of 30 seconds.
By the way this last test was carried out with 3.x version but the original test was done with the 2.x version.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185658#4185658
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185658
17 years, 5 months
[Installation, Configuration & DEPLOYMENT] - Problems in deployment under JBoss 4.2.3
by dsandrei
Hello, i need some help regarding the deployment of a web application unde JBoss 4.2.3
The application is basically a web service deployed in a WAR using CXF that interacts with an Oracle database through Hibernate. It was initially deployed on JBoss 5.0.0 beta and it worked very well, but when switching to 4.2.3 it returns the following exception
2008-10-30 11:44:45,049 INFO [STDOUT] FATAL [main] (DatasourceConnectionProvider.java:55) - Could not find datasource: java:PPGDS
javax.naming.NameNotFoundException: PPGDS not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
PPGDS is the JNDI name of the datasource.
I've deleted all the libraries from the server lib that could have caused any class cast exceptions. The parameters from the Oracle configuration file are correct. I am using 1.5.0_13. And i have run out of any ideas about what could be wrong.
Any help would be greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185651#4185651
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185651
17 years, 5 months