Created
April 17, 2014 13:51
-
-
Save davecramer/10985071 to your computer and use it in GitHub Desktop.
SimpleTransactionExample
This file contains 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
package ca.credativ.jdbc; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; | |
import java.sql.Array; | |
/** | |
* Created by davec on 2014-04-16. | |
*/ | |
public class SpringTransactionExample | |
{ | |
public static void main(String []args) | |
{ | |
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("context.xml"); | |
try | |
{ | |
PostgresArray postgresArray = (PostgresArray)applicationContext.getBean("postgresArrayImpl"); | |
String []strings = postgresArray.get() ; | |
for (int i=0;i < strings.length;i++) | |
{ | |
System.out.println(strings[i]); | |
} | |
} | |
catch( Exception ex ) | |
{ | |
ex.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment