| US 7,340,478 B2 | ||
| Method and apparatus for implementing container managed uses, ownerships, and references in an enterprise JavaBean environment | ||
| Geoffrey Martin Hambrick, Round Rock, Tex. (US); Robert Howard High, Jr., Round Rock, Tex. (US); Rodney Alan Little, Wappingers Falls, N.Y. (US); and Sridhar Sudarsan, Austin, Tex. (US) | ||
| Assigned to International Business Machines Corporation, Armonk, N.Y. (US) | ||
| Filed on Jan. 07, 2005, as Appl. No. 11/30,851. | ||
| Prior Publication US 2006/0155744 A1, Jul. 13, 2006 | ||
| This patent is subject to a terminal disclaimer. | ||
| Int. Cl. G06F 17/30 (2006.01) | ||
| U.S. Cl. 707—102 [707/100; 715/501.1] | 1 Claim |

| 1. A method in a data processing system for implementing container managed uses, owns, and reference relationships in an enterprise
JavaBeans environment, the method comprising:
detecting a first definition of a first “use” relationship between a first entity bean and a first session bean in a first
deployment descriptor file, the “use” relationship specified in a container managed uses (CMU) section of the first deployment
descriptor file, the “use” relationship specifying that the first entity bean uses the first session bean;
said first session bean being one of a stateless session bean, a stateful session bean, a container-managed persistent (CMP)
bean, and bean-managed persistent (BMP) bean;
the first entity bean being a customer source entity bean and the first session bean being a credit card target session bean,
said CMU section of the first deployment descriptor file including a specification that said customer source entity bean uses
said credit card session target bean;
said CMU section including an attribute for a remote target session that indicates whether standard remote exceptions are
to be passed through to a client or the first entity bean;
generating a getter method on said first entity bean, the getter method performing a manual lookup using Java Native Directory
Interface (JNDI) to obtain a reference to the first session bean through a home interface;
said generating the getter method including generating a getCreditCard( ) method that performs a manual lookup using JNDI
based on a key that is the home interface name and namespace of the credit card target session bean;
responsive to a first user invoking said getter method, performing a JNDI lookup of the home interface of the first session
bean and returning a first session bean interface to the first user;
detecting a second definition of a second relationship between a second owning entity bean and a third owned entity bean in
a second deployment descriptor file, wherein the relationship is an “owns” relationship, the “owns” relationship specified
in a container managed relationship (CMR) section of the second deployment descriptor file, wherein said CMR section is used
when said second deployment descriptor file is processed to recognize that said second owning entity bean owns said third
owned entity bean;
responsive to processing said second deployment descriptor file, recognizing that said second owning entity bean owns said
third owned entity bean and propagating key fields of said second owning entity bean transparently and automatically to said
third owned entity bean;
said second owning entity bean being an order bean and said third owned entity bean being a line item bean;
responsive to processing said second deployment descriptor file, propagating an order ID of the order bean to a key of the
line item bean;
in response to a subsequent deployment that said order bean is owned by a customer entity bean; propagating key fields of
the customer entity bean to the order bean, and then propagating the key fields from the order bean to the line item bean;
detecting a third definition of a third “reference” relationship between a fourth referencing entity bean and a fifth plurality
of referenced entity beans in a third deployment descriptor file;
in response to processing said third deployment descriptor file, generating a get<Role> method on said fourth referencing
entity bean that returns a list of keys of the fifth plurality of referenced entity beans;
responsive to a second user invoking said get<Role> method, returning said list of keys to said second user, wherein only
said list of keys is retrieved and no entity bean needs to be instantiated or cached;
in response to a job scheduler starting a batch job, accessing a batch definition to identify a list of batch beans to invoke;
said batch definition including a number of job steps, classes, conditions, and checkpoints that are necessary for the batch
job;
said batch job being a job to calculate interests for a list of bank accounts; and
creating a global transaction that invokes the list of batch beans inside a loop until a job completion indication is received
that indicates all interests for the list of back accounts have been calculated.
|