O'Reilly logo

Patterns: Implementing Self-Service in an SOA Environment by Fernando Teixeira, Shashi Shrimali, Peter Hood, Sandy Grewal, Diego Cotignola, Anup Aggarwal, Carla Sadtler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

162 Patterns: Implementing Self-Service in an SOA Environment
Figure 7-8 Command hierarchy
7.2.8 Best practices for EJBs
The following is a brief collection of best practices for developers of Enterprise
JavaBeans:
򐂰 Use session beans to represent large-grained tasks in the business process.
Session beans are used by one client and may or may not have associated
properties.
򐂰 Use entity beans to represent fine-grained business domain elements.
Entity beans are shared by many clients and typically have persistent data.
«JavaInterfac
TargetableCommand
+ getC ommandTarget ( )
+ getC ommandTargetName (
)
+ hasOutputProperties ( )
+ performExecute ( )
+ setC ommandTarget ( )
+ setC ommandTargetName ( )
+ setOutputProperties ( )
TargetableCommandImpl
«JavaInterfac
CompensableCommand
+ getC ompensatingC ommand ( )
«Jav aInterface»
Serializable
«JavaInterfac
Command
+ execute ( )
+ isReadyToCallExecute (
)
+ reset ( )

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required