This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!

sivakondalu dokku

Greenhorn
+ Follow
since Jan 17, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sivakondalu dokku

Welcome Coderanch


please suggest me, how to insert objects into LinkedList and Find middle element ?









ThankQ
9 years ago
welcome to javaranh


please some one explain in which scenario we can use string and stringbuilder.






Thanks and regards
sivakondalu
9 years ago
Welcome to coderanch

I have problem in orm module .that is i want to insert data into oracle database. the following is the code while executing the code orm sending query but it not update in database..


package info.inetsolv;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.orm.hibernate3.HibernateTemplate;

public class InsertRecord {


public static void main(String[] args) {
ApplicationContext container = new ClassPathXmlApplicationContext("applicationContext.xml");
HibernateTemplate ht = (HibernateTemplate)container.getBean("ht");

Product p = new Product();

p.setPid(10);
p.setName("ten");
p.setPrice(1.0);

ht.save(p);


}

}




this is my configuration file in spring


<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">


<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver">
</property>
<property name="url"
value="jdbc:oracle:thin:@localhost:1521:xe">
</property>
<property name="username" value="spring"></property>
<property name="password" value="spring"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="file:src/hibernate.cfg.xml">
</property>
</bean>
<bean id="ht"
class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
</beans>

Thanks and Regards
sivakondalu
I would like to know , how to use connection pool mechanisum in java while connect to data base.