aspose file tools*
The moose likes Distributed Java and the fly likes passing a file object on a network using corba Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "passing a file object on a network using corba" Watch "passing a file object on a network using corba" New topic
Author

passing a file object on a network using corba

s ravi chandran
Ranch Hand

Joined: Dec 20, 2010
Posts: 154
hi,
i need to pass a file object through a network using corba. I am using Java IDL right now.. as this application has to work in JVM 1.3, this is a specific restriction which cant be changed. I have tried java serialization for this, it worked locally, but when on LAN, it doesnt work.

Anyone has any other logic to do it?
Thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
A java.io.File object is localized to the operating system it is created under, why would you expect a remote object to use the same pathnames?

Bill
s ravi chandran
Ranch Hand

Joined: Dec 20, 2010
Posts: 154

thanks for replying...
Its not the filepath i am interested in. Its the file with content. I need to pass multiple files over network using corba. Now this files will reach a java server where i have to process it and put it in appropriate place. Is passing the file content the only way of doing it? As there are many files, i dont knw if it wld be optimal or not.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18656
    
    8

Yes, if you want to pass the contents of the file from one computer to another, you have to pass the file content. So "optimal" doesn't come into the question because there is no different option for it to be better (or worse) than.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
Ah! when you said file object I thought you meant java.io.File

You can either move the file or provide some sort of reference whereby the remote server can read the content from the present location.

What is your real problem here? Total file size/ network bandwidth? Disk space?

Bill
s ravi chandran
Ranch Hand

Joined: Dec 20, 2010
Posts: 154
thanks for reply. I was initially thinking of java.io.File only.. But due to the reference concept, it doesnt fit in my requirement. now the situation is like this: i have an application in which user uploads a file and sends to another registered user over a network which can be anything frm LAN to normal DSL network.. Now because the application client can be in either c++ or java, i need corba... and as the server has jvm 1.3 restrictions, i am using java IDL.

Now, the main issue is the uploaded binary file or text file to be transported as message.. I dont know how to make it work with least overhead.. I have implemented the reading of file content and passing it over network, but i wanted to know if there is any other way or not.. as I am not able to think of any other option on corba...

passing of object by any means is not possible right?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18656
    
    8

You're talking about "least overhead"? That suggests that you already have at least two working candidates for sending a file's data. Can you tell us what they are?
s ravi chandran
Ranch Hand

Joined: Dec 20, 2010
Posts: 154
that exactly is what i am pointing out.. I am unable to think of anything else.. Thats why I am asking, is there any option which i might be missing?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing a file object on a network using corba