Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Jun 29, 2009 6:12:37 PM org.hibernate.cfg.annotations.Version <clinit>
- INFO: Hibernate Annotations 3.3.0.GA
- Jun 29, 2009 6:12:37 PM org.hibernate.ejb.Version <clinit>
- INFO: Hibernate EntityManager 3.3.0.GA
- Jun 29, 2009 6:12:37 PM org.hibernate.ejb.Ejb3Configuration configure
- INFO: Could not find any META-INF/persistence.xml file in the classpath
- package com.activator;
- public class PersistenceActivator implements BundleActivator {
- @Override
- public void start(BundleContext arg0) throws Exception {
- EntityManagerFactory emf = Persistence
- .createEntityManagerFactory("postgres");
- EntityManager em = emf.createEntityManager();
- SimpleDaoImpl dao = new SimpleDaoImpl();
- dao.setEntityManager(em);
- }
- @Override
- public void stop(BundleContext arg0) throws Exception {
- // TODO Auto-generated method stub
- }
- }
- Manifest-Version: 1.0
- Bundle-ManifestVersion: 2
- Bundle-Name: Dao Plug-in
- Bundle-SymbolicName: Dao
- Bundle-Version: 1.0.0
- Bundle-RequiredExecutionEnvironment: JavaSE-1.6
- Import-Package: org.osgi.framework;version="1.4.0"
- Bundle-Activator: com.activator.PersistenceActivator
- Export-Package: com.dao.service
- Require-Bundle: HibernateBundle;bundle-version="1.0.0"
- <?xml version="1.0" encoding="UTF-8"?>
- <persistence>
- <!-- Sample persistence using PostgreSQL. See postgres.txt. -->
- <persistence-unit name="postgres" transaction-type="RESOURCE_LOCAL">
- <properties>
- <property name="hibernate.archive.autodetection" value="class" />
- <!--
- Comment out if schema exists & you don't want the tables dropped.
- -->
- <property name="hibernate.hbm2ddl.auto" value="create-drop" /> <!-- drop/create tables @startup, drop tables @shutdown -->
- <!-- Database Connection Settings -->
- <property name="hibernate.connection.autocommit">true</property>
- <property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
- <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
- <property name="hibernate.connection.username" value="postgres" />
- <property name="hibernate.connection.password" value="postgres" />
- <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/test" />
- <!-- Not sure about these... -->
- <property name="hibernate.max_fetch_depth">16</property>
- <property name="hibernate.jdbc.batch_size">1000</property>
- <property name="hibernate.use_outer_join">true</property>
- <property name="hibernate.default_batch_fetch_size">500</property>
- <!-- Hibernate Query Language (HQL) parser. -->
- <property name="hibernate.query.factory_class">
- org.hibernate.hql.ast.ASTQueryTranslatorFactory</property>
- <!-- Echo all executed SQL to stdout -->
- <property name="hibernate.show_sql">true</property>
- <property name="hibernate.format_sql">false</property>
- <!-- Use c3p0 for the JDBC connection pool -->
- <property name="hibernate.c3p0.min_size">3</property>
- <property name="hibernate.c3p0.max_size">100</property>
- <property name="hibernate.c3p0.max_statements">100</property>
- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />
- </properties>
- </persistence-unit>
- </persistence>
Add Comment
Please, Sign In to add comment