Modifying the bean Removing a method To remove (Web host music)

Modifying the bean Removing a method To remove a method from a bean, right-click the method in the bean representation and choose Delete Method. Regenerating a bean s interfaces When you work directly in the bean s source code, you might make changes to the bean class, but forget to make those changes in the home/local home and remote/local interfaces. You can choose to have the EJB designer regenerate those interfaces for you based on the current state of your bean class. To regenerate the interfaces of your bean, 1 Right-click the top of the bean representation in the EJB designer. 2 Choose Regenerate Interfaces from the context menu that appears. If you prefer to have the EJB designer regenerate the bean s interfaces automatically each time you make changes to the source code of the bean class, follow these steps: 1 Choose Tools|Preferences|EJB Designer. 2 Check the Always Regenerate Interfaces check box. 3 Click OK to close the dialog box. Setting package names for an enterprise bean You can quickly change packages for all the classes and interfaces of an enterprise bean all at once. This is especially useful if, for example, you want to move all the classes and interfaces of a bean to another package. Follow these steps: 1 Right-click the bean in the EJB designer and choose Set Packages For Selection. This dialog box appears: 2 Use the dialog box to change the package names for the enterprise bean parts. If you want all the parts of the bean to be in the same package, simply specify the name of the package you want as the Bean Package Name and the value of all the remaining fields will change to the name of that package. If you want the parts of the bean to be in different packages, you can edit each field individually. If a package exists in your current project, you can select it as a field s value by using the drop- down arrow to display a list of existing packages. You can also use the ellipsis ( ) button to display a Select A Package dialog box to select an existing package. If the package doesn t exist yet, type a new package name in a field, and when you choose OK, you will see the new package created in the project pane that contains the classes and/or interfaces you specified for that package. 3 Choose OK. You can see the results of changing the package for the bean classes and interfaces in the project pane. Chapter 4: Working with the EJB designer 29
Hosting services offered by our company comes with free domain name if you pay at yearly basis. Find out more at New Orleans Web Hosting services.

Leave a Reply