Hi,
This is my problem:
I've many
object s that need to be accessed remotly, for example A and B.
First object has
method that returns
reference to the second object:
class A {
...
B getB(){...}
...
}
I have implemented servants for A and B (APOA and BPOA).
Method getB() returns reference made by rootPOA.servant_to_reference()
and narrowed by BHelper.narrow().
When I try to call some B's methods in a
client application I get some null
pointer exception.
My question is how I should make and return reference to B by A's getB()
method?
Thanks in advance.
Uzytkownik
<vivekm@xxxxxxxxxxx> napisal w wiadomosci
Hello,
Try using a Naming service instead of passing the object reference,
its a good design.
Best Regards,
Vivekanandan M
The problem is that it ought to be done that way, because there's a
software
which does
something like this:
...
SomeClassA someA =
SomeClassAHelper.narrow(remoteReferenceToATakenFromTheNameServer);
SomeClassB someB = SomeClassBHelper.narrow(someA.getB());
...
I need to
write mocks for SomeClassA and SomeClassB.
Does anybody have idea how to do that?
Thanks and best regards
Blogs related to Returning remote reference to an object by another remote object
38. Servlets 20 mins drill and Quiz.
A open source library for
java. Please refer sourceforge site for sample servlet examples.
... If a session is existing, it will
return that session
object,
... If session exists, then it returns the
reference of that session
object,
...
Core Java & J2EE
What value does readLine()
return when it has reached the end of a file'The
... What is the default value of an
object reference declared as an instance variable'null
... They have to deal with communication between
remote systems,
...
Creating interactive prototypes: let’s move beyond “paper prototypes”
This dialog box lets you link an
object to
another PowerPoint file or even
... and running external programs such as small programs written in
Java or more
... be published on a Web site for easy review by reviewers at
remote locations.
...
Swing and Roundabouts 1M: Emission DTs
Another option is eventbus.dev.
java.net by Michael Bushe, which uses the
... Those might be serialised into XML, and sent over HTTP to
remote QRestResource responders.
... where we wait for a response, and
return a response
object.
...
Core Java & J2EE
What value does readLine()
return when it has reached the end of a file?
... Java only supports pass by value. With objects, the
object reference itself is passed by value
... They have to deal with communication between
remote systems,
...
JAVA BASIC QUESTIONS
21) Which cast must be used to cast an
object to
another class?
... 45) You can explicitly drop a
object reference by setting the value of a variable whose data type
... Java Supports three jump statements: break, continue, and
return.
...