[
http://jira.jboss.com/jira/browse/JBESB-649?page=comments#action_12367647 ]
Daniel Bevenius commented on JBESB-649:
---------------------------------------
I started by extracting the polling behaviour to a class named AbstractPollingGateway
which extends AbstractThreadedManagedLifecyle.
The class is simply responsible for setting the poll interval and controlling the ending
of the loop.
The doRun method looks like this :
@Override
protected void doRun()
{
do
{
performGatewayOperation();
}
while (!waitForRunningStateChange(ManagedLifecycleThreadState.STOPPING, pollingInterval
)) ;
log.debug("doRun() method of " + this.getClass().getSimpleName() +
" finished on thread " + Thread.currentThread().getName());
}
And the performGatewayOperation looks like this:
**
* This method performs whatever needs to be preformed when
* the polling intervall is reached.
* </p>
*
*/
protected abstract void performGatewayOperation();
I've updated the AbstractFileGateway to verify this.
This will let me create a subclass and implement any type of behavior I like in the
preformGatewayOperation method.
Next, I'll create a subclass that calls a web service using what Tom has written.
WSListener
----------
Key: JBESB-649
URL:
http://jira.jboss.com/jira/browse/JBESB-649
Project: JBoss ESB
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Web Services
Reporter: Daniel Bevenius
Assigned To: Daniel Bevenius
Priority: Optional
This is our scenario:
The company we are working for are going to sell their product on an remote web site.
First we have a service that publishes the products to be sold to the remote web site.
The problem is that the remote company does not have the functionality to notify us when
customer has bought a product. We need to be informed so the product can be activated.
This means that we need to poll a webservice at a certain interval. My thoughts were that
instead on implementing the poll functionality we could use something like what's
there for the FTP listener. There you can set <property
name="pollLatencySeconds" value="5"/>, which will check for the
existens of a file on the remote system. This is what I would like to do for a WSListener,
where i could set the a property for the pollLatencySeconds and it would call the remote
webservice.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira