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 / Databases / April 2004

Tip: Looking for answers? Try searching our database.

Duplicated result from ResultSet JDBC and MYSQL

Thread view: 
Mel - 15 Apr 2004 09:07 GMT
First of all, this is what my servlet is doing.

My servlet is used with a Quartz Scheduler to periodically send sms
content to subscribers. I use,

-MySQL  = to store the content and subscribers' phone number
-Quartz scheduler = to do scheduling for delivery of contents
-Log4J = to log all delivery of contents

The problem: My servlet sends the content twice to a subscriber. It
suppose to just send once to each subscriber. My ResultSet return two
duplicated results for each rs.next()

Config:
Schelude of delivery is every Wed and Thur
Log file : cms.log
MySQL URL connection:
jdbc:mysql://178.547.22.345/best_cms?user=best_root&password=pass&autoReconnect=true&useUnicode=true&characterEncoding=ISO-8859-1

So far I've done some investigation and it seems that,

-When the scheduler is triggered, the app will start to send a content
to the listed subscribers. Say 1000 subscribers subscribe to
monophonic ringtone, then I shall set the scheduler to send one
monophonic ringtone to each subscribers.

-But the app seems to send two contents. I've tested on my dev server
(Windows XP) and it works well, but on my production server, the
problem happens.

I've done many checks on my SQL statements, (even putting the word
DISTINCT in), but to no avail. My troubleshooting ideas are that,

-Could it be a JDBC connection problem? Could I solve the problem by
putting a delay between connection to the MySQL and query?

-Or could it be the scheduler problem?

Please help.

Mel
Robert Klemme - 15 Apr 2004 12:52 GMT
> First of all, this is what my servlet is doing.
>
[quoted text clipped - 13 lines]
> Log file : cms.log
> MySQL URL connection:

jdbc:mysql://178.547.22.345/best_cms?user=best_root&password=pass&autoReco
nnect=true&useUnicode=true&characterEncoding=ISO-8859-1

> So far I've done some investigation and it seems that,
>
[quoted text clipped - 14 lines]
>
> -Or could it be the scheduler problem?

I'd first check the data.  Maybe you simply loaded the set of data twice
into the database and have no indexes that prevented duplicate insertion.
If data is ok:

From what you write I'd guess that it's rather a scheduler problem.  Maybe
you need to take action to ensure that a single event is not started
twice.  Or you have two schedulers around that concurrently start the same
task.

Regards

   robert


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.