• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CORBA - object reference valid?

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
ice is for people that are not already cool. Chill with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic