コード例 #1
0
  @Test
  public void testCreateContextClientAckSession() throws Exception {

    JMSContext context = jms2ConnectionFactory.createContext(JMSContext.CLIENT_ACKNOWLEDGE);
    assertNotNull(context);
    assertEquals(Jms2Context.class, context.getClass());
  }
コード例 #2
0
  @Test
  public void testCreateTransactedSession() throws Exception {

    JMSContext context = jms2ConnectionFactory.createContext(JMSContext.SESSION_TRANSACTED);
    assertNotNull(context);
    assertEquals(Jms2Context.class, context.getClass());
  }
コード例 #3
0
  @Test
  public void createContext() throws Exception {

    JMSContext context = jms2ConnectionFactory.createContext();
    assertNotNull(context);
    assertEquals(Jms2Context.class, context.getClass());
  }
コード例 #4
0
  @Test
  public void testCreateContextCredentialsAndClientAckSession() throws Exception {
    final String username = "******";
    final String password = "******";

    JMSContext context =
        jms2ConnectionFactory.createContext(username, password, JMSContext.CLIENT_ACKNOWLEDGE);
    assertNotNull(context);
    assertEquals(Jms2Context.class, context.getClass());
  }