Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
WebSphere Studio Application Developer part 44 provides integrated development tools for all e-business development roles, including Web developers, Java developers, business analysts, architects, and enterprise programmers. The customizable, targeted, role-based approach of WebSphere Studio Application Developer will be characteristic of all new products built on the WebSphere Studio Workbench. It is well integrated with WebSphere Application Server and provides built-in server test environments that can be used for testing and profiling Web applications | This time around the association relationship is many-to-many. Simply turn both role names to plural and set both Multiplicity fields to Many. Click Finish to complete the wizard. Figure 12-27 shows the EJB deployment descriptor with the Account bean selected. Figure 12-27 EJB deployment descriptor editor after creating relationships Save the changes and close the editor. You may now inspect the changes the wizard made to your EJBs. In the J2EE Hierarchy view double-click the AccountLocal interface to open it with the Java editor. The following methods should have been added public java.util.Collection getTransRecords public void setTransRecords java.util.Collection aTransRecords public java.util.Collection getCustomers public void setCustomers java.util.Collection aCustomers Close the editor. Updating the TransRecord create method You might recall that we have updated the TransRecord create method before Figure 12-20 on page 399 and Figure 12-21 on page 400 . In that opportunity we added parameters to the create method to make sure no transaction record was created unless the transaction type and amount were specified. Now we want to guarantee that the account associated with the transaction record is also specified. 404 WebSphere Studio Application Developer Version 5 Programming Guide Update the TransRecordLocalHome interface so that the create method has this signature public itso.ejb.model.entity.TransRecordLocal create String transType int transAmt AccountLocal account throws javax.ejb.CreateException Note that the only change was the additional AccountLocal parameter. Save your changes and close the editor. Because we changed the create method on the home interface we also have to change the ejbCreate and ejbPostCreate methods in the TransRecordBean class. Open the class and perform the changes described in Figure 12-28. public java.util.Date ejbCreate String transType java.math.BigDecimal transAmt AccountLocal account throws javax.ejb.CreateException .