You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by caman <AB...@gmail.com> on 2009/01/15 00:28:55 UTC

Help configuring endpoint attributes through properties file

Hello,

I am configuring my endpoint attributes through a properties file. SU
deploys successfully but files just sit in the folder. I do in the log that
it is watching the correct folder but I see one debug message repeatedly
"Unable to acquire lock on "file:\D:\work\apache\temp\poll" " 

Any help is appreciated.  Attached is my xbean and properties files
thanks
vishal

Here is my xbean:
===============
<f:poller
      service="proj:filePoller"
      endpoint="poller"
      file="${file.poll.folder}"
      targetService="${file.poll.targetService}"
      targetEndpoint="${file.poll.endpoint}"
      period="${file.poll.period}"
	  deleteFile="${file.poll.delete}"
      recursive="${file.poll.recursive}"
      autoCreateDirectory="${file.poll.autoCreateDirectory}"
	  archive="file:///D:/work/apache/temp/poll/archive" />
  
    
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      <property name="locations">
         <value>classpath:file2ftp.properties</value>
      </property>
   </bean>
==================

Properties file
================
file.poll.folder="file://D://work//apache//temp//poll"
file.poll.targetService="proj:fileSender"
file.poll.endpoint="endpoint"
file.poll.period=10000
file.poll.delete=true
file.poll.recursive=false
file.poll.autoCreateDirectory=true
file.poll.archive="file://D:/work/apache/temp/poll/archive"
=================
-- 
View this message in context: http://www.nabble.com/Help-configuring-endpoint-attributes-through-properties-file-tp21467760p21467760.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Help configuring endpoint attributes through properties file

Posted by caman <AB...@gmail.com>.
Gert,

thanks.
yes, if I configure attributes directly in the xbean, then poller works
fine.
one difference I noticed that when i use the property file I see messages
"
 Scheduling file "d:\work\apache\temp\poll\" for processing
 Unable to acquire lock on "d:\work\apache\temp\poll\"
"

But If I leave the attributes hardcoded in xbean, i see a message 

"
 Scheduling directory "d:\work\apache\temp\poll\" for processing

"

Latter case, it consider the entry as a direcory which is correct but in
first case, it takes the folder as file. 
This is the poller config.
<f:poller
      service="proj:filePoller"
      endpoint="poller"
      file="file:///D:\work\apache\temp\poll"
      targetService="proj:fileSender"
      targetEndpoint="endpoint"
      period="60000"
	  deleteFile="true"
      recursive="false"
      autoCreateDirectory="true"
	  archive="file:///D:\work\apache\temp\poll\archive">
  
    </f:poller>

thanks

Gert Vanthienen wrote:
> 
> L.S.,
> 
> Does it work when you specify the windows folders that way on the 
> endpoint directly?  I usually use something like 
> d:/work/apache/temp/poll/archive, without the leading file:///
> 
> Regards,
> 
> Gert
> 
> caman wrote:
>> Hello,
>>
>> I am configuring my endpoint attributes through a properties file. SU
>> deploys successfully but files just sit in the folder. I do in the log
>> that
>> it is watching the correct folder but I see one debug message repeatedly
>> "Unable to acquire lock on "file:\D:\work\apache\temp\poll" " 
>>
>> Any help is appreciated.  Attached is my xbean and properties files
>> thanks
>> vishal
>>
>> Here is my xbean:
>> ===============
>> <f:poller
>>       service="proj:filePoller"
>>       endpoint="poller"
>>       file="${file.poll.folder}"
>>       targetService="${file.poll.targetService}"
>>       targetEndpoint="${file.poll.endpoint}"
>>       period="${file.poll.period}"
>> 	  deleteFile="${file.poll.delete}"
>>       recursive="${file.poll.recursive}"
>>       autoCreateDirectory="${file.poll.autoCreateDirectory}"
>> 	  archive="file:///D:/work/apache/temp/poll/archive" />
>>   
>>     
>> <bean id="propertyConfigurer"
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>>       <property name="locations">
>>          <value>classpath:file2ftp.properties</value>
>>       </property>
>>    </bean>
>> ==================
>>
>> Properties file
>> ================
>> file.poll.folder="file://D://work//apache//temp//poll"
>> file.poll.targetService="proj:fileSender"
>> file.poll.endpoint="endpoint"
>> file.poll.period=10000
>> file.poll.delete=true
>> file.poll.recursive=false
>> file.poll.autoCreateDirectory=true
>> file.poll.archive="file://D:/work/apache/temp/poll/archive"
>> =================
>>   
> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 

-- 
View this message in context: http://www.nabble.com/Help-configuring-endpoint-attributes-through-properties-file-tp21467760p21493512.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Help configuring endpoint attributes through properties file

Posted by Gert Vanthienen <ge...@skynet.be>.
L.S.,

Does it work when you specify the windows folders that way on the 
endpoint directly?  I usually use something like 
d:/work/apache/temp/poll/archive, without the leading file:///

Regards,

Gert

caman wrote:
> Hello,
>
> I am configuring my endpoint attributes through a properties file. SU
> deploys successfully but files just sit in the folder. I do in the log that
> it is watching the correct folder but I see one debug message repeatedly
> "Unable to acquire lock on "file:\D:\work\apache\temp\poll" " 
>
> Any help is appreciated.  Attached is my xbean and properties files
> thanks
> vishal
>
> Here is my xbean:
> ===============
> <f:poller
>       service="proj:filePoller"
>       endpoint="poller"
>       file="${file.poll.folder}"
>       targetService="${file.poll.targetService}"
>       targetEndpoint="${file.poll.endpoint}"
>       period="${file.poll.period}"
> 	  deleteFile="${file.poll.delete}"
>       recursive="${file.poll.recursive}"
>       autoCreateDirectory="${file.poll.autoCreateDirectory}"
> 	  archive="file:///D:/work/apache/temp/poll/archive" />
>   
>     
> <bean id="propertyConfigurer"
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>       <property name="locations">
>          <value>classpath:file2ftp.properties</value>
>       </property>
>    </bean>
> ==================
>
> Properties file
> ================
> file.poll.folder="file://D://work//apache//temp//poll"
> file.poll.targetService="proj:fileSender"
> file.poll.endpoint="endpoint"
> file.poll.period=10000
> file.poll.delete=true
> file.poll.recursive=false
> file.poll.autoCreateDirectory=true
> file.poll.archive="file://D:/work/apache/temp/poll/archive"
> =================
>