Sorry, i mean DB stuff, not BD (in spanish Base de Datos, in english DataBase).
In that example, he pass several DB arguments:
Quote:
hibernate.connection.driver_class = org.postgresql.Driver
hibernate.connection.url = jdbc:
postgresql://localhost/mydatabasehibernate.connection.username = myuser
hibernate.connection.password = secret
hibernate.c3p0.min_size=5
hibernate.c3p0.max_size=20
hibernate.c3p0.timeout=1800
hibernate.c3p0.max_statements=50
And my big problem is that i don't know any of them before the execution. The connection is given from other source, and i don't have either url or user/password. The only thing i have is a Connection object.
So, my main procedure, has in the first line:
Quote:
hibernate.connection.driver_class = org.postgresql.Driver
hibernate.connection.url = jdbc:
postgresql://localhost/mydatabasehibernate.connection.username = myuser
hibernate.connection.password = secret
hibernate.c3p0.min_size=5
hibernate.c3p0.max_size=20
hibernate.c3p0.timeout=1800
hibernate.c3p0.max_statements=50
and, in order to doing tests, i have commented the rest of the actions, but hibernate is still trying to connect to the database:
Quote:
20-ene-2011 13:17:01 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
GRAVE: could not complete schema update
java.lang.UnsupportedOperationException: The user must supply a JDBC connection
at org.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:30)
at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:27)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:127)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:296)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
at com.nerviaconsultores.hibernate.ConsultaPrueba.main(ConsultaPrueba.java:34)
oracle.jdbc.driver.T4CConnection
What i really need, is that the hibernate initialization actions, don't get executed until i tell him... it's that posible?
Thanx again, and sorry about all of this...
Regards