Search in sources :

Example 1 with Context

use of javax.naming.Context in project camel by apache.

the class RoutePerformanceTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    Map<String, Object> headers = new HashMap<String, Object>();
    headers.put("foo", 123);
    dataSet.setDefaultHeaders(headers);
    Context context = super.createJndiContext();
    context.bind("foo", dataSet);
    return context;
}
Also used : Context(javax.naming.Context) HashMap(java.util.HashMap)

Example 2 with Context

use of javax.naming.Context in project camel by apache.

the class BigDataSetTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    Context context = super.createJndiContext();
    context.bind("foo", dataSet);
    return context;
}
Also used : Context(javax.naming.Context)

Example 3 with Context

use of javax.naming.Context in project camel by apache.

the class CustomDataSetTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    Context context = super.createJndiContext();
    context.bind("foo", dataSet);
    return context;
}
Also used : Context(javax.naming.Context)

Example 4 with Context

use of javax.naming.Context in project camel by apache.

the class FileDataSetProducerWithSplitTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    Context context = super.createJndiContext();
    context.bind(dataSetName, dataSet);
    return context;
}
Also used : Context(javax.naming.Context)

Example 5 with Context

use of javax.naming.Context in project camel by apache.

the class DataSetConsumerTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    Context context = super.createJndiContext();
    context.bind(dataSetName, dataSet);
    return context;
}
Also used : Context(javax.naming.Context)

Aggregations

Context (javax.naming.Context)507 InitialContext (javax.naming.InitialContext)250 Test (org.junit.Test)173 NamingException (javax.naming.NamingException)156 DataSource (javax.sql.DataSource)72 Properties (java.util.Properties)67 Connection (java.sql.Connection)62 NameNotFoundException (javax.naming.NameNotFoundException)52 UserTransaction (javax.transaction.UserTransaction)48 SQLException (java.sql.SQLException)46 IOException (java.io.IOException)44 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)44 Statement (java.sql.Statement)42 Name (javax.naming.Name)38 Hashtable (java.util.Hashtable)35 NameAlreadyBoundException (javax.naming.NameAlreadyBoundException)27 BeanContext (org.apache.openejb.BeanContext)27 Binding (javax.naming.Binding)25 Reference (javax.naming.Reference)25 NotContextException (javax.naming.NotContextException)23