Hi Mark,
Thanks for the answer. I will describe a bit more the purpose of my
question.
From an Java application I want to retrieve all the CORBA object references
activated under a certain POA by another Java program, in order to invoke a
method to clean up resources.
In the Java application Im writting, I know the POA name (so, I can retrieve
the right POA object from the ORB) and the type of object I have to narrow
to, but I did not find any mean to retrieve the CORBA object references
activated by that POA. When performing my question, I was assuming (probably
incorrectly) that the POA manager records the ids of the object it
activates.
If this is the case, I was wondering if there is any means (probably a non
standard visibroker propietary API) to retrieve these ids from a POA object.
Other alternative to achieve the same goal is to perform an additional step
when activating the object, that is storing it under a certain Naming
Service branch, but I will prefer to avoid this extra step. Another
alternative I could figure out, in the same direction, is to store the IIOP
of the references in a file and later on retrieve then. But before doing
that I want to confirm the "POA-through" approach has no sense, which avoid
modifying the application that performs the activation.
I hope this explanation clarifies the purpose of my question
Thanks in advance
Best regards
> Retrieve the CORBA objects from where? The client? The server?
>
[quoted text clipped - 17 lines]
> >
> > Best regards
Mark Woyna - 15 Jan 2004 16:03 GMT
Do you need to get each reference individually, or are you simply
interested in cleaning up the resources for *all* objects associated
with a specific POA?
In either case, you may be better of exposing a management interface
of your own design that allows you to perform these types of functions.
interface AdminService {
sequence<string> getPOANames();
void releaseResourcesForObjects(in string poaName);
sequence<Object> getObjectsForPOA(in string poaName);
...
};
This would give you many of the benefits of your Name Service based
approach, without having to "pollute" the Name Service with large
numbers of objects. You also benefit by encapsulating the cleanup
logic behind the interface, freeing the client application from
having to much around with the object references. Since it's likely
that you may change Orbs at some point, this approach avoids any
VisiBroker specific features, albeit you may have to make a few
changes in the server's implementation.
Mark
> Hi Mark,
>
[quoted text clipped - 52 lines]
> > >
> > > Best regards
Javier Tirado - 16 Jan 2004 14:26 GMT
Thanks for the suggestion about the interface. The problem is how to
implement them.
These CORBA objects (the ones Im trying to find out) are created by several
application that are already written.
The problem Im trying to solve is not how the client application access the
remote system, but how to keep track of the CORBA object that are created by
several applications.
One possible option is to modify the current code in a way that every time
an object under that POA is created the IOR is written to a file in a well
known place (this is similar to putting the IOR under a well known branch
into the naming service) that later on will be accessed by the code that
implements the interface.
Other option is to perform a call to the AdminService implementation that
will keep the list of references in memory.
Or, the third option, try to obtain the list of references from the POA
object, that could be easily obtained from the ORB object. Is there any way
to do that, event through a propietary API?
Best regards
Mark Woyna - 20 Jan 2004 16:03 GMT
Since each process would contain an instance of the AdminService
implementation, it would have access to the root POA, and all
child POAs.
Unfortunately, it doesn't appear that the POA interface was
designed for this type of managability, as there are no methods
that allow one to iterate over a POA's child POAs. Thus, you
would have to modify the existing code to add each POA to the
AdminService.
Additionally, there does not appear to be an operation that returns
the set of objects managed by a POA. Again, you'd have to modify
the existing code to add each object to the Admin Service, as you
point out below.
I would avoid proprietary hooks. If you're going to go through
the hassle of modifying the existing code, you're better off
making the changes portable.
I believe that VisiBroker offers a management console, which may
provide a few of the things for which you're looking:
http://info.borland.com/techpubs/books/bes/htmls/UsersGuide5/UsersGuide/vbconsol
e.html
Mark
> Thanks for the suggestion about the interface. The problem is how to
> implement them.
[quoted text clipped - 20 lines]
>
> Best regards