Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Corba Multithread

 
cynthia zhuang
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
o... I need the multiple threads ...
any details ?
Thanks!
 
cata lin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much...
I have this book , and I have read them and I will try to read the examples , thanks a lot !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic