-
1. Re: how to integrate commandservicebean
salaboy21 Jul 28, 2008 1:36 PM (in response to ajanz)You must use jbpm-enterprise.ear..
-
2. Re: how to integrate commandservicebean
ajanz Jul 29, 2008 4:23 AM (in response to ajanz)thats what i did.
i copied the jbpm-enterprise.ear to the deploy directory
but i got the following error
10:06:33,316 WARN [ServiceController] Problem starting service jboss.j2ee:service=EjbModule, module=jbpm-enterprise.jar
org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:
JbpmDS was not deployed or type-mapping was not configured.
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.getTypeMap
ping(JDBCEntityMetaData.java:1103)
but in the logs appears
10:05:59,410 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service = DataSourceBinding, name=JbpmDS' to JNDI name 'java:JbpmDS'
where is the error? -
3. Re: how to integrate commandservicebean
mputz Jul 29, 2008 5:24 AM (in response to ajanz)Check your datasource configuration file, it must have a section for the type-mapping:
<metadata><type-mapping>Hypersonic SQL</type-mapping></metadata>
where the value matches one of the entries in server/jbpm/conf/standardjbosscmp-jdbc.xml. -
4. Re: how to integrate commandservicebean
ajanz Jul 29, 2008 8:05 AM (in response to ajanz)ok. added type mapping to the jbpm-ds
and datasource mapping in the jbosscmp-jdbc.xml<jbosscmp-jdbc> <defaults> <datasource>java:JbpmDS</datasource> <datasource-mapping>Oracle9i</datasource-mapping> <create-table>false</create-table> <remove-table>false</remove-table> <pk-constraint>false</pk-constraint> </defaults> <enterprise-beans> <entity> <ejb-name>TimerEntityBean</ejb-name> <table-name>JBPM_JOB</table-name> <cmp-field> <field-name>timerId</field-name> <column-name>ID_</column-name> </cmp-field> <cmp-field> <field-name>name</field-name> <column-name>NAME_</column-name> </cmp-field> <cmp-field> <field-name>tokenId</field-name> <column-name>TOKEN_</column-name> </cmp-field> <cmp-field> <field-name>processInstanceId</field-name> <column-name>PROCESSINSTANCE_</column-name> </cmp-field> </entity> </enterprise-beans> </jbosscmp-jdbc>
but now when i execute the following codeObject returnValue; try { GetProcessDefinitionsCommand cmd = new GetProcessDefinitionsCommand(); InitialContext initialContext = new InitialContext(); LocalCommandServiceHome localCommandServiceHome = (LocalCommandServiceHome) initialContext .lookup("java:ejb/CommandServiceBean"); LocalCommandService localCommandService = localCommandServiceHome .create(); returnValue = localCommandService.execute(cmd); localCommandService.remove(); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("couldn't execute command", e); }
i got
13:53:20,598 ERROR [LogInterceptor] RuntimeException in method: public abstract java.lang.Object org.jbpm.command.CommandService.execute(org.jbpm.command.Command):
org.jbpm.JbpmException: couldn't start JTA transaction
what is now missing?
it's now nearly two days trying to get it work....... -
5. Re: how to integrate commandservicebean
ajanz Jul 29, 2008 10:59 AM (in response to ajanz)ok finally made it
in the jbpm.cfg.xml was jta defined...dont know why or from where i got this file
changing it to<jbpm-configuration> <jbpm-context> <factory> <service name="persistence"> <factory> <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory"> <field name="isCurrentSessionEnabled"><true /></field> <field name="isTransactionEnabled"><false /></field> </bean> </factory> </service>
solved the problem...
really a lot things to configure....