Package org.jboss.test.txtimer.interfaces

Examples of org.jboss.test.txtimer.interfaces.TimerEntityHome.create()


      List timerHandles = pp.listTimerHandles();
      assertEquals("unexpected handle count", 0, timerHandles.size());

      InitialContext iniCtx = getInitialContext();
      TimerEntityHome home = (TimerEntityHome)iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = home.create(new Integer(1));
      try
      {
         entity.createTimer(500, 0, null);

         timerHandles = pp.listTimerHandles();
View Full Code Here


      List timerHandles = pp.listTimerHandles();
      assertEquals("unexpected handle count", 0, timerHandles.size());

      InitialContext iniCtx = getInitialContext();
      TimerEntityHome home = (TimerEntityHome)iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = home.create(new Integer(1));
      try
      {
         // insert a timer into the db
         ObjectName oname = ObjectNameFactory.create("jboss.j2ee:jndiName=test/txtimer/TimerEntity,service=EJB");
         TimedObjectId targetId = new TimedObjectId(oname, new Integer(1));
View Full Code Here

    */
   public void testSingleEventDuration() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerEntityHome home = (TimerEntityHome) iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = home.create(new Integer(1));
      try
      {
         entity.createTimer(500, 0, null);
         sleep(1000);
         assertEquals("unexpected call count", 1, entity.getCallCount());
View Full Code Here

    */
   public void testInstanceAsscociation() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerEntityHome home = (TimerEntityHome) iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity1 = home.create(new Integer(1));
      TimerEntity entity2 = home.create(new Integer(2));

      try
      {
         entity1.createTimer(500, 1000, null);
View Full Code Here

   public void testInstanceAsscociation() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerEntityHome home = (TimerEntityHome) iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity1 = home.create(new Integer(1));
      TimerEntity entity2 = home.create(new Integer(2));

      try
      {
         entity1.createTimer(500, 1000, null);
         entity2.createTimer(500, 1000, null);
View Full Code Here

      MBeanServerConnection server = getServer();
      String defaultPrincipal = (String) server.getAttribute(new ObjectName("jboss.security:service=JaasSecurityManager"), "DefaultUnauthenticatedPrincipal");

      InitialContext iniCtx = getInitialContext();
      TimerEntityHome home = (TimerEntityHome) iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = home.create(new Integer(1));
      try
      {
         entity.createTimer(500, 0, null);
         sleep(1000);
         assertEquals("unexpected call count", 1, entity.getCallCount());
View Full Code Here

    */
   public void testReturnTimerHandle() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerEntityHome home = (TimerEntityHome) iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = home.create(new Integer(1));
      try
      {

         try
         {
View Full Code Here

    */
   public void testRollbackAfterCreate() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerEntityHome entityHome = (TimerEntityHome) iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = entityHome.create(new Integer(1));

      TimerFacadeHome facadeHome = (TimerFacadeHome) iniCtx.lookup(TimerFacadeHome.JNDI_NAME);
      TimerFacade facade = facadeHome.create();
      try
      {
View Full Code Here

    */
   public void testRollbackAfterCancel() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerEntityHome entityHome = (TimerEntityHome) iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = entityHome.create(new Integer(1));

      TimerFacadeHome facadeHome = (TimerFacadeHome) iniCtx.lookup(TimerFacadeHome.JNDI_NAME);
      TimerFacade facade = facadeHome.create();
      try
      {
View Full Code Here

    */
   public void testRetryAfterRollback() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerEntityHome home = (TimerEntityHome) iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = home.create(new Integer(1));

      try
      {
         Properties props = new Properties();
         props.setProperty("rollback", "true");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.