이미 소장하고 있다면 판매해 보세요.
|
Table of Contents
preface xv acknowledgments xvii about this book xviii author online xxii about the cover illustration xxiii Part I Appetizers 1 1 Client code 3 1.1 Invoking a local EJB from another EJB 4 1.2 Invoking a remote EJB from another EJB 6 1.3 Accessing EJBs from a servlet 8 1.4 Invoking an EJB from a JavaServer Page 12 1.5 Invoking EJB business logic from a JMS system 15 1.6 Persisting a reference to an EJB instance 18 1.7 Retrieving and using a persisted EJB reference 20 1.8 Persisting a home object reference 21 1.9 Comparing two EJB references for equality 23 1.10 Using reflection with an EJB 25 1.11 Invoking an EJB from an applet 27 1.12 Improving your client-side EJB lookup code 31 2 Code generation with XDoclet 33 An XDoclet appetizer 35 2.1 Generating home, remote, local, and local home interfaces 37 2.2 Adding and customizing the JNDI name for the home interface 43 2.3 Keeping your EJB deployment descriptor current 45 2.4 Creating value objects for your entity beans 47 2.5 Generating a primary key class 53 2.6 Avoiding hardcoded XDoclet tag values 56 2.7 Facilitating bean lookup with a utility object 58 2.8 Generating vendor-specific deployment descriptors 62 2.9 Specifying security roles in the bean source 63 2.10 Generating and maintaining method permissions 64 2.11 Generating finder methods for entity home interfaces 66 2.12 Generating the ejbSelect method XML 67 2.13 Adding a home method to generated home interfaces 68 2.14 Adding entity relation XML to the deployment descriptor 70 2.15 Adding the destination type to a message-driven bean deployment descriptor 71 2.16 Adding message selectors to a message-driven bean deployment descriptor 73 Part II Main courses 75 3 Working with data 77 3.1 Using a data source 78 3.2 Creating EJB 2.0 container-managed persistence 81 3.3 Using different data sources for different users 85 3.4 Using a database sequence to generate primary key values for entity beans 88 3.5 Using a compound primary key for your entity beans 92 3.6 Retrieving multiple entity beans in a single step 95 3.7 Modeling one-to-one entity data relationships 97 3.8 Creating a one-to-many relationship for entity beans 101 3.9 Using entity relationships to create a cascading delete 104 3.10 Developing noncreatable, read-only entity beans 107 3.11 Invoking a stored procedure from an EJB 109 3.12 Using EJB-QL to create custom finder methods 111 3.13 Persisting entity data into a database view 115 3.14 Sending notifications upon entity data changes 117 3.15 Creating an interface to your entity data 120 3.16 Retrieving information about entity data sets 122 3.17 Decreasing the number of calls to an entity bean 124 3.18 Paging through large result sets 126 4 EJB activities 133 4.1 Retrieving an environment variable 134 4.2 Implementing toString() functionality for an EJB 136 4.3 Providing common methods for all your EJBs 137 4.4 Reducing the clutter of unimplemented bean methods 139 4.5 Sending an email from an EJB 144 4.6 Using the EJB 2.1 timer service 145 Sending a JMS message from an EJB 147 4.7 Using an EJB as a web service 149 4.8 Creating asynchronous behavior for an EJB client 151 4.9 Creating asynchronous behavior without message-driven beans 156 4.10 Insulating an EJB from service class implementations 157 4.11 Creating a batch process mechanism 159 5 Transactions 163 A transaction appetizer 165 5.1 Tuning the container transaction control for your EJB 166 5.2 Handling transaction management without the container 169 5.3 Rolling back the current transaction 170 5.4 Attempting error recovery to avoid a rollback 172 5.5 Forcing rollbacks before method completion 175 5.6 Imposing time limits on transactions 176 5.7 Combining entity updates in |