Thank you very much indeed for your useful links and comments.
but I still have problem and I think easily will resolve
my application war file structure is the same has been told in that document.
but I have problem connection database, here is my persistence.xml and
jboss-beans.xml files:
persistence.xml
|
|
| org.hibernate.ejb.HibernatePersistence
| testDatasource
|
|
|
|
|
|
|
|
|
|
|
|
and jboss-beans.xml:
|
|
| http://www.w3.org/2001/XMLSchema-instance";
| xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
| xmlns="urn:jboss:bean-deployer">
|
|
| com.mysql.jdbc.Driver
|
|
jdbc:mysql://localhost:3306/seamtest?autoReconnect=true&
| useUnicode=true&characterEncoding=UTF8
|
| root
| root
| java:/testDatasource
| 0
| 10
| 1000
| 10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while Tomcat stating up when it's going to stating embedded Ejb an exception
throws with following message, I have doubt in in jboss-beans.xml file. I dont
know what it is.
| (core.Ejb94 ) starting the embedded EJB
container
| (xml.BeanSchemaBinding 227 ) You should use the 2.0 version
of the Microcontainer xml. xmlns='ur
| n:jboss:bean-deployer:2.0'
| (local.LocalTxDataSource 117 ) Bound datasource to JNDI name
'java:/DefaultDS'
| (local.LocalTxDataSource 117 ) Bound datasource to JNDI name
'java:/testDatasource'
| (ejb3.Ejb3Deployment 467 ) EJB3 deployment time took: 1047
| (ejb3.MCKernelAbstraction84 ) installing bean:
persistence.units:jar=registration-web.jar,unitNam
| e=testDatabase with dependencies:
| (ejb3.MCKernelAbstraction87 ) [EMAIL PROTECTED]
| (dependency.AbstractKernelController 350 ) Error installing to Start:
name=persistence.units:jar=registration-
| web.jar,unitName=testDatabase state=Create
| javax.naming.NameNotFoundException: testDatasource not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at
org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:240)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
| at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107
| )
| at
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
| at
org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControll
| erContextActions.java:100)
| at
org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(Ke
| rnelControllerContextActions.java:582)
| at
org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.in
| stall(KernelControllerContextActions.java:175)
| at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActi
| ons.java:51)
| at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
| at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
| at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
| at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
| at
org.jb