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 / General / October 2007

Tip: Looking for answers? Try searching our database.

JMS connection and sessions

Thread view: 
Vikas Yadav - 17 Oct 2007 12:15 GMT
hi,
here is what i am trying to do.......

i am reading from one jms queue using multiple threads, using one
connection and multiple sessions (one session per thread) associated
with that......now my questions are

1) is it possible that one of the session dies and rest keep getting
the data(assuming a jms reader)?? if yes, then is it possible to
restart this session without restarting the connection itself?

2) if we create one connection par thread, can we rest assured that no
two threads are getting the same message....i.e. no data duplication
will be there??

Any help would be great....thanks a lot..

Thanks,
Vikas
Manish Pandit - 17 Oct 2007 15:30 GMT
> 1) is it possible that one of the session dies and rest keep getting
> the data(assuming a jms reader)?? if yes, then is it possible to
> restart this session without restarting the connection itself?

Yes, as long as other sessions are alive, they can keep getting the
data. However, if the single connection that is supporting all
sessions dies, there is no way to read messages as all sessions would
die automatically.

> 2) if we create one connection par thread, can we rest assured that no
> two threads are getting the same message....i.e. no data duplication
> will be there??

If you are using Session.DUPS_OK_ACKNOWLEDGE in the session, then
there could be duplication. But if you use transactions and/or
AUTO_ACKNOWLEDGE/CLIENT_ACKNOWLEDGE, there will not be duplicates -
however you would see a drag in performance.

-cheers,
Manish


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.