コード例 #1
0
  /**
   * Test config properties
   *
   * @throws Throwable Thrown if case of an error
   */
  @Test
  public void testConfigProperties() throws Throwable {

    Context ctx = new InitialContext();

    ConfigPropertyConnectionFactory connectionFactory =
        (ConfigPropertyConnectionFactory) ctx.lookup(CF_JNDI_NAME);

    assertNotNull(connectionFactory);

    ConfigPropertyAdminObjectInterface adminObject =
        (ConfigPropertyAdminObjectInterface) ctx.lookup(AO_JNDI_NAME);

    assertNotNull(adminObject);

    ConfigPropertyConnection connection = connectionFactory.getConnection();
    assertNotNull(connection);

    assertEquals("A", connection.getResourceAdapterProperty());
    assertEquals("B", connection.getManagedConnectionFactoryProperty());

    assertEquals("C", adminObject.getProperty());
    connection.close();
  }
コード例 #2
0
 @Get("/injection/:param1/:param2")
 public String route(
     String param1,
     String param2,
     Context context,
     Request request,
     Response response,
     Cookies cookies) {
   return String.join(
       "/",
       param1,
       param2,
       context.getClass().getSimpleName(),
       request.getClass().getSimpleName(),
       response.getClass().getSimpleName(),
       cookies.getClass().getSimpleName());
 }
コード例 #3
0
ファイル: FTIndexQueryTest.java プロジェクト: alpheios/basex
 /** Static clean-up. */
 @AfterClass
 public static void cleanUpClass() {
   CTX_IX.close();
 }