Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / May 2008

Tip: Looking for answers? Try searching our database.

Reading message queues with Java?

Thread view: 
bernd - 07 May 2008 16:30 GMT
Hi folks,

is there a way to read local message queues from within a Java
application?

I have got a C++-application (on Solaris 10) generating a message
queue which has to be read out by a Java program. I have read about
JMS and java.nio, but it seems that these would not be appropriate to
help solving my problem.

Any idea, suggestion, package? ;-)

Cheers

Bernd
wizard of oz - 08 May 2008 02:33 GMT
If the program is posting to a Message Queue, then JMS is exactly what you
want.

Another possibility is that it is writing to something that you are calling
a message queue, but it is really something else. An example might be that
the C++ program is writing to a Named Pipe. If so, you might want to look at
java.io.PipedInputStream and other java.io.Piped* classes.

Why do you believe JMS is the wrong package to work with a message queue?

> Hi folks,
>
[quoted text clipped - 11 lines]
>
> Bernd
bernd - 08 May 2008 12:02 GMT
Hi wizard,

thx for Your reply at first.

I have checked JMS just superficially, I might be wrong, but I have
read that JMS manages communication between two Java progs, not
between a program in a different language and a Java application.

Moreover, in my environment setting up JMS would be too much effort at
the moment, I need something simpler (ideally, a package of the JDK).

To be more precise with my notion of a message queue: I am "talking"
about memory structures generated with the msgget() syscall (man ipcs,
e.g.). But I have not found an implementation in the JDK up to now
(maybe because of the platform specific aspects).

I am considering using JNI and a C-Implementation of the functionality
I need, but if there is still an easier way, I would not mind a
different suggestion.

Cheers

Bernd

> If the program is posting to a Message Queue, then JMS is exactly what you
> want.
[quoted text clipped - 23 lines]
>
> - Show quoted text -
Seamus - 08 May 2008 13:50 GMT
> I have checked JMS just superficially, I might be wrong, but I have
> read that JMS manages communication between two Java progs, not
> between a program in a different language and a Java application.

You are wrong - JMS can be used in the general sense (Using it here to
connect to IBM main frame MQs)
Michael Justin - 14 May 2008 17:37 GMT
> I have checked JMS just superficially, I might be wrong, but I have
> read that JMS manages communication between two Java progs, not
> between a program in a different language and a Java application.
>
> Moreover, in my environment setting up JMS would be too much effort at
> the moment, I need something simpler (ideally, a package of the JDK).

Many JMS (or general MoM) libraries for Java can be "embedded" in the
application so that performance and memory footprint is very low.
Maybe xmlBlaster (www.xmlBlaster.org) does the job, I used it with
Delphi and it supports many other languages out of the box.

Hope this helps(tm)
Signature

Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de

EricF - 15 May 2008 05:08 GMT
>> I have checked JMS just superficially, I might be wrong, but I have
>> read that JMS manages communication between two Java progs, not
[quoted text clipped - 9 lines]
>
>Hope this helps(tm)

Wish I hadn't missed the original post.

JMS manages communication between a message queue and a Java program. There is
no requirement that a Java program is used to enqueue or dequeue a message.
You can have programs written in different languages operating on the same
queue.

Eric

Eric


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.