Package com.arjuna.orbportability

Examples of com.arjuna.orbportability.ORB


   private static void initOrb()
   {
       if (!oi)
       {
           oi = true;
           ORB orb = ORB.getInstance("ServerSide");
           orb.initORB(new String[] {}, null);
       }
   }
View Full Code Here


  synchronized(startedLock)
  {
      started = true ;
  }
 
        ORB orb = null;

        this.getLog().info("JBossTS Transaction Service - JBoss Inc.");

        this.getLog().info("Setting up property manager MBean and JMX layer");

        /** Set the tsmx agent implementation to the local JBOSS agent impl **/
        LocalJBossAgentImpl.setLocalAgent(this.getServer());
        System.setProperty(com.arjuna.ats.tsmx.TransactionServiceMX.AGENT_IMPLEMENTATION_PROPERTY,
                com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl.class.getName());
        System.setProperty(Environment.LAST_RESOURCE_OPTIMISATION_INTERFACE, LastResource.class.getName()) ;
       
        final String alwaysPropagateProperty = alwaysPropagateContext ? "YES" : "NO" ;
        System.setProperty(com.arjuna.ats.jts.common.Environment.ALWAYS_PROPAGATE_CONTEXT, alwaysPropagateProperty);

        /** Register management plugin **/
        com.arjuna.ats.arjuna.common.arjPropertyManager.propertyManager.addManagementPlugin(new PropertyServiceJMXPlugin());

        // Associate transaction reaper with our context classloader.
        TransactionReaper.create() ;
       
    /** Register propagation context manager **/
        try
        {
            /** Bind the propagation context manager **/
            bindRef(PROPAGATION_CONTEXT_IMPORTER_JNDI_REFERENCE, com.arjuna.ats.internal.jbossatx.jts.PropagationContextManager.class.getName());
            bindRef(PROPAGATION_CONTEXT_EXPORTER_JNDI_REFERENCE, com.arjuna.ats.internal.jbossatx.jts.PropagationContextManager.class.getName());

            /** Create an ORB portability wrapper around the CORBA ORB services orb **/
            orb = ORB.getInstance("jboss-atx");

            /** Retrieve ORB service's ORB and root POA **/
            InitialContext ctx = new InitialContext();
            org.omg.CORBA.ORB orbImpl = (org.omg.CORBA.ORB) ctx.lookup("java:/" + CorbaORBService.ORB_NAME);
            org.omg.PortableServer.POA rootPOA = (org.omg.PortableServer.POA) ctx.lookup("java:/" + CorbaORBService.POA_NAME);

            orb.setOrb(orbImpl);
            OA oa = OA.getRootOA(orb);
            oa.setPOA(rootPOA);

            RecoveryORBManager.setORB(orb);
            RecoveryORBManager.setPOA(oa);
View Full Code Here

   * @throws ConnectionException
   *             If the server cannot connect to the infrastructure configured
   */
  public BlackTieServer(String serverName) throws ConfigurationException,
      ConnectionException {
    ORB orb = com.arjuna.orbportability.ORB.getInstance("ClientSide");
    RootOA oa = com.arjuna.orbportability.OA.getRootOA(orb);
    orb.initORB(new String[] {}, null);

    try {
      oa.initOA();
    } catch (Throwable t) {
      throw new ConnectionException(Connection.TPESYSTEM,
View Full Code Here

  synchronized(startedLock)
  {
      started = true ;
  }
 
        ORB orb = null;

        this.getLog().info("JBossTS Transaction Service - JBoss Inc.");

        this.getLog().info("Setting up property manager MBean and JMX layer");

        // recovery manager properties must be installed before the tx system is initialized. JBTM-598
        arjPropertyManager.propertyManager = PropertyManagerFactory.getPropertyManager("com.arjuna.ats.propertymanager", "recoverymanager");
        Utility.getpid(); // socketProcessId needs to own the port, not the tsm. yuck.
       
        /** Set the tsmx agent implementation to the local JBOSS agent impl **/
        LocalJBossAgentImpl.setLocalAgent(this.getServer());
        System.setProperty(com.arjuna.ats.tsmx.TransactionServiceMX.AGENT_IMPLEMENTATION_PROPERTY,
                com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl.class.getName());
        System.setProperty(Environment.LAST_RESOURCE_OPTIMISATION_INTERFACE, LastResource.class.getName()) ;
       
        final String alwaysPropagateProperty = alwaysPropagateContext ? "YES" : "NO" ;
        System.setProperty(com.arjuna.ats.jts.common.Environment.ALWAYS_PROPAGATE_CONTEXT, alwaysPropagateProperty);

        /** Register management plugin **/
        com.arjuna.ats.arjuna.common.arjPropertyManager.propertyManager.addManagementPlugin(new PropertyServiceJMXPlugin());

        // Associate transaction reaper with our context classloader.
        TransactionReaper.create() ;
       
    /** Register propagation context manager **/
        try
        {
            /** Bind the propagation context manager **/
            bindRef(PROPAGATION_CONTEXT_IMPORTER_JNDI_REFERENCE, com.arjuna.ats.internal.jbossatx.jts.PropagationContextManager.class.getName());
            bindRef(PROPAGATION_CONTEXT_EXPORTER_JNDI_REFERENCE, com.arjuna.ats.internal.jbossatx.jts.PropagationContextManager.class.getName());

            /** Create an ORB portability wrapper around the CORBA ORB services orb **/
            orb = ORB.getInstance("jboss-atx");

            /** Retrieve ORB service's ORB and root POA **/
            InitialContext ctx = new InitialContext();
            org.omg.CORBA.ORB orbImpl = (org.omg.CORBA.ORB) ctx.lookup("java:/" + CorbaORBService.ORB_NAME);
            org.omg.PortableServer.POA rootPOA = (org.omg.PortableServer.POA) ctx.lookup("java:/" + CorbaORBService.POA_NAME);

            orb.setOrb(orbImpl);
            OA oa = OA.getRootOA(orb);
            oa.setPOA(rootPOA);

            RecoveryORBManager.setORB(orb);
            RecoveryORBManager.setPOA(oa);
View Full Code Here

        try
        {
            /**
             * Retrieve ORB and OA references
             */
            ORB orb = ORB.getInstance( PerformanceFramework.ORB_INSTANCE_NAME );
            OA oa = OA.getRootOA( orb );

            Control control = OTSManager.get_current().get_control();
            Coordinator coordinator = control.get_coordinator();

View Full Code Here

{
    protected void work() throws Exception
    {
        try
        {
            ORB orb = ORB.getInstance( PerformanceFramework.ORB_INSTANCE_NAME );
            OA oa = OA.getRootOA(orb);

            String ref1 = getServiceConfig(0);

            org.omg.CORBA.Object obj = orb.orb().string_to_object(ref1);
            PerfTestInterface d = (PerfTestInterface) PerfTestInterfaceHelper.narrow(obj);

            OTSManager.get_current().begin();
            d.work();
View Full Code Here

        try
        {
            /**
             * Retrieve ORB and OA references
             */
            ORB orb = ORB.getInstance(PerformanceFramework.ORB_INSTANCE_NAME);
            OA oa = OA.getRootOA(orb);

            Control control = OTSManager.get_current().get_control();
            Coordinator coordinator = control.get_coordinator();

View Full Code Here

            /**
             * Retrieve ORB and OA references, intialise them
             * and then set the OTSManager ORB and OA properties
             */
            ORB orb = ORB.getInstance(PerformanceFramework.ORB_INSTANCE_NAME);
            OA oa = OA.getRootOA(orb);

            orb.initORB(args, null);
            oa.initOA(args);

            SingleResourceRegistration obj1 = new SingleResourceRegistration();
            oa.objectIsReady(obj1);
            PerfTestInterface objRef1 = PerfTestInterfaceHelper.narrow(oa.corbaReference(obj1));

            registerService(serviceName, orb.orb().object_to_string(objRef1) );

            SingleSubtranAwareResourceRegistration obj2 = new SingleSubtranAwareResourceRegistration();
            oa.objectIsReady(obj2);
            PerfTestInterface objRef2 = PerfTestInterfaceHelper.narrow(oa.corbaReference(obj2));

            registerService(serviceName2, orb.orb().object_to_string(objRef2) );

            System.out.println("Object reference written to file");

            assertSuccess();
            assertReady();

            orb.orb().run();
        }
        catch (Exception e)
        {
            System.err.println("Unexpected exception: "+e);
            e.printStackTrace(System.err);
View Full Code Here

{
    protected void work() throws Exception
    {
        try
        {
            ORB orb = ORB.getInstance( PerformanceFramework.ORB_INSTANCE_NAME );
            OA oa = OA.getRootOA(orb);

            String ref1 = getServiceConfig(0);
            String ref2 = getServiceConfig(1);

            org.omg.CORBA.Object obj1 = orb.orb().string_to_object(ref1);
            PerfTestInterface d1 = (PerfTestInterface) PerfTestInterfaceHelper.narrow(obj1);

            OTSManager.get_current().begin();
            d1.work();

            org.omg.CORBA.Object obj2 = orb.orb().string_to_object(ref2);
            PerfTestInterface d2 = (PerfTestInterface) PerfTestInterfaceHelper.narrow(obj2);

            OTSManager.get_current().begin();
            d2.work();
View Full Code Here

            /**
             * Retrieve ORB and OA references, intialise them
             * and then set the OTSManager ORB and OA properties
             */
            ORB orb = ORB.getInstance( PerformanceFramework.ORB_INSTANCE_NAME );
            OA oa = OA.getRootOA( orb );

            orb.initORB(args, null);
            oa.initOA(args);

            OTSManager.setORB(orb);
            OTSManager.setPOA(oa);

            SingleResourceRegistration obj1 = new SingleResourceRegistration();
            oa.objectIsReady(obj1);
            PerfTestInterface objRef1 = PerfTestInterfaceHelper.narrow(oa.corbaReference(obj1));

            registerService( serviceName, orb.orb().object_to_string(objRef1) );

            DummyPerfTestImplementation obj2 = new DummyPerfTestImplementation();
            oa.objectIsReady(obj2);
            PerfTestInterface objRef2 = PerfTestInterfaceHelper.narrow(oa.corbaReference(obj2));

            registerService( serviceName2, orb.orb().object_to_string(objRef2) );

            assertSuccess();
            assertReady();

            orb.orb().run();
        }
        catch (Exception e)
        {
            e.printStackTrace(System.err);
            assertFailure();
View Full Code Here

TOP

Related Classes of com.arjuna.orbportability.ORB

Copyright © 2018 www.massapicom. 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.