Archived
This forum has been archived. Please start a new discussion on GitHub.
Problem with gettting a proxy to ServiceManager
Hi there,
Howdy. I'm trying to get a proxy to ServiceManager in the same lines as in IceBox.Admin w/o extending Ice.Application.
The control never returns from ServiceManagerPrxHelper.checkedCast(base);
I tried to trace the program but I'm lost. I'm missing something here.
Any ideas are greatly appreciated.
Thanks,
Venkatesh
Howdy. I'm trying to get a proxy to ServiceManager in the same lines as in IceBox.Admin w/o extending Ice.Application.
ObjectPrx base = communicator.stringToProxy(managerProxy); ServiceManagerPrx manager = ServiceManagerPrxHelper.checkedCast(base);
The control never returns from ServiceManagerPrxHelper.checkedCast(base);
I tried to trace the program but I'm lost. I'm missing something here.
Any ideas are greatly appreciated.
Thanks,
Venkatesh
0
Comments
-
Hi,
In order to help you we need more information. Whenever you post a request for help, please always specify the following information:- Ice version
- Language mapping(s) in use
- Platform and compiler information
The most likely reason for a remote invocation to hang is if the server has run out of threads, i.e., all of the threads in its thread pool are busy. Increasing the size of the server's thread pool can alleviate this problem.
Take care,
- Mark0 -
Hi Mark,
Thanks for your reply. Please find the requested information below.
* Ice version: 2.1.0
* Language mapping(s) in use: Java
* Platform and compiler information: Win2K, J2SE 1.5
Execution Context: From a simple Java class that is trying to access the ServiceManager remotely.
I tried increasing the Server and Client Thredpool size to 3 but the problem persists.
Thanks,
Venkatesh0 -
Hi,
Is IceBox.Admin able to succesfully shut down the server? If so, then that would indicate the problem resides in your client. If not, then it is most likely a server issue.
Are you using the default IceBox server implementation provided by Ice? Or are you using a custom implementation?
If you are still having trouble, the best way to get this resolved quickly is to provide a small but complete example that we can use to reproduce the problem.
Take care,
- Mark0 -
Thanks again Mark.
Q. Is IceBox.Admin able to succesfully shut down the server?
A. NOPE. Tried both IceBox.Admin and iceboxadmin, Wont work.
Q. Are you using the default IceBox server implementation provided by Ice?
A. Default IceBox.Server provided by Ice.
Q. If you are still having trouble, the best way to get this resolved quickly is to provide a small but complete example that we can use to reproduce the problem.
A. I'll try to get a sample but the app is wired with Spring. Lemme see what I can write up.
Thanks,
Venkatesh0 -
Another reason that a remote invocation (such as checkedCast) might hang is if the server's object adapter is not yet activated. However, if you are certain that your client is using the correct proxy for the ServiceManager, I doubt that this is the reason because the IceBox implementation clearly activates its object adapter.
Is it possible that your client is connecting to another object adapter instead? If you are at all uncertain, I recommend running both the client and the IceBox server with --Ice.Trace.Network=3 and examining the output for verification.
- Mark0 -
<Mark>Another reason that a remote invocation (such as checkedCast) might hang is if the server's object adapter is not yet activated. However, if you are certain that your client is using the correct proxy for the ServiceManager, I doubt that this is the reason because the IceBox implementation clearly activates its object adapter.
<SV> I might have run into this situation but not sure. Why dont I get an exception when servers adapter isnt yet activated.
I do a lazy init of gettting the Proxy and things seem to work now.
I do have the Network trace on. --Ice.Trace.Network=3
Thanks for your helpful hints Mark,
Venkatesh0 -
Venkat Seeth wrote:<SV> I might have run into this situation but not sure. Why dont I get an exception when servers adapter isnt yet activated.I do a lazy init of gettting the Proxy and things seem to work now.
- Mark0 -
This makes sense to me now. I was initializing an object immediately after the startup of services which tries to get a proxy to the ServiceManager.I'm not sure what you mean. Can you provide more detail?
Thanks for the clarification.
Venkatesh0