Cool !
I guess you could also add the system property
*openejb.configuration=/your/tomee.xml
file*


*JLouis*


2013/11/29 softvijay <[email protected]>

> Hi,
>
> Thanks a ton, by including openejb.xml in my project it is working as
> expected.
> details as follows:
>
> (1) /src/conf/openejb.xml
> <openejb>
> <Resource id="Default JDBC Database" type="DataSource">
>     JdbcDriver  com.mysql.jdbc.Driver
>     JdbcUrl jdbc:mysql://localhost:3306/student
>     UserName root
>     Password
>     JtaManaged true
> </Resource>
> </openejb>
>
> *OUTPUT*
> ------------------------
> INFO:
>
> ********************************************************************************
> 29-Nov-2013 12:48:23 org.apache.openejb.OpenEJB$Instance <init>
> INFO: openejb.home = C:\vijay\vj\workspace\education
> 29-Nov-2013 12:48:23 org.apache.openejb.OpenEJB$Instance <init>
> INFO: openejb.base = C:\vijay\vj\workspace\education
> 29-Nov-2013 12:48:23 org.apache.openejb.cdi.CdiBuilder initializeOWB
> INFO: Created new singletonService
> org.apache.openejb.cdi.ThreadSingletonServiceImpl@12f0999
> 29-Nov-2013 12:48:23 org.apache.openejb.cdi.CdiBuilder initializeOWB
> INFO: Succeeded in installing singleton service
> 29-Nov-2013 12:48:23 org.apache.openejb.config.ConfigurationFactory init
> INFO: openejb configuration file is
> 'C:\vijay\vj\workspace\education\conf\openejb.xml'
> 29-Nov-2013 12:48:23 org.apache.openejb.config.ConfigurationFactory
> configureService
> INFO: Configuring Service(id=Default Security Service,
> type=SecurityService,
> provider-id=Default Security Service)
> 29-Nov-2013 12:48:23 org.apache.openejb.config.ConfigurationFactory
> configureService
> INFO: Configuring Service(id=Default Transaction Manager,
> type=TransactionManager, provider-id=Default Transaction Manager)
> 29-Nov-2013 12:48:23 org.apache.openejb.config.ConfigurationFactory
> configureService
> INFO: Configuring Service(id=Default JDBC Database, type=Resource,
> provider-id=Default JDBC Database)
> 29-Nov-2013 12:48:23 org.apache.openejb.config.DeploymentsResolver
> processUrls
> INFO: Found EjbModule in classpath:
> c:\vijay\vj\workspace\education\build\classes
> 29-Nov-2013 12:48:25 org.apache.openejb.config.DeploymentsResolver
> loadFromClasspath
> INFO: Searched 13 classpath urls in 1577 milliseconds.  Average 121
> milliseconds per url.
> 29-Nov-2013 12:48:25 org.apache.openejb.config.ConfigurationFactory
> loadApplication
> INFO: Beginning load: c:\vijay\vj\workspace\education\build\classes
> 29-Nov-2013 12:48:25 org.apache.openejb.config.ConfigurationFactory
> configureApplication
> INFO: Configuring enterprise application:
> C:\vijay\vj\workspace\education\classpath.ear
> 29-Nov-2013 12:48:25 org.apache.openejb.config.InitEjbDeployments deploy
> INFO: Auto-deploying ejb ManageStudentDao:
> EjbDeployment(deployment-id=ManageStudentDao)
> 29-Nov-2013 12:48:25 org.apache.openejb.config.ConfigurationFactory
> configureService
> INFO: Configuring Service(id=Default Stateless Container, type=Container,
> provider-id=Default Stateless Container)
> 29-Nov-2013 12:48:25 org.apache.openejb.config.AutoConfig createContainer
> INFO: Auto-creating a container for bean ManageStudentDao:
> Container(type=STATELESS, id=Default Stateless Container)
> 29-Nov-2013 12:48:25 org.apache.openejb.config.AutoConfig deploy
> INFO: Configuring PersistenceUnit(name=education_pu,
> provider=org.hibernate.ejb.HibernatePersistence)
> 29-Nov-2013 12:48:25 org.apache.openejb.config.AutoConfig
> logAutoCreateResource
> INFO: Auto-creating a Resource with id 'Default JDBC DatabaseNonJta' of
> type
> 'DataSource for 'education_pu'.
> 29-Nov-2013 12:48:25 org.apache.openejb.config.AutoConfig deploy
> INFO: Configuring Service(id=Default JDBC DatabaseNonJta, type=Resource,
> provider-id=Default JDBC Database)
> 29-Nov-2013 12:48:25 org.apache.openejb.config.AutoConfig
> setNonJtaDataSource
> INFO: Adjusting PersistenceUnit education_pu <non-jta-data-source> to
> Resource ID 'Default JDBC DatabaseNonJta' from 'null'
> 29-Nov-2013 12:48:25 org.apache.openejb.config.AppInfoBuilder build
> INFO: Enterprise application
> "C:\vijay\vj\workspace\education\classpath.ear"
> loaded.
> 29-Nov-2013 12:48:25 org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating TransactionManager(id=Default Transaction Manager)
> 29-Nov-2013 12:48:25 org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating SecurityService(id=Default Security Service)
> 29-Nov-2013 12:48:25 org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating Resource(id=Default JDBC Database)
> 29-Nov-2013 12:48:26 org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating Resource(id=Default JDBC DatabaseNonJta)
> 29-Nov-2013 12:48:26 org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating Container(id=Default Stateless Container)
> 29-Nov-2013 12:48:26 org.apache.openejb.assembler.classic.Assembler
> createApplication
> INFO: Assembling app: C:\vijay\vj\workspace\education\classpath.ear
> 29-Nov-2013 12:48:26 org.hibernate.annotations.common.Version <clinit>
> INFO: Hibernate Commons Annotations 3.2.0.Final
> 29-Nov-2013 12:48:26 org.hibernate.cfg.Environment <clinit>
> INFO: Hibernate 3.6.0.Final
> 29-Nov-2013 12:48:26 org.hibernate.cfg.Environment <clinit>
> INFO: hibernate.properties not found
> 29-Nov-2013 12:48:26 org.hibernate.cfg.Environment buildBytecodeProvider
> INFO: Bytecode provider name : javassist
> 29-Nov-2013 12:48:26 org.hibernate.cfg.Environment <clinit>
> INFO: using JDK 1.4 java.sql.Timestamp handling
> 29-Nov-2013 12:48:26 org.hibernate.ejb.Version <clinit>
> INFO: Hibernate EntityManager 3.6.0.Final
> 29-Nov-2013 12:48:26 org.hibernate.ejb.Ejb3Configuration configure
> INFO: Processing PersistenceUnitInfo [
>         name: education_pu
>         ...]
> 29-Nov-2013 12:48:26 org.hibernate.cfg.AnnotationBinder bindClass
> INFO: Binding entity from annotated class: model.StudentDao
> 29-Nov-2013 12:48:26 org.hibernate.cfg.annotations.EntityBinder bindTable
> INFO: Bind entity model.StudentDao on table studentdao
> 29-Nov-2013 12:48:26 org.hibernate.cfg.Configuration
> applyHibernateValidatorLegacyConstraintsOnDDL
> INFO: Hibernate Validator not found: ignoring
> 29-Nov-2013 12:48:26
> org.hibernate.cfg.search.HibernateSearchEventListenerRegister
> enableHibernateSearch
> INFO: Unable to find org.hibernate.search.event.FullTextIndexEventListener
> on the classpath. Hibernate Search is not enabled.
> 29-Nov-2013 12:48:26 org.hibernate.connection.ConnectionProviderFactory
> initializeConnectionProviderFromConfig
> INFO: Initializing connection provider:
> org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
> 29-Nov-2013 12:48:26
> org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider configure
> INFO: Using provided datasource
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Database ->
>        name : MySQL
>     version : 5.1.49-community
>       major : 5
>       minor : 1
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Driver ->
>        name : MySQL-AB JDBC Driver
>     version : mysql-connector-java-5.1.12 ( Revision: ${bzr.revision-id} )
>       major : 5
>       minor : 1
> 29-Nov-2013 12:48:26 org.hibernate.dialect.Dialect <init>
> INFO: Using dialect: org.hibernate.dialect.MySQL5Dialect
> 29-Nov-2013 12:48:26 org.hibernate.engine.jdbc.JdbcSupportLoader
> useContextualLobCreation
> INFO: Disabling contextual LOB creation as JDBC driver reported JDBC
> version
> [3] less than 4
> 29-Nov-2013 12:48:26 org.hibernate.transaction.TransactionFactoryFactory
> buildTransactionFactory
> INFO: Transaction strategy:
> org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
> 29-Nov-2013 12:48:26
> org.hibernate.transaction.TransactionManagerLookupFactory
> getTransactionManagerLookup
> INFO: instantiating TransactionManagerLookup:
> org.apache.openejb.hibernate.TransactionManagerLookup
> 29-Nov-2013 12:48:26
> org.hibernate.transaction.TransactionManagerLookupFactory
> getTransactionManagerLookup
> INFO: instantiated TransactionManagerLookup
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Automatic flush during beforeCompletion(): disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Automatic session close at end of transaction: disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: JDBC batch size: 15
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: JDBC batch updates for versioned data: disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Scrollable result sets: enabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: JDBC3 getGeneratedKeys(): enabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Connection release mode: auto
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Maximum outer join fetch depth: 2
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Default batch fetch size: 1
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Generate SQL with comments: enabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Order SQL updates by primary key: disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Order SQL inserts for batching: disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory
> createQueryTranslatorFactory
> INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
> 29-Nov-2013 12:48:26 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
> INFO: Using ASTQueryTranslatorFactory
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Query language substitutions: {}
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: JPA-QL strict compliance: enabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Second-level cache: enabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Query cache: disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory createRegionFactory
> INFO: Cache region factory :
> org.hibernate.cache.impl.NoCachingRegionFactory
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Optimize cache for minimal puts: disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Structured second-level cache entries: disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Echoing all SQL to stdout
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Statistics: disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Deleted entity synthetic identifier rollback: disabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Default entity-mode: pojo
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Named query checking : enabled
> 29-Nov-2013 12:48:26 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: Check Nullability in Core (should be disabled when Bean Validation is
> on): disabled
> 29-Nov-2013 12:48:26 org.hibernate.impl.SessionFactoryImpl <init>
> INFO: building session factory
> 29-Nov-2013 12:48:27 org.hibernate.impl.SessionFactoryObjectFactory
> addInstance
> INFO: Not binding factory to JNDI, no JNDI name configured
> 29-Nov-2013 12:48:27
> org.apache.openejb.assembler.classic.PersistenceBuilder
> createEntityManagerFactory
> INFO: PersistenceUnit(name=education_pu,
> provider=org.hibernate.ejb.HibernatePersistence) - provider time 910ms
> 29-Nov-2013 12:48:27 org.apache.openejb.assembler.classic.JndiBuilder bind
> INFO: Jndi(name=ManageStudentDaoLocal) -->
> Ejb(deployment-id=ManageStudentDao)
> 29-Nov-2013 12:48:27 org.apache.openejb.assembler.classic.JndiBuilder bind
> INFO:
>
> Jndi(name=global/classpath.ear/education/ManageStudentDao!model.ManageStudentDaoLocal)
> --> Ejb(deployment-id=ManageStudentDao)
> 29-Nov-2013 12:48:27 org.apache.openejb.assembler.classic.JndiBuilder bind
> INFO: Jndi(name=global/classpath.ear/education/ManageStudentDao) -->
> Ejb(deployment-id=ManageStudentDao)
> 29-Nov-2013 12:48:27 org.apache.openejb.cdi.CdiBuilder initSingleton
> INFO: Existing thread singleton service in SystemInstance()
> org.apache.openejb.cdi.ThreadSingletonServiceImpl@12f0999
> 29-Nov-2013 12:48:27 org.apache.openejb.cdi.OpenEJBLifecycle
> startApplication
> INFO: OpenWebBeans Container is starting...
> 29-Nov-2013 12:48:27 org.apache.webbeans.plugins.PluginLoader startUp
> INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
> 29-Nov-2013 12:48:27 org.apache.webbeans.plugins.PluginLoader startUp
> INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
> 29-Nov-2013 12:48:27 org.apache.openejb.cdi.BeansDeployer
> validateInjectionPoints
> INFO: All injection points are validated successfully.
> 29-Nov-2013 12:48:27 org.apache.openejb.cdi.OpenEJBLifecycle
> startApplication
> INFO: OpenWebBeans Container has started, it took 78 ms.
> 29-Nov-2013 12:48:27 org.apache.openejb.assembler.classic.Assembler
> createApplication
> INFO: Created Ejb(deployment-id=ManageStudentDao,
> ejb-name=ManageStudentDao,
> container=Default Stateless Container)
> 29-Nov-2013 12:48:27 org.apache.openejb.assembler.classic.Assembler
> createApplication
> INFO: Started Ejb(deployment-id=ManageStudentDao,
> ejb-name=ManageStudentDao,
> container=Default Stateless Container)
> 29-Nov-2013 12:48:27 org.apache.openejb.assembler.classic.Assembler
> createApplication
> INFO: Deployed
> Application(path=C:\vijay\vj\workspace\education\classpath.ear)
> Hibernate:
>     /*
> from
>     StudentDao */ select
>         studentdao0_.stud_id as stud1_0_,
>         studentdao0_.stud_name as stud2_0_
>     from
>         studentdao studentdao0_
> 1
> vijay
> 2
> alka
> 3
> anubhav
> 4
> raghav
> -------------------------
>
>
> I am really grateful for quick clue, thanks guys.
>
> Regards
> Vijay
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TOMEE-1-6-injects-HSQL-DB-Inspite-of-providing-MYSQL-SB-tp4666442p4666458.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>



-- 
Jean-Louis

Reply via email to