This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes CORBA - object reference valid? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "CORBA - object reference valid?" Watch "CORBA - object reference valid?" New topic
Author

CORBA - object reference valid?

Dan Murphy
Ranch Hand

Joined: Mar 29, 2005
Posts: 126
Hi,

I'm writing a Java CORBA client, which uses the Visibroker ORB. I'm using the following code to check if a remote object reference is still valid:

I added the try-catch, because _non_existent() was throwing a NullPointerException. The evidence was provided by the following stack trace I found in my logs:

Caused by: java.lang.NullPointerException
at com.inprise.vbroker.orb.ORB.getThreadLocalObject(Unknown Source)
at com.inprise.vbroker.qos.PolicyHelper.get_client_policy(Unknown Source)
at com.inprise.vbroker.orb.DelegateImpl.get_policy(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._get_policy(ObjectImpl.java:310)
at com.inprise.vbroker.GIOP.ProtocolConnector.doServiceContext(Unknown Source)
at com.inprise.vbroker.GIOP.ProtocolConnector.doServiceContext(Unknown Source)
at com.inprise.vbroker.IIOP.ProtocolConnector.doServiceContext(Unknown Source)
at com.inprise.vbroker.GIOP.ProtocolConnector.request(Unknown Source)
at com.inprise.vbroker.GIOP.ProtocolConnector.pseudoRequest(Unknown Source)
at com.inprise.vbroker.GIOP.ProtocolConnector.non_existent(Unknown Source)
at com.inprise.vbroker.orb.DelegateImpl.non_existent(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._non_existent(ObjectImpl.java:137)
at com.acecomm.parentpatrol.surePay.SurePaySession.refreshSessionIfNecessary(SurePaySession.java:335)

Anyway, my question is this.....is there a better way to check whether a remote object reference is still valid? Preferably, one which doesn't throw any runtime exceptions

Thanks in Advance,
DM
[ January 18, 2007: Message edited by: Dan Murphy ]

SCJP, SCJD, SCWCD
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: CORBA - object reference valid?
 
Similar Threads
Back in Business!!
CORBA - OBJECT_NOT_EXIST exception
problem with ejb and corba comm in j2ee sdk server
HeadFirst EJB question. java.rmi.RemoteException: CORBA BAD_OPERATION
I need some help here............Please