The rest of the XML elements are nested one within the other and are delimited by a beginning tag and ending tag. The structure is really not very complicated. If you have done any HTML coding you should already understand the format. An element always starts with tag and ends with tag. Everything in between even other elements is part of the enclosing element. The first major element is the element, which is the root of the document. All the other elements must lie within this element. Next is the element. Every bean declared in an XML file must be included in this section. This file only describes the Cabin EJB, but we could define several beans in one deployment descriptor. The element shows that the beans defined within this tag are entity beans. Similarly, a element describes session beans; since the Cabin EJB is an entity bean, we don t need a element. In addition to a description, the element provides the fully qualified class names of the remote interface, home interface, bean class, and primary key. The elements list all the container-managed fields in the entity bean class. These are the fields that will be persisted in the database and are managed by the container at runtime. The element also includes a element that can be set as True or False depending on whether the bean allows reentrant loopbacks or not. EJB 2.0 specifies a name which is used in EJB QL to identify the entity bean in queries. This isn t important right now. The 2.0 deployment descriptor also specifies as , which simply means the bean will propagate the calling clients security identity when access resources or other beans. This was covered in detail in Chapter 3. The next section of the XML file, after the element, is enclosed by the element, which describes the security roles and transactional attributes of the bean. This section is the same for both EJB 2.0 and EJB 1.1 in this example. … This role represents everyone who is allowed full access to the Cabin EJB. everyone Copyright (c) 2001 O’Reilly & Associates 12
For the first time, E-commerce websites allow small and large companies to actually compete on a level playing field.We highly recommend you to visit ecommerce website hosting.