Enlightensoft's Blog

Helping in your each step

  • Categories

  • Authors

  • Advertisements

Pass String (or Custom Object) List into Store Procedure from Java

Posted by Pankil Patel on November 1, 2012

  1. Create type:create or replace
    TYPE STRING_LIST_TYPE AS TABLE OF VARCHAR2(7);
  2. Java Code:ARRAY sqlArrayOfString = getSqlArray(arrayListOfString.toArray(), “STRING_LIST_TYPE”,
    tssPortalDataSource);
  3. Store Procedure input param:P_NAME in STRING_LIST_TYPE,
  4. Use list into IN parameter of query in Store Procedure:

select * from EMPLOY where EMPLOY_NAME in (select column_value from (Table(CAST(P_NAME AS STRING_LIST_TYPE))))

Advertisements

Posted in Core Java, Database, Oracle | Tagged: , | Leave a Comment »

Aggregate functions with extra column in select

Posted by Pankil Patel on October 31, 2012

How to select extra column(s) with aggregate function in query?

  1. Rollback script:
    ALTER TABLE EMP_DEPARTMENT DROP CONSTRAINT UNIQUE_1;
    DROP TABLE EMP_DEPARTMENT;
    DROP TABLE EMPLOY;
    DROP TABLE DEPARTMENT;
  2. Create script:
    CREATE TABLE “TSSRISKAPPDBO”.”EMPLOY”
    (
    “EMPLOY_ID”   NUMBER(10,0),
    “EMPLOY_NAME” VARCHAR2(100 BYTE),
    “SALARY”      NUMBER(10,2),
    CONSTRAINT “PK_EMPLOY” PRIMARY KEY (“EMPLOY_ID”) USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS TABLESPACE “AMRISKWLADBO_DATA” ENABLE
    )
    SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING TABLESPACE “AMRISKWLADBO_DATA” ;

    CREATE TABLE “TSSRISKAPPDBO”.”DEPARTMENT”
    (
    “DEPARTMENT_ID”   NUMBER(10,0),
    “DEPARTMENT_NAME” VARCHAR2(100 BYTE),
    CONSTRAINT “PK_DEPARTMENT” PRIMARY KEY (“DEPARTMENT_ID”) USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS TABLESPACE “AMRISKWLADBO_DATA” ENABLE
    )
    SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING TABLESPACE “AMRISKWLADBO_DATA” ;

    CREATE TABLE “TSSRISKAPPDBO”.”EMP_DEPARTMENT”
    (
    “EMPLOY_ID”     NUMBER(10,0),
    “DEPARTMENT_ID” NUMBER(10,0),
    CONSTRAINT “UNIQUE_1” UNIQUE (“EMPLOY_ID”, “DEPARTMENT_ID”) USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS TABLESPACE “AMRISKWLADBO_DATA” ENABLE,
    CONSTRAINT “FK_EMP” FOREIGN KEY (“EMPLOY_ID”) REFERENCES “TSSRISKAPPDBO”.”EMPLOY” (“EMPLOY_ID”) ENABLE,
    CONSTRAINT “FK_DEPT” FOREIGN KEY (“DEPARTMENT_ID”) REFERENCES “TSSRISKAPPDBO”.”DEPARTMENT” (“DEPARTMENT_ID”) ENABLE
    )
    SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING TABLESPACE “AMRISKWLADBO_DATA” ;

  3. Data creation:
    INSERT INTO EMPLOY VALUES (1,’VIBHA’,21);
    INSERT INTO EMPLOY VALUES (2,’PANKIL’,10.2);
    INSERT INTO EMPLOY VALUES (3,’MAYANK’,15);
    INSERT INTO EMPLOY VALUES (4,’NAMRATA’,12);
    INSERT INTO EMPLOY VALUES (5,’NISHA’,9);
    INSERT INTO EMPLOY VALUES (6,’SHAILESH’,12);

    INSERT INTO DEPARTMENT VALUES (1,’APPS’);
    INSERT INTO DEPARTMENT VALUES (2,’UET’);
    INSERT INTO DEPARTMENT VALUES (3,’PROCESS’);
    INSERT INTO DEPARTMENT VALUES (4,’BPO’);

    INSERT INTO EMP_DEPARTMENT VALUES (1,1);
    INSERT INTO EMP_DEPARTMENT VALUES (2,2);
    INSERT INTO EMP_DEPARTMENT VALUES (3,3);
    INSERT INTO EMP_DEPARTMENT VALUES (4,4);
    INSERT INTO EMP_DEPARTMENT VALUES (5,4);
    INSERT INTO EMP_DEPARTMENT VALUES (6,1);
    INSERT INTO EMP_DEPARTMENT VALUES (6,3);
    INSERT INTO EMP_DEPARTMENT VALUES (4,1);
    INSERT INTO EMP_DEPARTMENT VALUES (4,2);
    INSERT INTO EMP_DEPARTMENT VALUES (6,2);

  4. Query: Get Employee(s) data of employee(s) who has the highest Salary in “BPO” department

    SELECT *
    FROM EMPLOY E,
    (SELECT MAX(SALARY) AS MAX_SALARY
    FROM EMPLOY
    WHERE EMPLOY_ID IN
    (SELECT EMPLOY_ID
    FROM EMP_DEPARTMENT
    WHERE DEPARTMENT_ID =
    (SELECT DEPARTMENT_ID FROM DEPARTMENT WHERE DEPARTMENT_NAME = ‘BPO’
    )
    )
    ) MAX_RESULT
    WHERE MAX_RESULT.MAX_SALARY = E.SALARY
    AND E.EMPLOY_ID            IN
    (SELECT EMPLOY_ID
    FROM EMP_DEPARTMENT
    WHERE DEPARTMENT_ID =
    (SELECT DEPARTMENT_ID FROM DEPARTMENT WHERE DEPARTMENT_NAME = ‘BPO’
    )
    );

 

Note: Summary of above code is: get inner join of any aggregate function’s result with the table field

Apply where condition at both places (In inner query having aggregate function  and In outer query with table)

Posted in Database, Oracle | 2 Comments »

“printf” in Oracle SQL Procedure

Posted by Pankil Patel on October 31, 2012

How you would print data to DBMS OUTPUT. during execution of Store Procedure?

OR

How to debug Oracle Store Procedure?

Below is the syntax to print data to DBMS OUTPUT:

DBMS_OUTPUT.PUT_LINE (‘PANKIL—————:’ || v_sql || ‘:’);

Posted in Database, Oracle | Tagged: , , , | Leave a Comment »

How to find dependent tables on my table?

Posted by Pankil Patel on October 3, 2012

Based on constraints on my table, how to find dependent tables?

Below is the query which will give me the tables name & constraint name those are related to MY_TABLE:

select table_name, constraint_name, status, owner
from all_constraints
where  r_constraint_name in
 (
   select CONSTRAINT_NAME from ALL_CONSTRAINTS
   WHERE upper(table_name) = ‘MY_TABLE’   
 )
order by table_name, constraint_name;

Posted in Database, Oracle | Tagged: , , , , , , | Leave a Comment »

How to Reload Applet or Remove class file Caching for Applet

Posted by Pankil Patel on August 26, 2012

Step1: Add below script to your HTML page after End of Body (After </BODY> tag)

<script type=”text/javascript”>
window.APPLET_WRAPER_TAG = “object”;
//window.APPLET_WRAPER_TAG = “APPLET”;
//window.APPLET_WRAPER_TAG = “EMBED”;

window.TAG_TYPE = “application/x-java-applet”;

window.currectApplet = true;
window.allAppletsHTML = new Array();
window.allApplets = new Array();

reloadApplet();

function reloadApplet() {

var resultListObects = getallAppletsHTML();

if (window.currectApplet) {
for (i = 0; i < resultListObects.length; i++) {
window.allAppletsHTML[i] = resultListObects[i].outerHTML;
var htmls = resultListObects[i].outerHTML.split(‘.class’);
htmls[0] = htmls[0] + ‘.class?PankilPatel’;
var html = htmls[0] + htmls[1];
resultListObects[i].outerHTML = html;
}
window.currectApplet = false;
} else {
for (i = 0; i < resultListObects.length; i++) {
resultListObects[i].outerHTML = window.allAppletsHTML[i];
}
window.currectApplet = true;
}
if (!window.currectApplet) {
reloadApplet(resultListObects);
}
}

function getallAppletsHTML() {
var listObects = document
.getElementsByTagName(window.APPLET_WRAPER_TAG);
var resultListObects = new Array();
for (i = 0, index = 0; i < listObects.length; i++) {
if (window.APPLET_WRAPER_TAG.toUpperCase() == “APPLET”
|| listObects[i].type == window.TAG_TYPE) {
resultListObects[index] = listObects[i];
index++;
}
}
return resultListObects;
}
</script>

 

Step2: Configure value of TAG which is used to display Applet in HTML Page, like object, APPLET or EMBED into first line of script.

Step3: Same way change value of “window.TAG_TYPE” to type given in TAG which is used to display applet, into second line of script.

 

Now no need to restart your any browser after applet change.

Enjoy your hassle free development of Applet……………….. 🙂

 

Note: It will work only if you have used only one way to import applet into your HTML file which is any one of  object, APPLET or EMBED.

Posted in Applet | Tagged: , , , , , , | Leave a Comment »

Override toString to Display all class content (Except Static) Using Apache APIs

Posted by Pankil Patel on August 9, 2012

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

@Override
public String toString() {
return ToStringBuilder.reflectionToString(this,
ToStringStyle.MULTI_LINE_STYLE);
}

Posted in Core Java | Tagged: , , , , , | Leave a Comment »

Export to .pdf using Core JAVA

Posted by Pankil Patel on June 22, 2012

Required JAR:

itextpdf-5.3.0.jar

itext-xtra-5.3.0.jar

 

 

File: PDFCreator.java

package co.cc.enlightensoft.pdf;

import java.io.FileOutputStream;

import com.itextpdf.text.Anchor;
import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Chunk;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Font;
import com.itextpdf.text.FontFactory;
import com.itextpdf.text.Image;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;

public class PDFCreator {
public static void main(String[] args) {
try {

// creation of the document with a certain size and certain margins
Document document = new Document(PageSize.A4, 50, 50, 50, 50);
try {
// creation of the different writers
// HtmlWriter.getInstance(document, System.out);
PdfWriter.getInstance(document,
new FileOutputStream(“text.pdf”));
// we add some meta information to the document
document.addAuthor(“Bruno Lowagie”);
document.addSubject(“This is the result of a Test.”);
// we open the document for writing
document.open();

// ##################### Paragraph : Start #####################
document.add(new Paragraph(“Hello world”));
// ##################### Paragraph : End #####################

// ##################### Chunk : Start #####################
Chunk chunk = new Chunk(“Hello world”, FontFactory.getFont(
FontFactory.COURIER, 20, Font.ITALIC, new BaseColor(
255, 0, 0)));
document.add(chunk);
// ##################### Chunk : End #####################

// ##################### Anchor : Start #####################
Anchor anchor = new Anchor(“\nGoogle\n”);
anchor.setName(“Google”);
anchor.setReference(“http://www.google.com&#8221;);

document.add(anchor);
// ##################### Anchor : End #####################

// ##################### Image : Start #####################
Image image = Image.getInstance(“Photo.JPG”);
image.scaleAbsolute(100, 100);
document.add(image);
// ##################### Image : End #####################

// ##################### Table : Start #####################
PdfPTable table = createTable1();
table.setSpacingBefore(5);
table.setSpacingAfter(5);
document.add(table);

// ##################### Table : End #####################

System.out.println(“File Created…”);
} catch (DocumentException de) {
System.err.println(de.getMessage());
}
document.close();
} catch (Throwable t) {
t.printStackTrace();
}
}

/** The resulting PDF file. */
public static final String RESULT = “text.pdf”;

/**
* Creates a table; widths are set with setWidths().
*
* @return a PdfPTable
* @throws DocumentException
*/
public static PdfPTable createTable1() throws DocumentException {
PdfPTable table = new PdfPTable(3);
table.setWidthPercentage(288 / 5.23f);
table.setWidths(new int[] { 2, 1, 1 });
PdfPCell cell;
cell = new PdfPCell(new Phrase(“Table 1”));
cell.setColspan(3);
table.addCell(cell);
cell = new PdfPCell(new Phrase(“Cell with rowspan 2”));
cell.setRowspan(2);
table.addCell(cell);
table.addCell(“row 1; cell 1”);
table.addCell(“row 1; cell 2”);
table.addCell(“row 2; cell 1”);
table.addCell(“row 2; cell 2”);
return table;
}

/**
* Creates a table; widths are set with setWidths().
*
* @return a PdfPTable
* @throws DocumentException
*/
public static PdfPTable createTable2() throws DocumentException {
PdfPTable table = new PdfPTable(3);
table.setTotalWidth(288);
table.setLockedWidth(true);
table.setWidths(new float[] { 2, 1, 1 });
PdfPCell cell;
cell = new PdfPCell(new Phrase(“Table 2”));
cell.setColspan(3);
table.addCell(cell);
cell = new PdfPCell(new Phrase(“Cell with rowspan 2”));
cell.setRowspan(2);
table.addCell(cell);
table.addCell(“row 1; cell 1”);
table.addCell(“row 1; cell 2”);
table.addCell(“row 2; cell 1”);
table.addCell(“row 2; cell 2”);
return table;
}

/**
* Creates a table; widths are set in the constructor.
*
* @return a PdfPTable
* @throws DocumentException
*/
public static PdfPTable createTable3() throws DocumentException {
PdfPTable table = new PdfPTable(new float[] { 2, 1, 1 });
table.setWidthPercentage(55.067f);
PdfPCell cell;
cell = new PdfPCell(new Phrase(“Table 3”));
cell.setColspan(3);
table.addCell(cell);
cell = new PdfPCell(new Phrase(“Cell with rowspan 2”));
cell.setRowspan(2);
table.addCell(cell);
table.addCell(“row 1; cell 1”);
table.addCell(“row 1; cell 2”);
table.addCell(“row 2; cell 1”);
table.addCell(“row 2; cell 2”);
return table;
}

/**
* Creates a table; widths are set with special setWidthPercentage() method.
*
* @return a PdfPTable
* @throws DocumentException
*/
public static PdfPTable createTable4() throws DocumentException {
PdfPTable table = new PdfPTable(3);
Rectangle rect = new Rectangle(523, 770);
table.setWidthPercentage(new float[] { 144, 72, 72 }, rect);
PdfPCell cell;
cell = new PdfPCell(new Phrase(“Table 4”));
cell.setColspan(3);
table.addCell(cell);
cell = new PdfPCell(new Phrase(“Cell with rowspan 2”));
cell.setRowspan(2);
table.addCell(cell);
table.addCell(“row 1; cell 1”);
table.addCell(“row 1; cell 2”);
table.addCell(“row 2; cell 1”);
table.addCell(“row 2; cell 2”);
return table;
}

/**
* Creates a table; widths are set with setTotalWidth().
*
* @return a PdfPTable
* @throws DocumentException
*/
public static PdfPTable createTable5() throws DocumentException {
PdfPTable table = new PdfPTable(3);
table.setTotalWidth(new float[] { 144, 72, 72 });
table.setLockedWidth(true);
PdfPCell cell;
cell = new PdfPCell(new Phrase(“Table 5”));
cell.setColspan(3);
table.addCell(cell);
cell = new PdfPCell(new Phrase(“Cell with rowspan 2”));
cell.setRowspan(2);
table.addCell(cell);
table.addCell(“row 1; cell 1”);
table.addCell(“row 1; cell 2”);
table.addCell(“row 2; cell 1”);
table.addCell(“row 2; cell 2”);
return table;
}

}

Posted in Core Java | Tagged: , , , , , , , | 1 Comment »

Pure JDBC Connection for Oracle Database in Core JAVA using Service name & SID

Posted by Pankil Patel on June 22, 2012

Required JAR: classes12.jar

Pure JDBC Connection for Oracle Database in Core JAVA using :  Service name :

Connection con = null;
Class.forName(“oracle.jdbc.driver.OracleDriver”);
con = DriverManager.getConnection(
“jdbc:oracle:thin:@Hostname:Port/Service name”,
“username”, “password”);

Statement s = con.createStatement();

Pure JDBC Connection for Oracle Database in Core JAVA using :  SID :

Connection con = null;
Class.forName(“oracle.jdbc.driver.OracleDriver”);
con = DriverManager.getConnection(
“jdbc:oracle:thin:@Hostname:Port:SID”,
“username”, “password”);

Statement s = con.createStatement();

Posted in Core Java, Oracle | Tagged: , , , , , | Leave a Comment »

Export to .xls using Core JAVA

Posted by Pankil Patel on June 22, 2012

Required JAR: jxl-2.6.12.jar

File: XlsCreator.java

package co.cc.enlightensoft.xls;

import java.io.File;
import java.io.IOException;
import java.util.Locale;

import jxl.Workbook;
import jxl.WorkbookSettings;
import jxl.format.Border;
import jxl.format.BorderLineStyle;
import jxl.format.Colour;
import jxl.write.Formula;
import jxl.write.Label;
import jxl.write.Number;
import jxl.write.WritableCellFormat;
import jxl.write.WritableFont;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
import jxl.write.biff.RowsExceededException;

public class XlsCreator {
private static WritableSheet s;
private static WritableCellFormat cf;
private static WritableCellFormat cfd;
private static File file;
public static int NUMBER_OF_TIME_QUERY_EXICUTION = 2;

public static WritableWorkbook createFile() throws IOException,
WriteException {
String filename = “QueryResponceTime.xls”;
WorkbookSettings ws = new WorkbookSettings();
ws.setLocale(new Locale(“en”, “EN”));
XlsCreator.file = new File(filename);
WritableWorkbook workbook = Workbook
.createWorkbook(XlsCreator.file, ws);
XlsCreator.s = workbook.createSheet(“Sheet1”, 0);
// XlsCreator.summary = workbook.createSheet(“Output”, 1);

/* Format the Font */
WritableFont wf = new WritableFont(WritableFont.ARIAL, 12,
WritableFont.BOLD);
WritableFont wfd = new WritableFont(WritableFont.ARIAL, 10,
WritableFont.NO_BOLD);

XlsCreator.cf = new WritableCellFormat(wf);
XlsCreator.cfd = new WritableCellFormat(wfd);

XlsCreator.cf.setWrap(true);
XlsCreator.cfd.setWrap(false);
XlsCreator.cf.setBackground(Colour.AQUA);
XlsCreator.cf.setBorder(Border.ALL, BorderLineStyle.THICK);
XlsCreator.cfd.setBorder(Border.ALL, BorderLineStyle.MEDIUM);

XlsCreator.s.setColumnView(0, 30);
XlsCreator.s.setColumnView(1, 30);
XlsCreator.s.setColumnView(2, 30);

createHeader();
return workbook;
}

public static void closeFile(WritableWorkbook workbook) throws IOException,
WriteException {
workbook.write();
workbook.close();
}

public static void createHeader() throws RowsExceededException,
WriteException {
/* Creates Label and writes date to one cell of sheet */
Label oid = new Label(0, 0, “OID”, XlsCreator.cf);
Label totalTime = new Label(1, 0, “Total Time (Milli Second)”,
XlsCreator.cf);
Label queryTime = new Label(2, 0, “Query Time (Milli Second)”,
XlsCreator.cf);
XlsCreator.s.addCell(oid);
XlsCreator.s.addCell(totalTime);
XlsCreator.s.addCell(queryTime);
}

public static void addRow(long oid, long totalTime, long queryTime,
int index) throws RowsExceededException, WriteException {
Number c1_data = new Number(0, index, oid, cfd);
Number c2_data = new Number(1, index, totalTime, cfd);
Number c3_data = new Number(2, index, queryTime, cfd);
XlsCreator.s.addCell(c1_data);
XlsCreator.s.addCell(c2_data);
XlsCreator.s.addCell(c3_data);
}

public static void main(String[] args) throws WriteException, IOException {
WritableWorkbook wb = XlsCreator.createFile();
addRow(123, 456, 001, 1);
addRow(52468, 123, 010, 2);
addSummary(3);
XlsCreator.closeFile(wb);
System.out.println(“.xls file is created… \n Location: ”
+ XlsCreator.file.getAbsoluteFile());
}

public static void addSummary(int index) throws RowsExceededException,
WriteException {
String avg = “AVERAGE”;
String avgTotalTime = “AVERAGE(B2:B”
+ (NUMBER_OF_TIME_QUERY_EXICUTION + 1) + “)”;
String avgQueryTime = “AVERAGE(C2:C”
+ (NUMBER_OF_TIME_QUERY_EXICUTION + 1) + “)”;

// Create label for average
Label formulaLabel = new Label(0, index, avg, cf);
XlsCreator.s.addCell(formulaLabel);

// Create a formula for average
Formula formulaAvgTotalTime = new Formula(1, index, avgTotalTime, cf);
XlsCreator.s.addCell(formulaAvgTotalTime);

// Create a formula for average
Formula formulaAvgQueryTime = new Formula(2, index, avgQueryTime, cf);
XlsCreator.s.addCell(formulaAvgQueryTime);

String min = “MIN”;
String minTotalTime = “MIN(B2:B” + (NUMBER_OF_TIME_QUERY_EXICUTION + 1)
+ “)”;
String minQueryTime = “MIN(C2:C” + (NUMBER_OF_TIME_QUERY_EXICUTION + 1)
+ “)”;

// Create label for average
Label minLabel = new Label(0, index + 1, min, cf);
XlsCreator.s.addCell(minLabel);

// Create a formula for average
Formula formulaMinTotalTime = new Formula(1, index + 1, minTotalTime,
cf);
XlsCreator.s.addCell(formulaMinTotalTime);

// Create a formula for average
Formula formulaMinQueryTime = new Formula(2, index + 1, minQueryTime,
cf);
XlsCreator.s.addCell(formulaMinQueryTime);

String max = “MAX”;
String maxTotalTime = “MAX(B2:B” + (NUMBER_OF_TIME_QUERY_EXICUTION + 1)
+ “)”;
String maxQueryTime = “MAX(C2:C” + (NUMBER_OF_TIME_QUERY_EXICUTION + 1)
+ “)”;

// Create label for average
Label maxLabel = new Label(0, index + 2, max, cf);
XlsCreator.s.addCell(maxLabel);

// Create a formula for average
Formula formulaMaxTotalTime = new Formula(1, index + 2, maxTotalTime,
cf);
XlsCreator.s.addCell(formulaMaxTotalTime);

// Create a formula for average
Formula formulaMaxQueryTime = new Formula(2, index + 2, maxQueryTime,
cf);
XlsCreator.s.addCell(formulaMaxQueryTime);

}
}

Posted in Core Java | Tagged: , , , , , , , , , | Leave a Comment »

How to Use Hibernate Annotation & .hbm.xml files at single time on a Same project?

Posted by Pankil Patel on June 11, 2012

Use sessionFactory as org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean in its configuration file instead of org.springframework.orm.hibernate3.LocalSessionFactoryBean

Sample configuration is as below:

<bean id=”sessionFactory”
class=”org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean”>
<property name=”annotatedClasses“>
<list>
<value>co.cc.enlightensoft.model.businessobject.Product</value>
</list>
</property>
<property name=”mappingResources“>
<list>
<value>co/cc/enlightensoft/model/businessobject/Category.hbm.xml</value>
<value>co/cc/enlightensoft/model/businessobject/User.hbm.xml</value>
</list>
</property>

<property name=”hibernateProperties”>
<props>
<prop key=”hibernate.dialect”>org.hibernate.dialect.MySQLDialect</prop>
<prop key=”hibernate.show_sql”>true</prop>
<prop key=”hibernate.cglib.use_reflection_optimizer”>true</prop>
<prop key=”hibernate.cache.provider_class”>org.hibernate.cache.HashtableCacheProvider</prop>
</props>
</property>

<property name=”dataSource”>
<ref bean=”dataSource” />
</property>

</bean>

Posted in Hibernate, Spring | Tagged: , , , , , , , , , | Leave a Comment »