开发者

Printing stack trace while using CORBA

I need to identify the caller of my method. So I would like to print stack trace. Unfortunately, our system is built with CORBA interfaces so if I print stack trace I see smth like this:

at net.mycompany.MyClass.MyMethod(Stream.java:124)
    at net.mycompany.corba.MyCORBAInterface.IDLStream64POA._invoke(Unknown Source)
    at org.jacorb.poa.开发者_JAVA技巧RequestProcessor.invokeOperation(RequestProcessor.java:299)
    at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:602)
    at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:745)

How can I identify a real caller?


In general, it's not possible to know the call stack of the caller in CORBA - the caller might not even be written in Java.

You have two choices:

  1. let the exception propagate back to the client. There is an extension in CORBA to support propagation of Java callstacks. If JacORB supports that, and if the client is able to interpret it, you may get some reasonable traceback on the client.
  2. JacORB has an extension for tracing which you might want to use instead.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜