Re: midlet connecting to normal database
Bill Day <[email protected]> Tue, 13 May 2003 00:15:04 -0600
| Newsgroups | gmane.comp.java.sun.webjava.wireless |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 13 May 2003 02:31:04 +0200, zywy <[email protected]> wrote: >i was trying to write my first midlet( just to see how it actually works ) which was to connect to some database and get some simple data but I immediately realized that java.sql package cannot be used :) , as there is a big and obvious differences between midlets and normal applications > >so my question is which connection classes accessible for midlets should i use to connect to database? is there any high-level connection class or i should use connection for specific protocol? >in that case it would not very quite easy to write a simple application I guess :) > >maybe you could show some sample code how to connect to a remote database, I could find any at java.sun.com( should I? )or some hyperlinks... The usual practice would be to have your MIDlet talk to a middle tier, likely Java Servlet based, which in turn either uses JDBC to talk to your database or else uses EJBs encapsulating your business logic and which in turn talk to you database. Sun encapsulates this best practice via our Wireless Blueprints, a part of the Java Blueprints online at http://java.sun.com/blueprints. You can learn more details and access sample code from the Wireless Blueprints via my webcast "End-to-End Using the J2ME and J2EE Platforms", at: http://developer.java.sun.com/developer/onlineTraining/webcasts/toronto/bday3/bday3.html For PDF of slides only, see: http://developer.java.sun.com/developer/onlineTraining/webcasts/pdf/toronto/bday3.pdf Hope this helps, Bill Day http://billday.com/j2me =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff WEBJAVA-WIRELESS". For general help, send email to [email protected] and include in the body of the message "help".