[jBPM Users] - Re: Can JBPM manages more than one datasource?
by jbosspnet
I try to change approach.
Suppose I do not install JBPM in JBOSS (so I do not have the folder "jbpm" under the Jboss deploy directory but more important I have no dependicies with a datasource) and all the JBPM clients are web applications that can use a different datasource, deployed in JBOSS by the usual *-ds.xml file.
If now I deploy an ear file (to enclose both web application and a custom version of jbpm-enterprise that not only refers to the JNDI name defined in the datasource already deployed but also allows the access to the JBPM EJBs (namely CommandServiceBean, TimerServiceBean, etc.)), with the correct JBPM configuration (jbpm.cfg.xml and hibernate.cfg.xml file, the last refers to the same JNDI datasource name), every process that I will deploy (by jbpmContext.deployProcessDefinition method) or every process instance that I will create (processDefinitio.createProcessInstance method) in the web application, will refer to the correct JBPM database.
Is it correct?
Are there any problems about this approach (for example the deploy of another ear, the access to the JBPM EJBs or something else)?
Regards.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256157#4256157
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256157
16 years, 7 months
[Beginner's Corner] - standard shutdown fails on jboss 5.1.0
by amedina
Hi everyone,
I've installed a fresh installation of JBoss AS 5.1.0.GA on a linux redhat with jdk 1.6_11 installed. I set JBOSS_HOME variable and added /bin directory to the classpath. Jboss is starting in the default and all configuration without errors.
However, if i execute './shutdown.sh -S' i get the exception at the end of my post. Seems that something with the jndi is broken. I've tried to deploy an ejb2.1 project on to the server. I got exaxtly the same exception during client lookup.
Strangely everything is working fine on JBoss AS 4.0.5. Anyone got an idea?
| Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/192.168.11.46:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/192.168.11.46:1099 [Root exception is java.net.ConnectException: Connection refused]]]
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
| at javax.naming.InitialContext.lookup(InitialContext.java:392)
| at org.jboss.Shutdown.main(Shutdown.java:219)
| Caused by: javax.naming.CommunicationException: Failed to connect to server localhost/192.168.11.46:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/192.168.11.46:1099 [Root exception is java.net.ConnectException: Connection refused]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
| ... 4 more
| Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/192.168.11.46:1099 [Root exception is java.net.ConnectException: Connection refused]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
| ... 5 more
| Caused by: java.net.ConnectException: Connection refused
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
| at java.net.Socket.connect(Socket.java:519)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
| ... 5 more
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256132#4256132
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256132
16 years, 7 months
[jBPM Users] - Re: JBPM 4.0 HistoryEvent, HistorySession
by tcr
Addition:
I wasn't able to find a binding for HistorySessionChain. I created one (see below).
Maybe some hints for all who want to add a custom historySession....
Steps:
- Create your custom history Session (implement org.jbpm.pvm.internal.history.HistorySession)
- Create the binding class for the custom history session (you can copy the binding from historySession and adjust tag and class)
- Create the binding class for the historySessionChain (see below)
- Add both bindings to jbpm.wire.bindings.xml
- Change your configuration by adding the chain-tag including the actual history sessions.
Last problem I have:
Can anyone see an option to get the of the execution memeber of the history-events in the custom event session without changing the code?
Regards
Torsten
CustomHistorySession.java
package com.test;
|
| public class CustomHistorySession implements HistorySession {
| public void process(HistoryEvent historyEvent) {
| // Do your custom work here
| }
| }
CustomHistorySessionBinding.java
| package com.test;
| public class CustomHistorySessionBinding extends WireDescriptorBinding {
|
| public CustomHistorySessionBinding() {
| super("custom-history-session");
| }
|
| public Object parse(Element element, Parse parse, Parser parser) {
| return new ObjectDescriptor(CustomHistorySession.class);
| }
| }
HistorySessionChainBinding.java (copy and modify from deployer-manager)
| package com.test;
|
| public class HistorySessionChainBinding extends WireDescriptorBinding {
|
| private static final String HISTORY_SESSION_CHAIN_TAG = "history-session-chain";
|
| public HistorySessionChainBinding() {
| super(HISTORY_SESSION_CHAIN_TAG);
| }
|
| public Object parse(Element element, Parse parse, Parser parser) {
| ObjectDescriptor objectDescriptor = new ObjectDescriptor(HistorySessionChain.class);
|
| ListBinding listBinding = new ListBinding();
| ListDescriptor listDescriptor = (ListDescriptor) listBinding.parse(element, parse, parser);
| objectDescriptor.addInjection("delegates", listDescriptor);
|
| return objectDescriptor;
| }
| }
jbpm.wire.bindings.xml
| <binding class="org.jbpm.pvm.internal.wire.binding.HistorySessionBinding" />
| <binding class="com.test.HistorySessionChainBinding" />
| <binding class="com.test.CustomHistorySessionBinding" />
|
jbpm.cfg.xml
| <transaction-context>
| [...]
| <history-session-chain >
| <history-session />
| <custom-history-session />
| </history-session-chain>
| [...]
| </transaction-context>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256130#4256130
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256130
16 years, 7 months
[jBPM Users] - [jBPM Bpel] Example in the userguide and the actual example
by nazarfm
The Bpel 'hello' example in the user-guide has one inconsistency with the actual example project. The guide gives the following:
<assign name="ComposeGreeting" validate="no">
| <documentation>compose a greeting phrase</documentation>
| <copy>
| <from>concat('Hello, ', $request.name, '!')</from>
| <to part="greeting" variable="response" />
| </copy>
| </assign>
The highlighted value is what Netbeans bpel designer will also produce. However, this does not work in jBPM bpel. Rather, the given hello example project changes the highlighted text into:
<from expression="concat('Hello, ', bpel:getVariableData('request', 'name'), '!')" />
And this works. Is there something I'm not seeing here? I figure the first one should also work but so far no luck. No errors are reported, it just hangs. Anyone else had this experience?
Versions:
jBPM bpel 1.1.1
Jboss AS 4.2.3.GA
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256115#4256115
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256115
16 years, 7 months
[jBPM Users] - Re: JBPM 4.x using Sybase ASE 11/12 on Jboss 5.1.0GA
by HelloW
so it was a user problem....
and since the birt reporting is installed in /data/birt it took so long to find the actual culprits:
I changed this file -> server.home\server\default\data\birt\overall_activity.rptdesign
| <data-sources>
| <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="HsqlDB on JBoss" id="248">
| <property name="odaDriverClass">org.hsqldb.jdbcDriver</property>
| <property name="odaURL">jdbc:hsqldb:hsql://localhost:1701</property>
| <property name="odaUser">sa</property>
| <property name="odaJndiName">java:/JbpmDS</property>
| </oda-data-source>
| </data-sources>
|
to
| <data-sources>
| <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="HsqlDB on JBoss" id="248">
| <property name="odaJndiName">java:/JbpmDS</property>
| </oda-data-source>
| </data-sources>
and server.home\server\default\data\birt\specific_system_overview.rptdesign
from
| <data-sources>
| <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="HsqlDB on JBoss" id="248">
| <property name="odaDriverClass">org.hsqldb.jdbcDriver</property>
| <property name="odaURL">jdbc:hsqldb:hsql://localhost:1701</property>
| <property name="odaUser">sa</property>
| <property name="odaJndiName">java:/JbpmDS</property>
| </oda-data-source>
| </data-sources>
to
<data-sources>
| <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="HsqlDB on JBoss" id="248">
| <property name="odaJndiName">java:/JbpmDS</property>
| </oda-data-source>
| </data-sources>
and walla...the login failures disappear
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256113#4256113
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256113
16 years, 7 months