1 Reply Latest reply on May 15, 2009 7:01 AM by Mark Little

    Where can I set the jacorb BIDIRECTIONAL policy

    Christian Gruber Newbie

      I'd like to use the jacorb BiDirectional GIOP to avoid opening a socket on the client, which fails because of NAT.
      In the jacorb documentation (http://www.jacorb.org/documentation.html) two steps are mentioned:

      1. Setting an ORBInitializer property and creating the BiDir policy
      2. Adding this policy to the servant's POA.


      Setting the ORBInitializer property can easily be done in jacorb.properties.
      For the other step the manual (http://www.jacorb.org/documentation.html) explains the following:

      Creating the necessary BiDir Policy is done via a policy factory hidden in the ORB.
      import org.omg.BiDirPolicy.*;
      86 BiDirectional GIOP
      import org.omg.CORBA.*;
      [...]
      Any any = orb.create_any();
      BidirectionalPolicyValueHelper.insert( any, BOTH.value );
      Policy p = orb.create_policy( BIDIRECTIONAL_POLICY_TYPE.value,
      any );
      The value of the new policy is passed to the factory inside of an any. The ORB is the told to create a
      policy of the specified type with the specified value. The newly created policy is then used to create a user
      POA. Please note that if any POA of has this policy set, all connections will be enabled for BiDirectional
      GIOP, that is even those targeted at object of POAs that don't have this policy set. For the full source code,
      please have a look at the bidir demo in the demo directory


      But where should I add this in an jboss as (version 4.2.2) configuration or jboss-transactions code to make it work?

      Any help is appreciated.