use of org.switchyard.component.test.mixins.naming.NamingMixIn in project quickstarts by jboss-switchyard.
the class CamelJpaBindingTest method beforeClass.
@BeforeClass
public static void beforeClass() throws Exception {
namingMixIn = new NamingMixIn();
namingMixIn.initialize();
connection = DriverManager.getConnection("jdbc:h2:mem:events-jpa-quickstart", "sa", "sa");
JdbcDataSource ds = new JdbcDataSource();
ds.setURL("jdbc:h2:mem:events-jpa-quickstart");
ds.setUser("sa");
ds.setPassword("sa");
InitialContext initialContext = new InitialContext();
bind(initialContext, System.getProperty("jpa.persistence.datasource.name"), ds);
}
use of org.switchyard.component.test.mixins.naming.NamingMixIn in project quickstarts by jboss-switchyard.
the class QpidServer method main.
public static void main(String[] args) throws Exception {
NamingMixIn namingMixIn = new NamingMixIn();
namingMixIn.initialize();
AMQPMixIn mixIn = new AMQPMixIn();
mixIn.initialize();
System.in.read();
// clean up
mixIn.uninitialize();
namingMixIn.uninitialize();
}
use of org.switchyard.component.test.mixins.naming.NamingMixIn in project quickstarts by jboss-switchyard.
the class CamelSqlBindingTest method startUp.
@BeforeClass
public static void startUp() throws Exception {
dataSource = new JdbcDataSource();
dataSource.setURL("jdbc:h2:mem:test");
dataSource.setUser("sa");
dataSource.setPassword("sa");
connection = dataSource.getConnection();
String createStatement = "CREATE TABLE greetings (" + "id INT PRIMARY KEY AUTO_INCREMENT, " + "receiver VARCHAR(255), " + "sender VARCHAR(255) " + ");";
connection.createStatement().executeUpdate("DROP TABLE IF EXISTS greetings");
connection.createStatement().executeUpdate(createStatement);
namingMixIn = new NamingMixIn();
namingMixIn.initialize();
bindDataSource(namingMixIn.getInitialContext(), "java:jboss/myDS", dataSource);
}
Aggregations