[JBoss jBPM] - Re: Timers in jBPL
by juergen_lampe
I think so. It should be started via the web.xml entry:
<!-- Job executor launcher (begin) -->
| <listener>
| <description>
| Starts the job executor on servlet context initialization and stops it on
| servlet context destruction.
| </description>
| <listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>
| </listener>
| <!-- Job executor launcher (end) -->
|
Meanwhile I played around a bit:
1) changed the timer to
<timer name='reminder'
| duedate='2 minutes'
| transition='ex1' >
| <script>
| System.out.println("Timer fired "+node);
| Token.signal();
| </script>
| </timer>
|
got the output "Timer fired State(warte 1)" but nothing else.
2) changed the script to
<script>
| System.out.println("Timer fired "+node);
| executionContext.getProcessInstance().signal();
| </script>
|
found the server locked in endless printing "Timer fired State(warte 1)"
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179782#4179782
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179782
17 years, 6 months
[JBoss jBPM] - Re: Timers in jBPL
by juergen_lampe
<jbpm-configuration>
|
| <!--
| This configuration is used when there is no jbpm.cfg.xml file found in the
| root of the classpath. It is a very basic configuration without persistence
| and message services. Only the authorization service installed.
| You can parse and create processes, but when you try to use one of the
| unavailable services, you'll get an exception.
| -->
|
| <jbpm-context>
| <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
| <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>
|
| <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
| <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
|
| <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
| <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
| <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
| <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
| <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
| <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
| <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
| <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
| <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
|
| <int name="jbpm.byte.block.size" value="1024" singleton="true" />
| <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
| <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
| <string name="jbpm.mail.smtp.host" value="localhost" />
| <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
| <string name="jbpm.mail.from.address" value="jbpm@noreply" />
|
| <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
| <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
| <field name="name"><string value="JbpmJobExecutor" /></field>
| <field name="nbrOfThreads"><int value="1" /></field>
| <field name="idleInterval"><int value="5000" /></field>
| <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour -->
| <field name="historyMaxSize"><int value="20" /></field>
| <field name="maxLockTime"><int value="600000" /></field> <!-- 10 minutes -->
| <field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
| <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
| </bean>
|
| </jbpm-configuration>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179770#4179770
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179770
17 years, 6 months
[JBoss jBPM] - jBPM-Console process instance creation time
by juergen_lampe
Hi,
I wonder how to identify the time zone for e.g. Start Date display in Process instances list.
Showing:
anonymous wrote : 47 Ended Oct 1, 2008 10:19:36 AM Oct 1, 2008 10:22:30 AM Examine Delete
which means current time - 2 hours.
In database it is correct (from jbpm_processinstance)
anonymous wrote : "47","2",\N,"2008-10-01 12:19:36","2008-10-01 12:22:30","\0","9","47",\N
Any idea? Thanks.
Juergen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179764#4179764
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179764
17 years, 6 months
[Persistence, JBoss/CMP, Hibernate, Database] - Getting Error:closing a connection for you. Please help
by rajikannan
Hello,
I'm using jboss3.2.6. I used ejb2.1 (session bean and entity bean[BMP]). I did few data base transations in cmp and few in simple data source connection.
I'm getting below errors occasionally
'No managed connection exception
java.lang.OutOfMemoryError: Java heap space
[CachedConnectionManager] Closing a connection for you. Plea
se close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@11ed0d
5
I've given below my dao connection code here,
| package com.drtrack.util;
|
| import java.sql.Connection;
| import java.sql.SQLException;
|
| import javax.naming.Context;
| import javax.naming.InitialContext;
| import javax.naming.NamingException;
| import javax.sql.DataSource;
|
| public class DAOUtil {
|
| private static DataSource _ds;
|
| public Connection con;
| public DAOUtil() throws SQLException {
|
| try {
|
| if (_ds == null)
| assemble();
| if(_ds != null && con == null) {
|
| con = _ds.getConnection();
|
| }
| }catch(SQLException ex) {
|
| ex.printStackTrace();
|
| }
|
| }
|
| private void assemble() {
| Context ic = null;
| try {
|
| ic = new InitialContext();
| DrTrackUtil drutil = new DrTrackUtil();
| _ds = (DataSource) ic.lookup("java:/" + drutil.getText("SOURCE_DIR"));
| drutil = null;
| }catch (Exception e) {
|
| e.printStackTrace();
|
| }finally {
| try {
| ic.close();
| }catch(NamingException ne) {}
| }
|
| }
|
| public void closeConnection() throws SQLException {
|
| if(con != null)
| con.close();
|
| con = null;
| }
|
| }
|
below is the code with get connection and doing transaction in it.
| public static AccountMasterValueBean getAccountMasterByAcctId(String acctId) {
|
| AccountMasterValueBean bean = null;
| DAOUtil dao = null;
| CallableStatement cst = null;
| ResultSet rs = null;
| try {
| dao = new DAOUtil();
|
| cst = dao.con.prepareCall(DrTrackConstants.MSSQL_USP_ACCOUNTMASTER_BY_ACCTID);
| cst.setObject(1, acctId);
|
| rs = cst.executeQuery();
| if(rs != null && rs.next()) {
|
| bean = new AccountMasterValueBean(
| Integer.valueOf(rs.getString("accountkeyid")),
| rs.getString("latitude"),
| rs.getString("longitude"));
|
| }
| }catch(SQLException se) {
| logger.info("SQL Error: " + se);
| }
| finally {
| if(rs != null){
| try {
| rs.close();
| }catch(SQLException se) {
| logger.info("SQL Error: " + se);
| }
| finally {
| rs = null;
| }
| }
| if(cst != null) {
| try{
| cst.close();
| }catch(SQLException se) {
| logger.info("SQL Error: " + se);
| }
| finally {
| cst = null;
| }
| }
| if(dao != null) {
| try {
| dao.closeConnection();
| }catch(SQLException se) {
| logger.info("SQL Error: " + se);
| }
| finally {
| dao = null;
| }
| }
| }
| return bean;
| }
|
I closed connections, resultsets and statements properly.
Why I'm getting these errors.? Where I'm doing wrong. ? Please help me. I have to fix them ASAP.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179762#4179762
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179762
17 years, 6 months