jQuery in Action, 2nd edition*
The moose likes Distributed Java and the fly likes Corba Multithread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Corba Multithread" Watch "Corba Multithread" New topic
Author

Corba Multithread

cynthia zhuang
Greenhorn

Joined: May 23, 2001
Posts: 6
hey,all,
I'm a java beginner,
I wrote a socket application to transfer files ,
and I use JavaOrb to implement the java server script,
how can I achieve the multithread ?
Thanks!
cata lin
Ranch Hand

Joined: May 11, 2000
Posts: 44

I wrote a socket application to transfer files ,
and I use JavaOrb to implement the java server script,
how can I achieve the multithread ?

Hi,
Could you please give more details about what you did ?
I do find it clear.
Since it is a socket application, how do you use JavaOrb ?
As I know, the orb comes atop of the tcp/ip stack, and you
talk to the orb when you make network traffic.
About server multithreding, you may have a look at
"Thinking in Java" at
http://www.mindview.net/Books/DownloadSites
where the java book has a very good example in the network chapter.
Cheers.
Cata Lin.
cynthia zhuang
Greenhorn

Joined: May 23, 2001
Posts: 6
Actually , I use VisualC++ as my Client , and Java the Server.
to communicate between the client and server , I use VisiBorker at the client side and JavaOrb at the server side , and I transfer files between server and client through sockets ,now my problem is I don't know how to apply the multi clients while there's corba used ... for all the file transfer implement scripts are written in java at the server side ...
then how can I do ?
Thanks in advance !
cata lin
Ranch Hand

Joined: May 11, 2000
Posts: 44
Hi,
First idea in my mind is to register the object's servant with a SINGLE_THREAD_MODEL POA.
Or you can write your own thread safe wrapper for the code you are using ...
Cheers.
cynthia zhuang
Greenhorn

Joined: May 23, 2001
Posts: 6
o... I need the multiple threads ...
any details ?
Thanks!
cata lin
Ranch Hand

Joined: May 11, 2000
Posts: 44
Hi,
ORB_CTRL_MODEL. This is the alternative.
But the subject (ORBs and multithreading) is very large and ORB-dependant. I am generally working with VisiBroker, but there is also IONA and MICO on the market.
Points to check:
-multithreading of the ORB's libraries.
-threding policies:thread-per-request, thread-per-connection, thread pool.
-POA threading polycy: SINGLE-THREAD or ORB_CTRL_MODEL - for the servant.
You mentioned that you are a Java beginer. A good book would help. Make clear the threads in Java, then how they are on the OS side, and then how servants might maximize the performance.
Recommened reading : Henning&Vinoski "Advanced CORBA".
It's for C++, but the topics are pertinent to Java.
Hope it helps.
Cheers.
cynthia zhuang
Greenhorn

Joined: May 23, 2001
Posts: 6
Thank you very much...
I have this book , and I have read them and I will try to read the examples , thanks a lot !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Corba Multithread
 
Similar Threads
Defference b/w java & Other langs
The java desktop application if hang up when not using for a period of time (about 30 minutes)
Pb when adding element in a list and reading this list in a form
multithread needed.....
MultiThread in C# is Garbage!