Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Connecting to Database Server

 
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends, I have a little problem about MIDP application.

How can I connect my MIDP application to the database server for doing CRUD (Create, Read, Update, Delete) ? Until now, I don't know what database server that will be used but I assume it will be MySQL. Are there any API for doing that ? Thanks for your help.


Jeffry Kristianto Yanuar (Java Instructor)
SCJA, SCJP, SCJD
 
Saloon Keeper
Posts: 22501
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JDBC isn't part of J2ME. So there's no universal way. Even if there was, 2-tier applications are a menace, as SQL Slammer demonstrated. You can't even do JDBC in 2-tier mode from unsigned Java applets, because it's such a security issue.

You might want to investigate setting up some sort of web service. Although it's not as convenient as the brute-force approach, it's more secure - besides insulating your backend database server direct outside attacks, you can use encrypted channels (https).
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you provide the reference where can I use web-service for doing that ? Can I use servlet to connect to the database and using HTTP connection from my MIDP application to connect the servlet ?

Jeffry Kristianto Yanuar (Java Instructor)
SCJP 5.0 SCJA SCJD
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic