Do you have an ORM layer , like hibernate , or the JPA ( java persistence "something"). That is what you generally use when you want to shove stuff into the db.
No I don't, what would be the best choise for this?
Um okay , so if you don't have an ORM layer , you would have to look up Hibernate or the JPA if you wanted one. I use the JPA because it is stock. With an IDE like Netbeans , you can point it to the database in question and have it autogenerate the objects. But that make take some time and if you don't have it you would probably be better off using straight SQL to push the values of the received object into the database. For example your java service would look something like this. Mind you its been a while since I've done this , but you get the idea.
//The Person person is what is received from your remote object call
public void personService( Person person )
String insertPersonString = "INSERT INTO PERSONS (name, age) VALUES (?,?)";
PreparedStatement insertPerson = connection.prepareStatement(insertPersonString);
insertPerson.setParameter( 1 , person.age );
insertPerson.setParameter( 2 , person.name );
If this post was helpful please mark it as such.
Thank you for the help. I got the idea.