Problem: Product: VBJ 5.x Platform: All JDK: Not applicable. Component: Visinotify 1. How to destroy Visinotify Channel? 2. What is the reason for the following exception thrown: org.omg.CORBA.NO_PERMISSION: minor code: 4F4D0000 completed: No at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:262) at com.inprise.vbroker.orb.SE.read(SE.java:28) at com.inprise.vbroker.orb.DelegateImpl.handleReply(DelegateImpl.java:793) at com.inprise.vbroker.orb.DelegateImpl.invoke(DelegateImpl.java:679) at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:258) at org.omg.CosTypedEventChannelAdmin._TypedEventChannelStub.destroy(_TypedEventChannelStub.java:157) at org.omg.CosTypedNotifyChannelAdmin._TypedEventChannelStub.destroy(_TypedEventChannelStub.java:660) at example.Example.main(Example.java:25) Resolution: Below is the example to destroy Visinotify Channel [Example.java] import org.omg.CORBA.IntHolder; import org.omg.CORBA.ORB; import org.omg.CosNotification.Property; import org.omg.CosTypedNotifyChannelAdmin.TypedEventChannel; import org.omg.CosTypedNotifyChannelAdmin.TypedEventChannelFactory; import org.omg.CosTypedNotifyChannelAdmin.TypedEventChannelFactoryHelper; public class Example { public static void main(String[] args) { try { ORB orb = ORB.init(args, null); TypedEventChannelFactory factory = TypedEventChannelFactoryHelper.narrow(orb.resolve_initial_references("TypedNotificationService")); TypedEventChannel channel = factory.create_typed_channel(new Property[] {}, new Property[] {}, new IntHolder()); System.out.println("created Channel"); System.out.println("calling Destroy Channel ....."); channel.destroy(); System.out.println("Channel destroyed sucessfully ....."); } catch (Exception e) { e.printStackTrace(); } } To run: vbjc Example.java osagent & visinotify & vbj Example The exception " org.omg.CORBA.NO_PERMISSION: minor code: 4F4D0000 completed: No " does occur with BES 5.1 Visinotify, but not with BES 5.2.1 Visinotify. A workaround is to upgrade to BES521.
↧