Package org.jacorb.orb

Examples of org.jacorb.orb.ORB$JacORBValueFactory


            return filename;
        }
        else
        {
            String serverId = "jacorb"; // reasonable default
            ORB orb = config.getORB();
            if (orb != null) serverId = orb.getServerIdString();
            String implName = config.getAttribute ("jacorb.implname", serverId);
            if (filename.endsWith ("$implname"))
            {
                return filename.substring (0, filename.length()-9)
                       + implName + ".log";
View Full Code Here


     */
    public void post_init(ORBInitInfo info)
    {
        try
        {
            ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl)info).getORB();
            Logger logger =
              ((org.jacorb.orb.ORB)orb).getConfiguration()
                                       .getLogger("jacorb.tx_service");
            slot_id = info.allocate_slot_id();
           
View Full Code Here

     * @param param1
     *            <description>
     */
    public void post_init(ORBInitInfo info) {

        ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl) info).getORB ();

        try {
            if (clienttester_ != null)
                info.add_client_request_interceptor (new ClientInterceptor (orb,
                                                                            clienttester_));
View Full Code Here

    protected void tearDown() throws Exception
    {
        for (Iterator i = orbs.iterator(); i.hasNext();)
        {
            ORB orb = (ORB) i.next();
            orb.shutdown(true);
        }
        orbs.clear();
    }
View Full Code Here

    public void testNoImpl1 () throws Exception
    {
        Properties props = new Properties();
        props.setProperty("jacorb.implname", "TEST_RANDOM_COMPONENT");

        final ORB orb = newORB(props);

        POA rootPoa =
            (POAHelper.narrow( orb.resolve_initial_references( "RootPOA" )));

        // Create a child POA
        POA poa = rootPoa.create_POA
        (
                "TestServerPOA",
                rootPoa.the_POAManager(),
                new Policy[]
                           {
                    rootPoa.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
                           }
        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR(orb, orb.object_to_string(obj));

        assertTrue
        (
                CorbaLoc.parseKey( pior.get_object_key()).indexOf
                (props.getProperty("jacorb.implname")) == -1
View Full Code Here

    {
        Properties props = new Properties();
        props.setProperty("jacorb.implname", "TEST_PERSISTENT_COMPONENT");
        props.setProperty("jacorb.use_imr", "off");

        ORB orb = newORB(props);

        POA rootPoa =
            (POAHelper.narrow( orb.resolve_initial_references( "RootPOA" )));

        // Create a child POA
        POA poa = rootPoa.create_POA
        (
                "TestServerPOA",
                rootPoa.the_POAManager(),
                new Policy[]
                           {
                    rootPoa.create_lifespan_policy( LifespanPolicyValue.PERSISTENT),
                    rootPoa.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
                           }
        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR( orb, orb.object_to_string(obj));

        assertTrue
        (
                CorbaLoc.parseKey( pior.get_object_key()).indexOf
                (props.getProperty("jacorb.implname")) != -1
View Full Code Here

    {
        Properties props = new Properties();
        props.setProperty("jacorb.implname", "TEST_RANDOM_COMPONENT_TWO");
        props.setProperty("jacorb.logfile.append", "on");

        final ORB orb1 = newORB(props);

        POA rootPoa =
            (POAHelper.narrow( orb1.resolve_initial_references( "RootPOA" )));

        // Create a child POA
        POA poa = rootPoa.create_POA
        (
                "TestServerPOA",
                rootPoa.the_POAManager(),
                new Policy[]
                           {
                    rootPoa.create_lifespan_policy( LifespanPolicyValue.TRANSIENT),
                    rootPoa.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
                           }
        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR( orb1, orb1.object_to_string(obj));


        // Now create number two.

        final ORB orb2 = newORB(props);

        rootPoa = (POAHelper.narrow( orb2.resolve_initial_references( "RootPOA" )));

        // Create a child POA
        poa = rootPoa.create_POA
        (
                "TestServerPOA",
                rootPoa.the_POAManager(),
                new Policy[]
                           {
                    rootPoa.create_lifespan_policy( LifespanPolicyValue.TRANSIENT),
                    rootPoa.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
                           }
        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior2 = new ParsedIOR( orb2, orb2.object_to_string(obj));

        assertTrue
        (
                ! (CorbaLoc.parseKey( pior.get_object_key()).equals
                        (CorbaLoc.parseKey( pior2.get_object_key())))
View Full Code Here

     *
     * @param info the info object.
     */
    public void post_init(ORBInitInfo info)
    {
        final ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl) info).getORB();
        final Configuration config = orb.getConfiguration();
        final Logger logger = config.getLogger("org.jacorb.interceptors.ior_init");

        try
        {
            int giop_minor =
View Full Code Here

    }

    public static void main(String[] args)
    {
        String [] noarg = new String[]{};
        ORB orb = (org.jacorb.orb.ORB)ORB.init(noarg,null);
        for( int i = 0; i < args.length; i++ )
        {
            System.out.println( new CorbaLoc(orb, args[i] ).toString());
        }
    }
View Full Code Here

        ParsedIOR pior = new ParsedIOR( getORB(), orb.object_to_string(obj));


        // Now create number two.
        final ORB orb2 = (org.jacorb.orb.ORB)getAnotherORB(orbProps);

        rootPOA = (POAHelper.narrow( orb2.resolve_initial_references( "RootPOA" )));

        // Create a child POA
        poa = rootPOA.create_POA
        (
                "TestServerPOA",
                rootPOA.the_POAManager(),
                new Policy[]
                           {
                    rootPOA.create_lifespan_policy( LifespanPolicyValue.TRANSIENT),
                    rootPOA.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
                           }
        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior2 = new ParsedIOR( orb2, orb2.object_to_string(obj));

        assertTrue
        (
                ! (CorbaLoc.parseKey( pior.get_object_key()).equals
                        (CorbaLoc.parseKey( pior2.get_object_key())))
View Full Code Here

TOP

Related Classes of org.jacorb.orb.ORB$JacORBValueFactory

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.