[JBoss jBPM] - Re: how to save processinstance
by cron@citiz.net
Creating a jbpmContext is a lightweight operation, basically it is a wrapper for a Hibernate transaction. ????? I was confused before . now I see.
persistence object ????? I know it is a good idea, I mean the web application close the context after the processinstance.close(); so the whole workflow instance will close, but not to commit the data after a certain node.
however, there is a problem: after one thread of instance process has ended, the other clients will lose the jbpmContext after the client end the context. The root cause is that the jbpmContext is existed in a static class.
So I changed the code from static class to a constructor one, which instance a new one every time when the web application thread requested. then more problems came because every instance of it contains a separate jbpmContext, thus a separate jbpmSession, thus a separate Persistence Object(PO). The result turned out that different clients get different result. If one changed something, the other swinlane can't see any thing changed. if one want to getSession.flush(), he will find that tables were locked by the other jbpmContext.
Do jBPM only permit one jbpmContext in a web application ?
If you're thinking that you want to keep the context open across multiple user interactions, as Ronald said, that's generally bad web-app practice - it scales badly. ?????? ?jbpm doesn't support in the scenario of multiple web-application-user interactions?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047850#4047850
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047850
18 years, 11 months
[JBoss Seam] - Re: Generation of jasper reports in seam
by d.solasa
Hi Daniel..
iTried to implement ur code but I am getting the exception as
12:18:41,966 INFO [JasperReporter] Exceptionnet.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports
ngine.JRException: Class "net.sf.jasperreports.engine.query.JRJdbcQueryExecuterFactory" should be compatible with "net.sf.jasperreports.engine.query.JRQue
ExecuterFactory" even when i tried to compile my report .so even i am unable to get the print object.
my code snippet is:
InputStream input = this.getClass().getClassLoader().getResourceAsStream(reportName);
JasperDesign design = JRXmlLoader.load(input);
JasperReport report = JasperCompileManager.compileReport(design);
InitialContext initialContext = new InitialContext();
DataSource ds = (DataSource) initialContext.lookup("java:/claims");
conn = ds.getConnection();
JasperPrint print = JasperFillManager.fillReport(report, parameters, conn);
String fileName = "D:/downloads/ireport/" + showType;
OutputStream output = new FileOutputStream(new File(fileName));
JasperExportManager.exportReportToPdfStream(print, output);
plz help me
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047835#4047835
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047835
18 years, 11 months