Wednesday, June 18, 2008

How to map Text datatype in MSSQL with Entity Bean in Hibernate

While generating the Entity with Hibernate Code generation tool it will providing String datatype.

To avoid the exception add @Lob Annotation with the getter method.

Monday, June 9, 2008

How to Convert String into CLOB and File object to BLOB Data Type

Here Hibernate is providing some Static methods to create this Data Types.
  1. Hibernate.createClob(String))
  2. Hibernate.createBlob(bytes))
In MSSQL Mapping of one TextArea In HTML to TEXT Data type in Data base table can be done through implementing one wrapper above the Entity bean.

Sunday, June 8, 2008

@JNDINAME Required Exception

This exception will come with the stateful bean in case of the absence of component.xml in the project.or the Datasource is not present in the project.

Wednesday, June 4, 2008

How to Call a Stored procedure usig JDBC Connection

After having the connection Object you can call any Stored Procedure using following Code.
Here spGetEventClient is the Stored procedure accepts one Argument.
try {
conn = dataSource.getConnection();
CallableStatement cs1 = conn.prepareCall("{call spGetEventClient(?)}");
cs1.setInt(1,13264);
ResultSet rs1 = cs1.executeQuery();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

Monday, April 28, 2008

Seam File upload example

have a Look at the seam examples seamspace.

In the register2.xhtml and the correspondending bean show how to use fileupload with
seam.

Tuesday, April 15, 2008

Thursday, April 10, 2008