[JBoss jBPM] - Re: Variables == Bottleneck ?
by gchanteb
Hi all, here is the solution for my problem, based on the other post:
I can now delete properly all ended processes, it works. This should exists by default.
package ****;
|
| import java.util.Date;
| import java.util.List;
|
| import org.hibernate.Query;
| import org.hibernate.Session;
| import org.jboss.ejb3.annotation.Management;
| import org.jboss.ejb3.annotation.Service;
| import org.jbpm.JbpmConfiguration;
| import org.jbpm.JbpmContext;
| import org.jbpm.graph.exe.ProcessInstance;
|
| @Service
| @Management(JbpmManagementMBean.class)
| public class JbpmManagement implements JbpmManagementMBean
| {
| JbpmConfiguration jBPMConfiguration = null;
|
| @SuppressWarnings("unchecked")
| @Override
| public void removeAllEndedProcesses()
| {
| if(jBPMConfiguration==null)
| {
| jBPMConfiguration = JbpmConfiguration.getInstance();
| }
| JbpmContext context = jBPMConfiguration.createJbpmContext();
|
| try
| {
| Session hibernateSession = context.getSession();
|
| Query processQuery = hibernateSession.createQuery(
| "from org.jbpm.graph.exe.ProcessInstance pi " +
| "where pi.end is not null");
|
| List<ProcessInstance> instances = processQuery.list();
|
| if(instances!=null&&instances.size()>0)
| {
| for(ProcessInstance instance : instances)
| {
| context.getGraphSession().deleteProcessInstance(instance);
| }
| }
| }
| finally
| {
| context.close();
| }
| }
|
| @SuppressWarnings("unchecked")
| @Override
| public void removeAllEndedProcessesBefore(Date date)
| {
| if(jBPMConfiguration==null)
| {
| jBPMConfiguration = JbpmConfiguration.getInstance();
| }
| JbpmContext context = jBPMConfiguration.createJbpmContext();
|
| try
| {
| Session hibernateSession = context.getSession();
|
| Query processQuery = hibernateSession.createQuery(
| "from org.jbpm.graph.exe.ProcessInstance pi " +
| "where pi.end is not null" +
| "and pi.start < :removalDate");
|
| processQuery.setParameter("removalDate", date);
|
| List<ProcessInstance> instances = processQuery.list();
|
| if(instances!=null&&instances.size()>0)
| {
| for(ProcessInstance instance : instances)
| {
| context.getGraphSession().deleteProcessInstance(instance);
| }
| }
| }
| finally
| {
| context.close();
| }
| }
| }
package ****;
|
| import java.util.Date;
|
| public interface JbpmManagementMBean
| {
| public abstract void removeAllEndedProcesses();
| public abstract void removeAllEndedProcessesBefore(Date date);
| }
Make a jar and put it in your deploy folder.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221601#4221601
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221601
17 years
[JBoss Cache: Core Edition] - Re: invalidation messages lost/ignored?
by bstansberry@jboss.com
Option.setCacheModeLocal(true) is definitely enough to ensure non-propagation of the remove call.
Getting into an inconsistent state is for sure a sign of a bug/greater problem. Greater problem might just be don't use async, but let's dig deeper.
Can you make this happen with INVALIDATION_SYNC? ASYNC by its nature doesn't guarantee cache consistency, although ending up with an earlier version on a node and no JBC exception in the logs doesn't sound right. With INVALIDATION, the only thing that puts data in the cache is the local caller, so having version 39 in the cache means a local caller either
1) put it in the cache after the invalidation message for 40 had already arrived
2) the invalidation message for 40 never arrived.
The latter is unlikely.
Do you have any logging telling you how version 39 ended up in A? What it via a putFromExternalRead or a put after a tx running on A updated the entity to version 39? This smells more like a putForExternalRead problem to me.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221589#4221589
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221589
17 years
[Installation, Configuration & DEPLOYMENT] - Re: Deploying Spring 2.5 Application in JBoss 5
by jboss_user200
Thanks for your reply. I changed it..
but now I get following exception , any help?
| 10:57:10,470 INFO [NativeServerConfig] 3.0.5.GA
| 10:57:15,236 ERROR [AbstractKernelController] Error installing to Parse: name=vfsfile:/C:/software/jboss-5.0.1.GA/server/default/deploy/petclinic.war/ state=Not Installed mode=Manual requiredState=Parse
| org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/C:/software/jboss-5.0.1.GA/server/default/deploy/petclinic.war/
| at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:337)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:297)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:269)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:230)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
|
| .....
|
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'. @ vfsfile:/C:/software/jboss-5.0.1.GA/server/default/deploy/petclinic.war/WEB-INF/applicationContext-hibernate.xml[18,70]
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
| at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:199)
| at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:170)
| at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132)
| at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:239)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:330)
| ... 22 more
| Caused by: org.xml.sax.SAXException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'. @ vfsfile:/C:/software/jboss-5.0.1.GA/server/default/deploy/petclinic.war/WEB-INF/applicationContext-hibernate.xml[18,70]
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
| at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at.......
|
| 10:57:27,345 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| DEPLOYMENTS IN ERROR:
| Deployment "vfsfile:/C:/software/jboss-5.0.1.GA/server/default/deploy/petclinic.war/" is in error due to the following reason(s): org.xml.sax.SAXException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'. @ vfsfile:/C:/software/jboss-5.0.1.GA/server/default/deploy/petclinic.war/WEB-INF/applicationContext-hibernate.xml[18,70]
|
| 10:57:27,361 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221588#4221588
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221588
17 years