Examples of Current


Examples of javax.inject.Current

        clear();
        defineSimpleWebBean(TypedComponent.class);
        List<AbstractComponent<?>> list = getComponents();

        @SuppressWarnings("unused")
        AbstractComponent<?> itype = (AbstractComponent<?>) container.resolveByType(TypedComponentTest.class.getDeclaredField("s").getType(), new Current()
        {

            public Class<? extends Annotation> annotationType()
            {
View Full Code Here

Examples of org.jacorb.transport.Current

   
        try {
            // Get the Current object.
            Object tcobject = orb.resolve_initial_references ("JacOrbTransportCurrent");
   
            Current tc = CurrentHelper.narrow (tcobject);
   
            logger.info ("TC: [" + tc.id () + "] sent="
                            + tc.messages_sent () + "(" + tc.bytes_sent ()
                            + ")" + ", received=" + tc.messages_received ()
                            + "(" + tc.bytes_received () + ")");
        }
        catch (Exception ex) {
            ex.printStackTrace ();
            Assert.fail ("Unexpected exception" + ex);
        }
View Full Code Here

Examples of org.jacorb.transport.iiop.Current

        try {
            // Get the Current object.
            Object tcobject = orb.resolve_initial_references ("JacOrbIIOPTransportCurrent");

            Current tc = CurrentHelper.narrow (tcobject);
           
            logger.info("TC: ["+tc.id()+"] from="+tc.local_host() +":"+tc.local_port() +", to="
                        +tc.remote_host()+":"+tc.remote_port());

            logger.info("TC: ["+tc.id()+"] sent="+tc.messages_sent ()+"("+tc.bytes_sent ()+")"
                        +", received="+tc.messages_received ()+"("+tc.bytes_received ()+")");
        }
        catch (Exception ex) {
            ex.printStackTrace ();
            Assert.fail ("Unexpected exception" + ex);
        }
View Full Code Here

Examples of org.objectweb.jotm.Current

        this.namingManager = NamingManager.getInstance();

        this.initialContext = new InitialContext();
        this.logger.debug("InitialContext = ''{0}''.", this.initialContext);
        // fake bind
        this.initialContext.bind("javax.transaction.UserTransaction", new Current());

        Context context = this.namingManager.createEnvironmentContext("test");
        this.namingManager.setComponentContext(context);
    }
View Full Code Here

Examples of org.objectweb.jotm.Current

   /**
    * {@inheritDoc}
    */
   public TransactionManager findTransactionManager() throws Exception
   {
      Current current = Current.getCurrent();
      if (current == null)
      {
         try
         {
            current = SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Current>()
            {
               public Current run() throws Exception
               {
                  TransactionFactory tm = new TransactionFactoryImpl();
                  return new Current(tm);
               }
            });
         }
         catch (PrivilegedActionException pae)
         {
            Throwable cause = pae.getCause();
            if (cause instanceof RemoteException)
            {
               throw (RemoteException)cause;
            }
            else if (cause instanceof RuntimeException)
            {
               throw (RuntimeException)cause;
            }
            else
            {
               throw new RuntimeException(cause);
            }
         }

         // Change the timeout only if JOTM is not initialized yet
         if (defaultTimeout > 0)
         {
            current.setDefaultTimeout(defaultTimeout);
         }
      }
      else
      {
         LOG.info("Use externally initialized JOTM: " + current);
View Full Code Here

Examples of org.objectweb.jotm.Current

   /**
    * {@inheritDoc}
    */
   public TransactionManager findTransactionManager() throws Exception
   {
      Current current = Current.getCurrent();
      if (current == null)
      {
         try
         {
            current = SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Current>()
            {
               public Current run() throws Exception
               {
                  TransactionFactory tm = new TransactionFactoryImpl();
                  return new Current(tm);
               }
            });
         }
         catch (PrivilegedActionException pae)
         {
            Throwable cause = pae.getCause();
            if (cause instanceof RemoteException)
            {
               throw (RemoteException)cause;
            }
            else if (cause instanceof RuntimeException)
            {
               throw (RuntimeException)cause;
            }
            else
            {
               throw new RuntimeException(cause);
            }
         }

         // Change the timeout only if JOTM is not initialized yet
         if (defaultTimeout > 0)
         {
            current.setDefaultTimeout(defaultTimeout);
         }
      }
      else
      {
         log.info("Use externally initialized JOTM: " + current);
View Full Code Here

Examples of org.objectweb.jotm.Current

   {
      current = Current.getCurrent();
      if (current == null)
      {
         TransactionFactory tm = new TransactionFactoryImpl();
         current = new Current(tm);

         // Change the timeout only if JOTM is not initialized yet
         if (params != null)
         {
            if (params.getValueParam("timeout") != null)
View Full Code Here

Examples of org.objectweb.jotm.Current

   {
      current = Current.getCurrent();
      if (current == null)
      {
         TransactionFactory tm = new TransactionFactoryImpl();
         current = new Current(tm);

         // Change the timeout only if JOTM is not initialized yet
         if (params != null && params.getValueParam("timeout") != null)
         {
            int t = Integer.parseInt(params.getValueParam("timeout").getValue());
View Full Code Here

Examples of org.objectweb.jotm.Current

   {
      current = Current.getCurrent();
      if (current == null)
      {
         TransactionFactory tm = new TransactionFactoryImpl();
         current = new Current(tm);

         // Change the timeout only if JOTM is not initialized yet
         if (params != null)
         {
            if (params.getValueParam("timeout") != null)
View Full Code Here

Examples of org.omg.CosTransactions.Current

            return;
        }

        try
        {
            Current current = OTSManager.get_current();
            System.out.println("Beginning a User transaction to create account");
            current.begin();
            Account acc = _bank.create_account(name);
            System.out.println("Credit the Account");
            acc.credit(fbalance);
            System.out.println("Attempt to commit the account creation transaction");
            current.commit(false);
        }
        catch (Exception e)
        {
            System.err.println("ERROR - " + e);
        }
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.