I returned to this topic and am trying to create an FtpPollerEndpoint
dynamically per your original advice (not the URIResolver method but
the initial reponse in this thread of creating and manually adding
the endpoint) but am getting the following exception:
java.lang.NoClassDefFoundError: org/apache/servicemix/ftp/
FtpPollerEndpoint
at
com.mediaspansoftware.transporter.servicemix.FTPGatewayEndpoint.process(
FTPGatewayEndpoint.java:116)
at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess
(AsyncBaseLifeCycle.java:489)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange
(AsyncBaseLifeCycle.java:441)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange
(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound
(DeliveryChannelImpl.java:593)
at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting
(AbstractFlow.java:174)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting
(SedaFlow.java:176)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run
(SedaQueue.java:134)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:613)
The servicemix-ftp SE has been installed and the log shows it
starting up:
INFO - ComponentMBeanImpl - Setting running state for
Component: servicemix-ftp to Started
INFO - ComponentMBeanImpl - Initializing component:
servicemix-ftp
Why would I get this exception? I tried adding a classpath to the
SU's xbean for this SE:
<property id="serverRootDirectory"
label="%servicemix30.installation.path" type="directory"
context="runtime" default="/Users/johnsos/MediaSpan/Develop/
Tools/apache-servicemix-3.1-incubating" />
<classpath>
<archive path="${serverRootDirectory}/data/smx/components/
servicemix-ftp/version_1/lib/servicemix-ftp-3.1-incubating.jar" />
</classpath>
But I still get the exception...is there something wrong with my config?
Thanks,
Scott
On May 14, 2007, at 3:09 PM, Guillaume Nodet wrote:
Hum, sorry. This will currently only work for provider endpoints, not
consumers.
This could work if we have a provider endpoint polling for ftp
files on
demand (using an OutOnly mep ?).
And it seems this is what you really need, but this had not been
implemented
yet.
We have already talked about that several times and I think this
would be a
nice
addition. This would be very interesting for bindings on top of file
systems. I guess
we could define a nice wsdl with a list / get / put / delete /
rename /...
operations.
On 5/14/07, Scott Johnson <[EMAIL PROTECTED]> wrote:
So, as I understand this, I get a reference to the servicemix-ftp
context via the registry then create this dynamic endpoint but what
am I getting for the endpoint? An FtpPollerEndpoint (which is what
I'd need) or a more vanilla endpoint upon which I can perform FTP
operations (send or receive)?
On May 14, 2007, at 2:54 PM, Guillaume Nodet wrote:
> You could use dynamic endpoints :-)
> They are resolved dynamically by using
> DocumentFragement epr = URIResolver.createWSAEPR("ftp://xxx");
> ServiceEndpoint ep = componentContext.resolveEndpointReference
(epr)
>
> It will create an endpoint dynamically when you send an exchange to
> this
> ServiceEndpoint.
>
>
> On 5/14/07, Scott Johnson <[EMAIL PROTECTED]> wrote:
>>
>> This plays into something I'd like to try...so given this
knowledge,
>> how reasonble is it to perform this operation on the fly:
>>
>> 1. Request comes in to perform a business process.
>> 2. My Custom SE recieves request and parses process parameters,
>> notices that an FTP polling operation is needed to get input.
>> 3. Custom SE forwards to my own custom FTP "gateway" component
>> 4. FTP Gateway creates an endpoint as described below for the
>> servicemix-ftp component, specifying the parameters such as
host and
>> directory as needed for the current process.
>> 5. The newly-created FTP endpoint performs the act (it's sent a
>> message from my FTP Gateway synchronously so we know when it's
>> finished to get the results).
>> 6. FTP Gateway disposes of the adhoc FTP endpoint as it's no
longer
>> needed.
>> 7. FTP Gateway forwards message to the next endpoint in my task's
>> workflow.
>>
>> Does this make any sense and is it reasonble/possible to do?
>>
>> (This would be in lieu of the ability to modify an endpoint's
>> configuration at runtime.)
>>
>> Thanks,
>> Scott
>>
>>
>> On May 14, 2007, at 2:06 PM, Guillaume Nodet wrote:
>>
>> > Sure ! There is an addEndpoint method available on the
components.
>> > You should be able to retrieve the component by using the
internal
>> > ServiceMix registry and cast it to FileComponent.
>> >
>> > On 5/14/07, goldi <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Hi everybody,
>> >>
>> >> is it possible to add an SU or BC programmatically? I would
like
>> >> to have a
>> >> method like this:
>> >>
>> >> public void addSU(){
>> >>
>> >> FileSenderEndpoint fileSender=new FileSender(..,..);
>> >>
>> >> //set some properties to fileSender
>> >> //install fileSender on ServiceMix
>> >>
>> >> }
>> >>
>> >> This method I would like to call within ServiceMix.
>> >>
>> >>
>> >> greets Goldi
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Programmatically-adding-SU-or-BC--
>> >> tf3753963s12049.html#a10609052
>> >> Sent from the ServiceMix - User mailing list archive at
>> Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> > ------------------------
>> > Principal Engineer, IONA
>> > Blog: http://gnodet.blogspot.com/
>>
>>
>>
>> Scott Johnson, Software Developer
>> MediaSpan Media Software
>> [EMAIL PROTECTED]
>>
>>
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Principal Engineer, IONA
> Blog: http://gnodet.blogspot.com/
Scott Johnson, Software Developer
MediaSpan Media Software
[EMAIL PROTECTED]
--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/
Scott Johnson, Software Developer
MediaSpan Media Software
[EMAIL PROTECTED]