4.1 Introduction to Business Services
When you create an EJB project, you can start by creating either the services (session beans) or the persistence (JPA entities). Often a developer may create the service and a set of business methods first, and implement the persistence portion later. For applications where you are only using the facade-generated methods, it may make more sense to create the persistence units first. In the case of a small application, like the Customer Service portion of the Order Booking demo application, creating the persistence units first requires fewer steps, and that is how the process is described here.
Tip:
Most teams have their own respective source control management (SCM) procedures, policies, and common philosophies towards what constitutes a transaction or unit of work for the SCM system. In the absence of a policy, you should group logical changes into a transaction, and also commit your changes when you need to share your modifications with another member of your team. In general, it is not advisable to commit changes when they do not compile cleanly or pass the unit test created for them. |