Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local Interface.... Problem with XML....Urgent

 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai All!
I am trying to deploy EJB that uses local interface(Provided in EJB 2.0 specs). I used following descriptor.
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<description>EJB Including LocalInterface</description>
<display-name>LocalInterfaceTest-CustomerBean</display-name>
<enterprise-beans>
<session>
<description>no description</description>
<display-name>CustomerBean</display-name>
<ejb-name>CustomerEjb</ejb-name>
<local-home>LocalCustomerHome</local-home>
<local>LocalCustomer</local>
<ejb-class>CustomerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
<resource-ref>
<res-ref-name>jdbc/bw2oraclepool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<security-role>
<description>Anonymous Users</description>
<role-name>AnonymousRole</role-name>
</security-role>

<method-permission>
<role-name>AnonymousRole</role-name>
<method>
<ejb-name>CustomerEjb</ejb-name>
<method-intf>Home</method-intf>
<method-name>*</method-name>
</method>
</method-permission>

<container-transaction>
<method>
<ejb-name>CustomerEjb</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Problem is when i tried to deploy following exception is thrown.
Element local-home is undefined.
But Element is defined in the dtd file that is specified in DocType.
I donn know much about XML.
Any help is appreciable.
TIA
Rgds
Manohar
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably you're either trying to deploy to an EJB server that doesn't have EJB2.0 support or you put the <local-home> in the wrong place.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic