Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes Cunning plan required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Cunning plan required" Watch "Cunning plan required" New topic
Author

Cunning plan required

David Garratt
Ranch Hand

Joined: Aug 08, 2003
Posts: 198

I am working on an application which has a need to generate unique sequential numbers from both a full blown java swing application running on a networked workstation and/or and portable wirless device running a web based application. I want to keep the application database neutral and avoid any proprietary tricks like Oracle ssequences etc. I have thought about using either the users workstation or username to act as a partial key in a database field to avoid any record locking/consistency problems in the database table that holds the next number to use as a single record. However I'm having second thoughts. Is there a better way, perhaps using a servelet or something similar which I'm running to support the web part of my application which I can call from both the web app and the desktop app to get a unique number. I've probably not explained to well but if you understand and have any similar experience or suggestions before I go off in the wrong direction I would be very grateful.

Thanks

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cunning plan required