Using the DTO and Session Facade wizard Using (Web servers)
Using the DTO and Session Facade wizard Using the DTO and Session Facade wizard The wizard can generate these types of classes: DTOs Data transfer objects. Their purpose is to pass information into and out of the EJB layer. One DTO is created for the bean the facade is created for, and additional DTOs are created for all beans with relationships to the initial bean. DTOs are sometimes referred to as Transfer Objects and other times as Value Objects. DtoAssemblers Factory classes that assemble DTOs from beans. They require a bean and use its data to populate a DTO. ServiceLocator A single class used to make looking up EJB home interfaces easier. You might need to edit the getInitialContext() method or make a subclass if you need to make a custom initial context for a particular application server. SessionFacade A stateless session bean used to interact with an entity bean. It contains methods for creating, retrieving, updating, and deleting instances of the entity bean. Business Delegate A delegate file created so you can call the methods of the session facade without having to know about EJBs or application servers. This is the primary class that clients will use to access and interact with entity bean data. When you write a test client, you can just use the business delegate to interact with the EJBs, which should make using EJBs easier. A Struts web client, which demonstrates the simple usage of the Business Delegate and its use in Struts. For information about Struts, see Using the Struts framework in JBuilder in Developing Web Applications. To create data transfer objects and a session facade for an entity bean, 1 Right-click a 2.0 CMP or BMP entity bean in the EJB designer. 2 Choose DTO/Facade Wizard on the context menu to display the wizard: 3 Work through the steps of the wizard: a The first page of the wizard allows you to specify whether you just want to create a stateless session facade for the entity bean, to generate a business delegate, and to also generate a Struts web client that uses the generated business delegate. Which pages appear in the wizard depend on which files you select to generate on this page. Click Next to go to the next step. 64 Developing Applications with Enterprise JavaBeans
Have all the commercials and ads about web hosting companies given you headache? Relax now.Our recommendation is web hosting comparisons.