This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:aop="http://www.springframework.org/schema/aop" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:jee="http://www.springframework.org/schema/jee" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:batch="http://www.springframework.org/schema/batch" | |
xmlns:task="http://www.springframework.org/schema/task" | |
xmlns:amq="http://activemq.apache.org/schema/core" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:aop="http://www.springframework.org/schema/aop" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:jee="http://www.springframework.org/schema/jee" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:batch="http://www.springframework.org/schema/batch" | |
xmlns:task="http://www.springframework.org/schema/task" | |
xmlns:amq="http://activemq.apache.org/schema/core" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:aop="http://www.springframework.org/schema/aop" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:jee="http://www.springframework.org/schema/jee" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:batch="http://www.springframework.org/schema/batch" | |
xmlns:task="http://www.springframework.org/schema/task" | |
xmlns:amq="http://activemq.apache.org/schema/core" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | |
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> | |
<persistence-unit name="MyAppUnit" transaction-type="JTA"> | |
<provider>org.hibernate.ejb.HibernatePersistence</provider> | |
<jta-data-source>java:/myAppDS</jta-data-source> | |
<!-- Package: uk.co.example.domain --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.DateFormat; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; | |
import org.springframework.batch.core.Job; | |
import org.springframework.batch.core.JobExecution; | |
import org.springframework.batch.core.JobExecutionException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; | |
import org.quartz.JobExecutionContext; | |
import org.springframework.batch.core.JobExecutionException; | |
import org.springframework.batch.core.JobParameters; | |
import org.springframework.batch.core.JobParametersBuilder; | |
import org.springframework.batch.core.configuration.JobLocator; | |
import org.springframework.batch.core.launch.JobLauncher; | |
import org.springframework.scheduling.quartz.QuartzJobBean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Date; | |
import org.springframework.jdbc.core.JdbcTemplate; | |
import org.springframework.jdbc.object.StoredProcedure; | |
public class MyStoredProcedure extends StoredProcedure{ | |
public MyStoredProcedure(String procedureName,DataSource dataSource) { | |
super(new JdbcTemplate(dataSource), procedureName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean dealerExists(String agentNumber) { | |
return getSessionFactory().getCurrentSession() | |
.getNamedQuery("myapp.namedquery").setParameter(0, agentNumber) | |
.list().get(0) != null; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void processData(int param1, int param2) | |
{ | |
CallableStatement cs=null; | |
Connection conn=null; | |
try{ | |
// get JNDI JDBC connection | |
InitialContext ctxt = new InitialContext(); | |
DataSource ds = (DataSource) ctxt.lookup("java:/myAppDS"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String getStackTrace(Throwable aThrowable) { | |
final Writer result = new StringWriter(); | |
final PrintWriter printWriter = new PrintWriter(result); | |
aThrowable.printStackTrace(printWriter); | |
return result.toString(); | |
} |