EJB 3.0 and SQL
I am trying to build a simple application with JDeveloper 11g. I connect to a MSSQL Server 2008 database and get data from it. I am new at Enterprise Java Beans 3.0 so I don't know what code I should write for data update, delete or i开发者_如何学Gonsert and where to write. I made an application(Fusion Web Application) but the changes I made on that application don't affect the database.I am new at Enterprise Java Beans 3.0 so I don't know what code I should write for data update, delete or insert and where to write. Could anyone help me with this problem?
You have several options, but the recommended way* is to use JPA (Java Persistence API) for storage and retrieval of your data. To learn JPA, you can read this chapter of Java EE tutorial: Introduction to the Java Persistence API
*: For some projects it makes sense to consider other options as well, but JPA is the standard persistence technology of Java EE 5 and 6.
精彩评论