@Test public void testCreateNewSession() throws Exception { ConversationId cid = new ConversationId("1"); Serializable o = store.create(pid, cid, session); assertEquals("DummySession", ((DummySession)o).getDescription()); }
public java.io.Serializable create(ProtocolId pid, ConversationId cid, Serializable session) { if (!isInitialized) { initialization(); } RDBMSSession psession = new RDBMSSession(); psession.setProtocolName(pid.getName()); psession.setProtocolRole(pid.getRole()); psession.setConversationInstanceId(cid.getId()); psession.setSession(session); Serializable s = this.find(pid, cid); if (s != null) { throw new IllegalArgumentException("The session with [" + pid + cid +"] already existed."); } try { tx.begin(); entityManager.persist(psession); tx.commit(); return psession.getSession(); } catch (Exception e) { logger.log(Level.SEVERE, "error in creating a session"); tx.rollback(); throw new RuntimeException(e); } }
RDBMSSessionStore implements SessionStore { public java.io.Serializable create(ProtocolId pid, ConversationId cid, Serializable session) { if (!isInitialized) { initialization(); } RDBMSSession psession = new RDBMSSession(); psession.setProtocolName(pid.getName()); psession.setProtocolRole(pid.getRole()); psession.setConversationInstanceId(cid.getId()); psession.setSession(session); Serializable s = this.find(pid, cid); if (s != null) { throw new IllegalArgumentException("The session with [" + pid + cid +"] already existed."); } try { tx.begin(); entityManager.persist(psession); tx.commit(); return psession.getSession(); } catch (Exception e) { logger.log(Level.SEVERE, "error in creating a session"); tx.rollback(); throw new RuntimeException(e); } } }
RDBMSSessionStore implements SessionStore { public java.io.Serializable create(ProtocolId pid, ConversationId cid, Serializable session) { if (!isInitialized) { initialization(); } RDBMSSession psession = new RDBMSSession(); psession.setProtocolName(pid.getName()); psession.setProtocolRole(pid.getRole()); psession.setConversationInstanceId(cid.getId()); psession.setSession(session); Serializable s = this.find(pid, cid); if (s != null) { throw new IllegalArgumentException("The session with [" + pid + cid +"] already existed."); } try { tx.begin(); entityManager.persist(psession); tx.commit(); return psession.getSession(); } catch (Exception e) { logger.log(Level.SEVERE, "error in creating a session"); tx.rollback(); throw new RuntimeException(e); } } RDBMSSessionStore(TransactionManager txManager);  RDBMSSessionStore(); }
RDBMSSessionStore implements SessionStore { public java.io.Serializable create(ProtocolId pid, ConversationId cid, Serializable session) { if (!isInitialized) { initialization(); } RDBMSSession psession = new RDBMSSession(); psession.setProtocolName(pid.getName()); psession.setProtocolRole(pid.getRole()); psession.setConversationInstanceId(cid.getId()); psession.setSession(session); Serializable s = this.find(pid, cid); if (s != null) { throw new IllegalArgumentException("The session with [" + pid + cid +"] already existed."); } try { tx.begin(); entityManager.persist(psession); tx.commit(); return psession.getSession(); } catch (Exception e) { logger.log(Level.SEVERE, "error in creating a session"); tx.rollback(); throw new RuntimeException(e); } } RDBMSSessionStore(TransactionManager txManager);  RDBMSSessionStore(); void setConfiguration(Configuration configuration); java.io.Serializable create(ProtocolId pid, ConversationId cid, Serializable session); java.io.Serializable find(ProtocolId pid, ConversationId cid); void remove(ProtocolId pid, ConversationId cid); void update(ProtocolId pid, ConversationId cid,
					java.io.Serializable session); void close(); }
RDBMSSessionStore implements SessionStore { public java.io.Serializable create(ProtocolId pid, ConversationId cid, Serializable session) { if (!isInitialized) { initialization(); } RDBMSSession psession = new RDBMSSession(); psession.setProtocolName(pid.getName()); psession.setProtocolRole(pid.getRole()); psession.setConversationInstanceId(cid.getId()); psession.setSession(session); Serializable s = this.find(pid, cid); if (s != null) { throw new IllegalArgumentException("The session with [" + pid + cid +"] already existed."); } try { tx.begin(); entityManager.persist(psession); tx.commit(); return psession.getSession(); } catch (Exception e) { logger.log(Level.SEVERE, "error in creating a session"); tx.rollback(); throw new RuntimeException(e); } } RDBMSSessionStore(TransactionManager txManager);  RDBMSSessionStore(); void setConfiguration(Configuration configuration); java.io.Serializable create(ProtocolId pid, ConversationId cid, Serializable session); java.io.Serializable find(ProtocolId pid, ConversationId cid); void remove(ProtocolId pid, ConversationId cid); void update(ProtocolId pid, ConversationId cid,
					java.io.Serializable session); void close(); static final String TRANSACTION_MANAGER_JNDI_NAME; }