[jboss-user] [JBoss Seam] - cfg EntityManager with EntityConvert
wuyunlong
do-not-reply at jboss.com
Thu Apr 12 03:59:35 EDT 2007
my cfg:
[jboss-beans.xml] cfg
<?xml version="1.0" encoding="UTF-8"?>
|
| <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
| xmlns="urn:jboss:bean-deployer:2.0">
|
|
| <bean name="amethystDatasourceBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource">
| <property name="driverClass">oracle.jdbc.driver.OracleDriver</property>
| <property name="connectionURL">jdbc:oracle:thin:@192.168.0.34:1521:XE</property>
| <property name="userName">amethyst</property>
| <property name="password">123456</property>
| <property name="jndiName">java:/amethystDatasource</property>
| <property name="minSize">0</property>
| <property name="maxSize">10</property>
| <property name="blockingTimeout">1000</property>
| <property name="idleTimeout">100000</property>
| <property name="transactionManager"><inject bean="TransactionManager"/></property>
| <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property>
| <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
| </bean>
|
| <bean name="amethystDatasource" class="java.lang.Object">
| <constructor factoryMethod="getDatasource">
| <factory bean="amethystDatasourceBootstrap"/>
| </constructor>
| </bean>
|
| </deployment>
[persistence.xml]
<?xml version="1.0" encoding="UTF-8"?>
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
| version="1.0">
| <persistence-unit name="amethystDatabase">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/amethystDatasource</jta-data-source>
| <class>com.moka.amethyst.user.User</class>
| <class>com.moka.amethyst.user.Role</class>
| <class>com.moka.amethyst.node.Node</class>
| <exclude-unlisted-classes>true</exclude-unlisted-classes>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.show_sql" value="true"/>
| <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
| <!-- These are the default for JBoss EJB3, but not for HEM: -->
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
| </properties>
| </persistence-unit>
| </persistence>
when this app run in tomcat
How to cfg 'entityManager' if I use entityConvert in component.xml
my component.xml now is :
<?xml version="1.0" encoding="UTF-8"?>
| <components xmlns="http://jboss.com/products/seam/components"
| xmlns:core="http://jboss.com/products/seam/core"
| xmlns:security="http://jboss.com/products/seam/security"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd
| http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.2.xsd
| http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd">
|
| <core:init jndi-pattern="#{ejbName}/local" debug="true" />
|
| <core:manager conversation-timeout="120000"
| concurrent-request-timeout="500" conversation-id-parameter="cid"
| conversation-is-long-running-parameter="clr" />
|
| <core:transactionListener />
|
| <core:ejb installed="true" />
|
| <security:identity authenticate-method="#{userLogin.tryLogin}" />
|
| <core:entity-manager-factory name="entityManager" persistence-unit-name="java:/amethystDatabase"/>
|
| </components>
|
but it cannot run!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036630#4036630
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036630
More information about the jboss-user
mailing list