Hey i have just started learning about programming. Im not really good at it. Hoping to get some help here to improve. I just wanted to know how to overcome thw AlreadyBoundException. If someone could help me out with this it would be great.
without seeing you code , I can only assume you are trying to bind your servant on a naming service.
what I would normally do, is to always use "rebind(......)" method(even for the first time) instead of "bind(........)" method.
if you use bind()... then try to bind() again, it will give you alreadyBind error
if you use rebind() initially, then rebind() again, it will just let you override the old reference with new one
the catch is , you code will always work, but it allows multiple instance of servant running, bad or good?
it depends how you control it.
so simply call rebind() should solve your problem
Joined: Sep 15, 2010
thank you so much for the reply. yes, im actually trying to modify the "hello world" program and trying to avoid the AlreadyBoundException. So to be clear, if i call rebind() twice, the problem will be solved?
Joined: Feb 19, 2008
what i know bind() then bind() definitely not working