[Design of JBoss ESB] - Creating an FTP Provider and Listener for JBPM Callback Serv
by mallers
Hi There,
Not sure i am in the correct place, but if not please let me know and I will post elsewhere.
I am extremely new to JBoss and ESB in particular, however here is my scenario and problem.
I currently have a JBpm (jPDL) process deployed on the server. I can goto the JBPM-CONSOLE, start a process and signal through the states.
What I am trying to achieve, is to create an FTP Listener, which when an XML file is placed on the FTP server, will notify the Process to start. I see we can acheieve this using JBpmCallback. With this I will use the BpmProcessor to execute the StartProcessInstanceCommand. All communication is one-way, that is, once and XML file is placed on the FTP server, all that needs to happen is that the FTP Listener will notify the OSOD Process to execute and everything is handled by the process from there. There is no repsonse message (in keeping with loose coupling also as no dependancy exists).
However, whne i configure the provider and listener in the jbpm.esc\META-INF/jboss-esb.xml, then and exception is thrown by JBoss:
12:25:10,437 INFO [NamingHelper] JNDI InitialContext properties:{}
12:25:10,656 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.esb:deployment=jbpm.esb
State: FAILED
Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.Mana
gedLifecycleException: Unexpected exception while instantiating managed instance
I Depend On:
jboss.jca:service=DataSourceBinding,name=JbpmDS
jboss.esb:service=JBPMDatabaseInitializer
jboss.esb:deployment=jbossesb.esb
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.esb:deployment=jbpm.esb
State: FAILED
Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.Mana
gedLifecycleException: Unexpected exception while instantiating managed instance
I Depend On:
jboss.jca:service=DataSourceBinding,name=JbpmDS
jboss.esb:service=JBPMDatabaseInitializer
jboss.esb:deployment=jbossesb.esb
I have The following Configuration in the jboss-esb.xml, if this is right or wrong i would really appreciate any inputs from anyone. If what i am trying is not possible then your inputs on that would also be appreciated.:
<?xml version="1.0"?>
| <jbossesb parameterReloadSecs="5"
| xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml..."
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml... http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml...">
| <providers>
| <ftp-provider hostname="ftp.infotech-europe.com" name="InfotechFTP">
| <property name="username" value="bpm"/>
| <property name="password" value="bpm"/>
| <property name="directory" value="/OSOD/LicenceData/In"/>
| <property name="input-suffix" value=".xml"/>
| <ftp-bus busid="007">
| <ftp-message-filter directory="/OSOD/LicenceData/In" error-delete="false" input-suffix=".xml" passive="false" password="bpm" post-delete="false" protocol="ftp" read-only="true"username="bpm"/>
| </ftp-bus>
| </ftp-provider>
| </providers>
| <services>
| <service category="JBPM"
| description="Service which Calls jBPM Process using FTP Trigger" invmScope="GLOBAL" invmTransacted="false" name="FTPTriggerJBPM">
| <listeners>
| <ftp-listener busidref="007" is-gateway="true" maxThreads="2"
| name="InfotechFTP" poll-frequency-seconds="10"/>
| </listeners>
| <actions mep="OneWay">
| <action class="org.jboss.soa.esb.services.jbpm.actions.JBpmCallback" name="callback"/>
| <action class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor" name="createnewlicenseaction">
| <property name="command" value="StartProcessInstanceCommand"/>
| <property name="process-definition-name" value="OSODLicenseProcess"/>
| </action>
| </actions>
| </service>
| </services>
| </jbossesb>
Many Thanks,
Steve
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213724#4213724
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213724
14 years, 7 months
[Design the new POJO MicroContainer] - Re: MutableClassInfo?
by stale.pedersen@jboss.org
"alesj" wrote : Fine by me.
cool. - another suggestion...
is it ok if i change ModifierInfo to a enum?
atm its just a interface with integers, so methods like:
| MutableFieldInfo createMutableField/Method/Constructor(ModifierInfo modifier, String type, String name); wont make make any sense since its impossible to send a ModifierInfo object to the method. instead we have to change the signature of the method to something like:MutableFieldInfo createMutableField/Method/Constructor(int modifier, String type, String name);
the enum version of ModifierInfo would look something like:
| public enum ModifierInfo
| {
| PUBLIC(Modifier.PUBLIC), PRIVATE(Modifier.PRIVATE),....
| private final int modifier;
| ModifierInfo(int modifier) {this.modifier = modifier; }
| public int getValue() { return modifier; }
| public boolean isPublic/isStatic/isVolatile/etc;
| }
- and we need to remove ModifierInfo as a interface on ClassInfo etc, but i feel this is a better solution..?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213681#4213681
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213681
14 years, 7 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: rolled back messages delivered twice.
by timfox
Yes, this is what I have been going on about for the last couple of weeks.
The session must be enlisted in the JTA tx *before* delivery occurs from the messaging provider, otherwise, to the provider the delivery was non transacted, since it didn't know about the tx at the time it delivered the message to JCA. So when you rollback it won't know about the delivery.
This is what is covered in ML's tx book chapter 5 what I was talking about.
You don't any kind of special message listener to do this correctly. You just need to:
a) When the listener is first created and before it is added to the session, enlist the session for the first time. Then by the time onMessage is called you know the session is already enlisted,
b) in *your* onMessage (JBMMessageHandler:onMessage) call the delegate onMessage, then delist and commit, then.... before returning from your onMessage, enlist the session again so by the time the next onMessage is called it's already enlisted,
Note however, you shouldn't be using the tm.begin(), tm.commit() methods. These require commit or rollback to be called on the same thread as beging, which won't necessary work since subsequent invocations of onMessage can be called on different threads.
You should therefore cache a reference to the JTA transaction object and call commit/ rollback directly on that since it does not require same thread to call it, and moreover JBM does not care about transaction-thread associations.:
JTA spec, section 3.3.3
anonymous wrote :
|
| The Transaction.commit and Transaction.rollback methods allow the target
| object to be comitted or rolled back. The calling thread is not required to have the same
| transaction associated with the thread.
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213668#4213668
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213668
14 years, 7 months