You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by johper <ka...@hotmail.com> on 2007/03/14 16:31:06 UTC

Re: [implentation on an internal system host] current date in xbean.xml

changed to lw-strategy and this gives me current date and other thing for our
file archiving:
	<!-- Write files to the outbox directory -->
	<sm:activationSpec componentName="fileSender" service="foo:fileSender">
	<sm:component>
		<bean class="org.apache.servicemix.components.file.PostmanFileWriter">
			<property name="datearchiving" value="true"/>	
			<property name="directory" value="output" />
			<property name="marshaler">
				<bean class="org.apache.servicemix.components.util.BinaryFileMarshaler">
					<property name="fileName">
						<bean class="org.apache.servicemix.expression.JAXPXPathExpression">
					  		<constructor-arg
value="concat(substring($org.apache.servicemix.file.name, 0,
string-length($org.apache.servicemix.file.name) - 3), '.tmp')" />
				 		</bean> 
					</property>
				</bean>
			</property>
		</bean>
	</sm:component>
	</sm:activationSpec>
===========================================================

johper wrote:
> 
> Hi,
> 
> Using "servicemix-file" and "servicemix-ftp" and need todays date in both
> service-units xbean.xml files ?
> 
> Is there a property something like "$current-date" or an expression we can
> use? Found "current-date()" Xpath function, but ServiceMix does not find
> it (deployment error). When using "fn:current-date()" it deploys but does
> not work?
> 
> 
> <property name="marshaler">
> <bean class="org.apache.servicemix.components.util.BinaryFileMarshaler">
> 	<property name="fileName">
> 	 <bean
> class="org.apache.servicemix.expression.JAXPStringXPathExpression">
> 		   <constructor-arg
> value="concat(current-date(),'-',$org.apache.servicemix.file.name, 
> '.tmp')" />
>   </bean> 
>   </property>
>  </bean>
> </property> 
> 

-- 
View this message in context: http://www.nabble.com/current-date-in-xbean.xml-tf3395690s12049.html#a9476803
Sent from the ServiceMix - User mailing list archive at Nabble.com.