I am developing a peer to peer file sharing application usig Java and CORBA. I am new to CORBA.
So far I have successfully created a client program that registers a file in the SQL Database via CORBA. The table stores the following information :
I am stuck at this point:
There is at this moment no standardized way to retrieve hostname/portnumber of a CORBA client, the reason is that CORBA is not tied to just sockets, there could be multiple kinds of transports which have completely different ways for addressing. Some ORBs do have some extension to make this possible, for example TAO has a TransportCurrent feature that does give access to this kind of information at the moment the client connects with IIOP. JacORB does have support for org.jacorb.transport.iiop.Current which also looks similar, have a look at that.
But why not use CORBA for the file transfer? Than you don't have to get this information but just can store the stringified object reference and use it at a later moment.