Skip to content

Commit

Permalink
+ improved sample build script
Browse files Browse the repository at this point in the history
+ fixed a bug with jca application context.
  • Loading branch information
costin committed Nov 11, 2005
1 parent a83c00f commit 765a836
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
20 changes: 10 additions & 10 deletions samples/jcr/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<project name="spring-jcr-sample" basedir="." default="usage">

<property name="name" value="spring-jcr"/>
<property name="name" value="spring-jcr-sample"/>

<property name="src.dir" value="src"/>
<property name="build.dir" value=".classes"/>
<property name="dist.dir" value="dist"/>
<property name="repository.dir" value="repo"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="build.dir" value="${basedir}/.classes"/>
<property name="dist.dir" value="${basedir}/dist"/>
<property name="repository.dir" value="${basedir}/repo"/>

<property name="springmodules.root" value="../.."/>
<property name="springmodules.root" value="${basedir}/../.."/>
<property name="springmodules.dist" value="${springmodules.root}/dist"/>

<property name="main.class" value="org.springmodules.examples.jcr.Main"/>
Expand Down Expand Up @@ -127,12 +127,9 @@
</fileset>
</copy>

<mkdir dir="${dist.dir}"/>
<jar jarfile="${dist.dir}/${name}.jar" compress="true" basedir="${build.dir}"/>

</target>

<target name="launch" description="Launch the sample application">
<target name="launch" description="Launch the sample application" depends="build">

<mkdir dir="${build.dir}/repo"/>
<java classname="${main.class}" fork="yes" failonerror="true">
Expand All @@ -149,6 +146,9 @@
a generic target name across all Spring sample apps that may be used
for autobuilds testing.
-->
<mkdir dir="${dist.dir}"/>
<jar jarfile="${dist.dir}/${name}.jar" compress="true" basedir="${build.dir}"/>

</target>


Expand Down
9 changes: 7 additions & 2 deletions samples/jcr/src/applicationContext-jr-jca.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!--
JCA configuration only for JackRabbit. This examples uses Jenks.
$Id: applicationContext-jr-jca.xml,v 1.1 2005/10/10 09:20:43 costin Exp $
$Id: applicationContext-jr-jca.xml,v 1.2 2005/11/11 15:47:58 costin Exp $
-->
<beans>

Expand Down Expand Up @@ -97,15 +97,20 @@
<ref local="connectionTracker"/>
</property>
</bean>

<bean id="configResource" class="org.springframework.core.io.ClassPathResource">
<constructor-arg index="0" value="/org/springmodules/examples/jcr/jackrabbit-repo.xml"/>
</bean>

<!-- JackRabbit JCA specific configuration -->
<bean id="repositoryManagedConnectionFactory"
class="org.apache.jackrabbit.jca.JCAManagedConnectionFactory">
<property name="homeDir">
<value>/xa-rep</value>
</property>

<property name="configFile">
<value>/org/springmodules/examples/jcr/jackrabbit-repo.xml</value>
<bean factory-bean="configResource" factory-method="getPath"/>
</property>
</bean>

Expand Down
4 changes: 2 additions & 2 deletions samples/jcr/src/applicationContext-jr-local.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!--
Local transaction manager only for JackRabbit
$Id: applicationContext-jr-local.xml,v 1.1 2005/10/10 09:20:42 costin Exp $
$Id: applicationContext-jr-local.xml,v 1.2 2005/11/11 15:47:58 costin Exp $
-->
<beans>
<bean id="jcrTransactionManager"
Expand All @@ -14,7 +14,7 @@

<bean id="repository" class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
<!-- normal factory beans params -->
<property name="configuration" value="classpath:jackrabbit-repo.xml"/>
<property name="configuration" value="src/jackrabbit-repo.xml"/>
<property name="homeDir" value="/repo"/>
</bean>
</beans>
5 changes: 2 additions & 3 deletions samples/jcr/src/applicationContext-repository.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
JSR-170 configuration support. Note that the transaction managers are defined
in separate files.
$Id: applicationContext-repository.xml,v 1.2 2005/10/10 09:20:42 costin Exp $
$Id: applicationContext-repository.xml,v 1.3 2005/11/11 15:47:58 costin Exp $
-->
<beans default-lazy-init="true">
<import resource="applicationContext-jr-jca.xml"/>
Expand Down Expand Up @@ -55,13 +55,12 @@
</props>
</property>
</bean>
<!--
<bean id="jcrService" parent="txProxyTemplate">
<property name="target">
<bean class="org.springmodules.examples.jcr.JcrService">
<property name="template" ref="jcrTemplate"/>
</bean>
</property>
</bean>
-->
</beans>

0 comments on commit 765a836

Please sign in to comment.