Creating the build.xml file – HP Integrity NonStop J-Series User Manual

Page 402

Advertising
background image

<property name="url">
<value>${jdbc.url}</value>
</property>
<property name="username">
<value>${jdbc.username}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
<property name="connectionProperties">
<props>
<prop key="catalog">
${jdbc.catalog}
</prop>
<prop key="schema">
${jdbc.schema}
</prop>
</props>

</property>
</bean>
<bean id="empdao" class="com.hp.empinfo.service.EmployeeDao">
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean>
<bean id="propertyConfigurer"

class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations" value="jdbc.properties"/>
</bean>
</beans>

Creating the build.xml File

Create the build.xml file to build Axis2/Java archive file of EmpInfo application.

To create the build.xml file, complete the following steps:

1.

Create the build.xml file in the EmpInfo directory, as explained in the

Creating the

EmpInfo-servlet.xml

File

section in

Getting Started with Spring

chapter.

2.

Modify the build.xml file to add the mapping details.

After modification, the build.xml file should appear as:

<project name="EmpInfo" basedir="." default="generate.service">

<property environment="env"/>
<property name="service-name" value="EmpInfoService" />
<property name="dest.dir" value="target" />

<property name="axis2.home" value="<Axis2 Home>" />
<property name="spring.home" value="<Spring Home>" />

<property name="dest.dir.classes" value="${dest.dir}/classes" />

<path id="build.class.path">
<fileset dir="${axis2.home}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${dest.dir.classes}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${spring.home}/dist">
<include name="*.jar" />
</fileset>
</path>

<path id="master-classpath">
<fileset dir="${dest.dir.classes}/lib">
<include name="*.jar" />
</fileset>
</path>

<target name="clean">
<delete dir="${dest.dir}" />
</target>

<target name="prepare" depends="clean">

<mkdir dir="${dest.dir}" />
<mkdir dir="${dest.dir.classes}" />
<mkdir dir="${dest.dir.classes}/META-INF" />
<mkdir dir="${dest.dir.classes}/lib"/>

<antcall target="copy.jars"/>
</target>

402 Integrating Axis2/Java into Spring

Advertising
This manual is related to the following products: