This essay developed out of conversations I've had with several other programmers about why Java smelled suspicious. It's not a critique of Java!
Sycorax - complete tutorials
Programming Tutorials
" Java provides the industry - software companies and customer alike , an opportunity to create a true open computing environment where software is portable,
and customers benefit from increase competition. "
Java and the Future
December 1, 2008-LEJB 3.1: EJB New and Improved!
The EJB 3.0 specification was a huge improvement from what you were used to in the early versions of EJB. Available as an early draft, EJB 3.1 has many more features and is even easier to use.
December 1, 2008-Should Java Assert that Network I/O Can't Occur on the UI Thread?
Doing network I/O on the user interface (UI) thread is bad. Most developers know that and can tell you why; unfortunately, it's still done.
Register now to recieve special alert and latest technology news!
Setting up Hibernate - Add the Hibernate libraries
Hibernate libraries can be found at the location where you downloaded and unzipped the Hibernate distribution.
Sample Application with Eclipse -
We'll use a single table 'user' to store the user information with the following fields:
Create this table in the database. The syntax for the oracle is given below.
CREATE TABLE USER (
USER_ID NUMBER PRIMARY KEY,
FIRST_NAME VARCHAR (20),
LAST_NAME VARCHAR (20),
AGE NUMBER,
EMAIL VARCHAR (40)
);
If you are using MySQL database, you can create the table using following syntax.
CREATE TABLE USER (
USER_ID NUMERIC PRIMARY KEY,
FIRST_NAME CHAR (20),
LAST_NAME CHAR (20),
AGE NUMERIC,
EMAIL CHAR (40)
);
Now it is the time to create our Hibernate configuration file. This file will contain the hibernate session configuration like the database driver,user name and password or a JNDI data source if you would like to use one,cache provider ad other session parameters. Also this file contains the entries for Object to Relation mapping that we will create later. Initially let's create the file with minimum required information and understand what does that information mean.
Create a new file hibernate.cfg.xml in src folder and add the following contents to this file.