����Linux��
Linux����

ͨ��JDBC����Oracle�Ĵ洢����

����ʱ��:2006-08-21 10:24:45��Դ:��������:fengmayi1
[code]public void initReport(File xmlFile, File confFile, File logPrc, File reportPrc, Date runDate) throws InstallException
{
Document bossDoc = converHibernateConfig(xmlFile, confFile);;

String strLogPrc = readFile(logPrc);
String strReportPrc = readFile(reportPrc);

HibernateConfig config = new HibernateConfig();
Session session;
try
{
config.configure(bossDoc);
SessionFactory sessionFactory = config.buildSessionFactory();
session = sessionFactory.openSession();
}catch(Exception exp){
throw new InstallException(exp.getMessage());
}

Transaction tran = null;
try
{
tran = session.beginTransaction();

writeLog("����WriteLog�洢����");
session.connection().createStatement().execute(strLogPrc);
//writeLog("����洢����");
//session.connection().createStatement().execute("compile;");
writeLog("����dialy_report_proc�洢����");
session.connection().createStatement().execute(strReportPrc);
//writeLog("����洢����");
//session.connection().createStatement().execute("compile");
tran.commit();
writeLog("�������ݳ�ʼ���ɹ�");
}catch(HibernateException exp){
try
{
tran.rollback();
}catch(HibernateException exp1){
throw new InstallException(exp1.getMessage());
}
throw new InstallException(exp.getMessage());
}catch(SQLException exp){
try
{
tran.rollback();
}catch(HibernateException exp1){
throw new InstallException(exp1.getMessage());
}
throw new InstallException(exp.getMessage());
}finally{
try
{
session.close();
}catch(HibernateException exp){
throw new InstallException(exp.getMessage());
}
}
}[/code]

���⣺��Ҫ���洢���̵��ļ�����ΪUnix��ʽ��������ʹ�á�
��������

���� 0 ������