A few more changes to the persistence.xml file - there is no 'name' element, and
you need to make the value for name match the name specifed in
@PersistenceContext(unitName="user"). So here is the updated persistence.xml
file that should work:
<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="user" >
| <jta-data-source>java:/DefaultDS</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto"
value="create-drop"/>
| </properties>
| </persistence-unit>
| </persistence>
And one more thing. You don't need PortableRemoteObject.narrow. This will work:
UserRegistrationRemote dao =
(UserRegistrationRemote)jndiContext.lookup("UserRegistrationSessionBean/remote");
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217665#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...