[jacorb-developer] AMI + BiDir

boris temkin boris at temk.org
Wed Jul 10 18:28:38 CEST 2013


Hello,

Is there known problems with using AMI and BiDir simultaneously?

I took AMI example from demos and added BiDir option. However, as far as I
can see synchronous calls working, but asynchronous are not.

The exception that i see (client side) is the following:

SEVERE: Unexpected error during receiveMessages. Lost a message!
java.lang.NullPointerException
    at org.jacorb.orb.giop.BiDirConnectionClientInterceptor.send_request(BiDirConnectionClientInterceptor.java:125)
    at org.jacorb.orb.portableInterceptor.ClientInterceptorIterator.invoke(ClientInterceptorIterator.java:129)
    at org.jacorb.orb.portableInterceptor.AbstractInterceptorIterator.iterate(AbstractInterceptorIterator.java:66)
    at org.jacorb.orb.portableInterceptor.ClientInterceptorIterator.iterate(ClientInterceptorIterator.java:87)
    at org.jacorb.orb.DefaultClientInterceptorHandler.invokeInterceptors(DefaultClientInterceptorHandler.java:328)
    at org.jacorb.orb.DefaultClientInterceptorHandler.handle_send_request(DefaultClientInterceptorHandler.java:132)
    at org.jacorb.orb.Delegate.servant_preinvoke(Delegate.java:2505)
    at org.jacorb.orb.ReplyReceiver.performCallback(ReplyReceiver.java:240)
    at org.jacorb.orb.ReplyReceiver.replyReceived(ReplyReceiver.java:183)
    at org.jacorb.orb.giop.ClientConnection.replyReceived(ClientConnection.java:355)
    at org.jacorb.orb.giop.GIOPConnection.receiveMessagesLoop(GIOPConnection.java:820)
    at org.jacorb.orb.giop.GIOPConnection.receiveMessages(GIOPConnection.java:527)
    at org.jacorb.orb.giop.MessageReceptor.doWork(MessageReceptor.java:69)
    at org.jacorb.util.threadpool.ConsumerTie.run(ConsumerTie.java:60)
    at java.lang.Thread.run(Thread.java:724)


The client initialized as following:

            Properties props = new Properties();

props.put("org.omg.PortableInterceptor.ORBInitializerClass.bidir_init",
"org.jacorb.orb.giop.BiDirConnectionInitializer");

            ORB orb = ORB.init( args, props );
            POA root =
                    POAHelper.narrow (orb.resolve_initial_references
("RootPOA"));
            root.the_POAManager().activate();

            ArrayList<Policy> list = new ArrayList<Policy>();

list.add(root.create_lifespan_policy(LifespanPolicyValue.TRANSIENT));

list.add(root.create_id_assignment_policy(IdAssignmentPolicyValue.SYSTEM_ID));

list.add(root.create_implicit_activation_policy(ImplicitActivationPolicyValue.NO_IMPLICIT_ACTIVATION));

list.add(root.create_id_uniqueness_policy(IdUniquenessPolicyValue.UNIQUE_ID));

            Any any = orb.create_any();
            BidirectionalPolicyValueHelper.insert(any, BOTH.value);
            list.add(orb.create_policy(BIDIRECTIONAL_POLICY_TYPE.value,
any));

            Policy [] policy = list.toArray(new Policy[0]);

            POA poa = root.create_POA("MyPOA", root.the_POAManager(),
policy);
            poa.the_POAManager().activate();


Please, advise.

Thank you.


More information about the jacorb-developer mailing list