I want to interthread communication 2 java projects . How can I do this? Java using IPC? and then threads messaging on each one .
-
Interthread or interprocess?Andy Turner– Andy Turner2016年08月10日 11:20:16 +00:00Commented Aug 10, 2016 at 11:20
-
interthread . communicate of projects threadsk.kbr– k.kbr2016年08月10日 11:22:06 +00:00Commented Aug 10, 2016 at 11:22
-
3You seem to be confused between _inter_thread _intra_application communication and _inter_application communication. Further, this question is far too broad - there are an almost infinite number of ways to do this; from the basic (file) to the advanced (sockets).Boris the Spider– Boris the Spider2016年08月10日 11:22:15 +00:00Commented Aug 10, 2016 at 11:22
-
There are 2 projects and there are threads of projects .I know I must use to socket ,ipc but ı dont know pathk.kbr– k.kbr2016年08月10日 11:27:07 +00:00Commented Aug 10, 2016 at 11:27
-
Do you have document about this ?k.kbr– k.kbr2016年08月10日 11:31:32 +00:00Commented Aug 10, 2016 at 11:31
1 Answer 1
I hope I understand correctly what you need. Have a look at RMI or JMS.
Both are APIs of Java EE and application servers like WebLogic or WildFly implement them out of the box.
RMI is the Remote Method Invocation API which is primarily used when one Java application running in a JVM provides services to other Java applications (running in separate JVMs). The client applications do not need to know the implementation of the services, just their interfaces.
JMS (Java Message Service) can be used in a single Java application or across multiple applications to provide asynchronous point-to-point (Queue in JMS terminology) or publish/subscribe (Topic in JMS terminology) type of communication between components.