Hello Everyone,
I am using Hibernate 3.0, jdk 1.5,MySQL and Jrun
I wanted to know whether we can store/retrieve update data without using the following piece of code in hibernate
session.beginTransaction();
I am attaching the hibernate.cfg.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">
jdbc:mysql://localhost:3306/oasysDB</property>
<property name="connection.username">root</property>
<property name="connection.password">root</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">
thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!--Enabling Autocommit -->
<property name="connection.autocommit">true</property>
<property name="transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.JRun4TransactionManagerLookup</property>
<property name="hibernate.transaction.flush_before_completion">true</property>
<property name="hibernate.transaction.auto_close_session">true</property>
<property name="hibernate.connection.release_mode">after_transaction</property>
<!-- Drop and re-create the database schema on startup
<property name="hbm2ddl.auto">create</property>-->
<mapping resource="hibernateconfigurations/reportColumns.hbm.xml"/>
<mapping resource="hibernateconfigurations/UserRepColsLink.hbm.xml"/>
<mapping resource="hibernateconfigurations/reportDetails.hbm.xml"/>
<mapping resource="hibernateconfigurations/userPreferences.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Thanks in advance