Session Facade design and TopLink objects

Hi, we are just about to start using Toplink as our ORM tool. Ideally we want to wrap all business logic behind stateless session bean facades. So instead of BMP entity beans we are thinking of encapsulating the relevant Toplink objects in each facade and querying, updating that object when the session facade bean is instantiated.
We are using Weblogic 70. Example code:
e.g. MySessionBean implements sessionbean...
     MyTopLinkObject myObject = null;
     public void populateObject(String myID) throws java.rmi.RemoteException {
          try {
               MyTopLinkObject myObject = new MyTopLinkObject(myID);
          catch (Exception e) {
     public void setMyTopLinkObjectsName(String name) {
     //persist this change via the toplink object...
     myObject.setName(name);
Then in MyTopLinkObject:
public class MyTopLinkObject {
     private String myID;
     private String myName;
public MyTopLinkObject(String myID) {
          build(myID);
public void build(String myID) {
          //read TOPLINK cache and populate this MyTopLinkObject name etc
public void setName(String myName) {
     //persist this change...
     this.myName = myName;
// more gets sets
I will then want to update MyTopLinkObject data in for example in calling. MySessionBean.setMyTopLinkObjectsName("my name") from the remote interface on the client.
So what I want to know is how do I can I do this efficiently. I'm too too versant with TopLink caches etc. For example to read the cache do I have to pass thru a TopLink client/server Session to each Session Facade bean so the cache is available for that read, update etc?
Any other tips is using this design would be appreciated!
Thanks in advance,
J

Don, thanks for ur advice yet again.
I think now I am getting a better grasp of how TopLink should be used. However there is very little doco out there in terms of using TOPLInk in as EJB session facade scenario.
After your advice my thoughts are to provide something like the TOPLInkFactory object as you say which will encapsulate the ServerSession TOPLink API and provide more fine grain access to the TOPLInk API. e.g. instead of having to create a ClientSession in each client call b4 getting a UnitOfWOrk, this factory class would provide a method to do this directly:
public final class TOPLinkFactory {
     private static ServerSession serverSession = null;
     private static final String TOPLINK_CONFIG_FILE = "C:\\test.xml";
     private static final String TOPLINK_SESSION = "toplink";
     public TOPLinkFactory() throws Exception {
          super();
     private static ServerSession createServerSession(ClassLoader cl) throws Exception {
          try {
          Project builderProject = XMLProjectReader.read(TOPLINK_CONFIG_FILE, cl);
     serverSession = (ServerSession)builderProject.createServerSession();
          serverSession.login();
               return serverSession;
          catch (Exception e) {
          return null;
     public static UnitOfWork getUnitOfWork(ClassLoader cl) {
          try {
               return createClientSession(cl).acquireUnitOfWork();
     public static ClientSession createClientSession(ClassLoader cl) throws Exception {
          try {
               if (serverSession == null) {
serverSession = createServerSession(cl);
ServerSession s = (ServerSession)SessionManager.getManager().getSession(TOPLINK_SESSION, cl);
               return serverSession.acquireClientSession();
          catch (Exception e) {
          return null;
Then in my Session EJBs I could write a method like this where Thing is a TOPLInk object mapped to the thing table:
     public boolean setThingStatus(String thingID) {
ExpressionBuilder builder = new ExpressionBuilder();
Expression expression = builder.get("THING_ID").equal( Integer.parseInt(thingID));
ClientSession s = TOPLinkFactory.createClientSession(this.getClass().getClassLoader());
Thing thing = (Thing) s.readObject(Thing.class, expression);
UnitOfWork uow = TOPLinkFactory.getUnitOfWork(this.getClass().getClassLoader());
Thing thingClone = (Thing)uow.registerObject(thing);
thingClone.setStatus("WITH JASON");
TOPLinkFactory.commitAndReleaseUnitOfWork(uow);
return true;
Now if the above looks OK and there are no Thread/Session issues that you could make me aware of (or perhaps you would encourage using a full Singleton pattern instead).
I have another question in relation to ClassLoaders. In this architecture I have been passing around the ClassLoader (as above) to the TOPLInkFactory methods to create the unit of works etc... Is this necessary? Or could I avoid it?
Also I think some people in my team are thinking its a good idea for all TOPLink business objects to extend an abstract base class that contains this behaviour and provides these TOPLinkFactory methods. I no expert on TOPLInk but I would have thought this code should not be coupled with the TOPLink business objects for reasons such as:
1) Why should a TOPLink Person object (attributes name, age etc) e.g. extend a class with TOPLink API methods and attributes - I just don't see the logic there as I thought TOPLink was to be non-intrusive. For example a Person object should not encapsulate a ServerSession object and nor does it need to. To this end they are then coupled and if for example we wanted to move these Person objects to work with another persistence framework then they would have to be rewritten to remove all TOPLInk attribute/method references
2) I would have thought accessing the TOPLInk API is only necessary when the client code needs to invoke calls to the database for reads and updates. i.e. that's where you start getting your sessions, unit of works etc. Like in the setThingStatus Session EJB method (i.e. the client code) above and NOT in your business methods of for example the TOPLink Person object?
Please tell me if I am mistaken!
If you could clear some of this up it would be great.
Regards,
Jason

Similar Messages

  • Business delegate and Session facade design patterns

    Does any one tell me, what is the difference between business delegate and session facade design patterns.

    1. Session Facade decouples client code from Entity beans introducing session bean as a middle layer while Business Delegate decouples client code from EJB layer ( Session beans).
    2. SF reduces network overhead while BD reduces maintenance overhead.
    3. In SF any change in Session bean would make client code change.
    While in DB client is totally separate from Session bean because BD layer insulate client from Session beans(EJB layer).
    3. In only SF scenario, Client coder has to know about EJB programming but BD pattern no EJB specialization needed.
    4.SF emphasizes on separation of Verb, Noun scenario while BD emphasizes on separation of client(presentable) and EJB layer.
    Anybody pls suggest more differences ?

  • Transaction Problem in Session Facade Design Pattern

    Hi
    Well Sorry for giving wrang title to the topic, coz of which I have not received and reply.
    I am using session facade design pattern.
    I have Action class calling session facade method "getData" . This method calls "findByPrimaryKey" method in BMP.
    Method "getData" has transaction attribute as "RequiresNew" and "findByPrimaryKey" has "Required".
    This combination does not assign identity to BMP hence I can not use setter getter method for retriving data(throws nullpointer exception when getter method accessed) I have made sure that I am accessing table and getting data in to BMP but as BMP is not ablle to hoild any identity its not allowing me to use BMP's getter method in session facade.
    I have Used Same transaction attribute for create method called by "addNew" method of session facade bean.
    Transaction method for "addNew" is "RequiresNew" and for "create" is "Required".
    It works fine and gives identity toBMP hense I can use Setter getter method defined in BMP bean.
    How can I avoid this and get BMP an identity?
    Thanking in Advance,
    Chintan.

    Sorry, how is this related to JSF?
    There's an OO/patterns forum out. Consider reposting the question over there with formatted code.

  • What is meant by session Facade design pattern

    please give me

    cripes
    http://www.google.com/search?q=what+is+meant+by+session+Facade+design+pattern
    Who'd have thought it? ;-)
    kind regards,
    Jos

  • Designer and SDO_GEOMETRY object type

    I want to have tables with columns of object type MDSYS.SDO_GEOMETRY (Oracle Spatial's type) in Designer 9i and then generate these tables.
    So I created in Oracle Object Types branch object type called MDSYS.SDO_GEOMETRY without attributes, methods or source table.
    Then I created in Designer table with column named GEOMETRY which has Datatype property empty and Oracle Type property of value MDSYS.SDO_GEOMETRY.
    But when I generate this table I get these two messages:
    CDS-11349 Warning: The Oracle Object Type MDSYS.SDO_GEOMETRY cannot be generated.
    CDS-18025 Error: Table 'PRK_PRIMER_GEO_SDO' will not be created as Oracle Object Type 'MDSYS.SDO_GEOMETRY' is not created
    Object type MDSYS.SDO_GEOMETRY already exists in database for sure.
    What is wrong here?
    Regards
    Saso Celarc

    I think, Designer cannot handle SDO_GEOMETRY type.
    Workaround: use a other datatype/size not used in your schema ( such as varchar2(99) ), generate scripts and do a text substitution on them to SDO_GEOMETRY.

  • How to combine Session Facade and Transfer object?

    Hello All!
    I'm working on an enterprise application. Presentation layer is a stand alone client, business logic is build on the Glassfish v2.1 and MySQL is used as a database. The client is connection to the GlassFishj server remotely using EJBs.
    I have problems with business logic architecture.
    Here is the brief description of backend application architecture design:
    1. Session Facade pattern is used to simplify the client and application server interface and to provide application layers between backend (http://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html).
    2.Transfer Object pattern to define update transfer objects strategy in order to decrease network overhead during client and application server interactions and to provide version control for objects. Transfer objects are designed as simple java business serializable objects. (http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html)
    3. Originally the backend application consisted of three modules: users, storage and orders, but at the end I have decided to divide my application into the following parts - assortments, map, menu, orders, transactions, users.
    4. All MySQL database transactions are via JDBC using procedures. No use of entity beans.
    Questions:
    1. I have some doubts about using Session Facade and Transfer object patterns at the same time. At first I'd mike to cite the definitions of the patters from the SUN official web site.
    * Use a session bean as a facade to encapsulate the complexity of interactions between the business objects participating in a workflow. The Session Facade manages the business objects, and provides a uniform coarse-grained service access layer to clients.
    * Use a Transfer Object to encapsulate the business data. A single method call is used to send and retrieve the Transfer Object. When the client requests the enterprise bean for the business data, the enterprise bean can construct the Transfer Object, populate it with its attribute values, and pass it by value to the client.
    * So, if I use Transfer Object along with Session Facade, it makes some difficulties with object version control, because I 2 or
    3 transfer objects controls with the 1 bean class. The best option for Transfer object Pattern is that each transfer object should have its own bean class to provide ability of object's version control. In the case it can bring the network overhead because of frequent remote calls caused by the large number of the bean classes.
    * So, should I use the both patterns? If yes, how to manage the interaction the patterns. If no, which one to use.
    2. E.g. I have a huge list of the Order objects and each Order object consists of other complicated objects. So, would I have trouble to transfer that list over network? If yes, how to manage it.
    Thank you!
    Astghik

    Astghik wrote:
    Hello All!
    I'm working on an enterprise application. Presentation layer is a stand alone client, business logic is build on the Glassfish v2.1 and MySQL is used as a database. The client is connection to the GlassFishj server remotely using EJBs.
    I have problems with business logic architecture.
    Here is the brief description of backend application architecture design:
    1. Session Facade pattern is used to simplify the client and application server interface and to provide application layers between backend (http://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html).
    I would simply recommend establishing a service tier. Your services should be stateless. You can go the extra mile and have a session facade, but in the majority of cases, coding to an interface for your service accomplishes the same goals.
    2.Transfer Object pattern to define update transfer objects strategy in order to decrease network overhead during client and application server interactions and to provide version control for objects. Transfer objects are designed as simple java business serializable objects. (http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html)
    The idea of the transfer object is very similar to the Command pattern. I think if you investigate that pattern, it will be more obvious. The transfer object reduces network latency by consolidating all the parameters into an object, ideally, this also consolidates multiple method calls. If you combine a transfer object (or command object) with a service tier, you get the best of both worlds. The service can delegate calls to helper objects (or other services or components) using the data in the transfer / command object.
    3. Originally the backend application consisted of three modules: users, storage and orders, but at the end I have decided to divide my application into the following parts - assortments, map, menu, orders, transactions, users.
    The is your domain. It will vary from application to application. The principles above are more general (e.g., patterns and architectural tiers) and should apply to most domains. However, your actual use case may require something different.
    4. All MySQL database transactions are via JDBC using procedures. No use of entity beans.
    Consider using something like iBatis or Spring's JDBC templating to make your life easier with JDBC.
    Questions:
    1. I have some doubts about using Session Facade and Transfer object patterns at the same time. At first I'd mike to cite the definitions of the patters from the SUN official web site.
    * Use a session bean as a facade to encapsulate the complexity of interactions between the business objects participating in a workflow. The Session Facade manages the business objects, and provides a uniform coarse-grained service access layer to clients.
    * Use a Transfer Object to encapsulate the business data. A single method call is used to send and retrieve the Transfer Object. When the client requests the enterprise bean for the business data, the enterprise bean can construct the Transfer Object, populate it with its attribute values, and pass it by value to the client.
    * So, if I use Transfer Object along with Session Facade, it makes some difficulties with object version control, because I 2 or
    3 transfer objects controls with the 1 bean class. The best option for Transfer object Pattern is that each transfer object should have its own bean class to provide ability of object's version control. In the case it can bring the network overhead because of frequent remote calls caused by the large number of the bean classes.
    * So, should I use the both patterns? If yes, how to manage the interaction the patterns. If no, which one to use.
    Versioning is a separate issue. Generally, the more coarsely grained your transfer / command object is, the more changes are likely to impact dependent objects.
    Your command or transfer object does not have to be a vanilla JavaBean, where you are basically creating a bean that has data from other objects. You can simply use your command / transfer object to encapsulate already existing domain objects. I see no need to map to a JavaBean with what you have described.
    Generally, a method signature should be understandable. This means that many times it is better to pass the method, say, two coarsely grained objects than a signature with a dozen primitives. There are no hard and fast rules here. If you find a method signature getting large, consider a transfer / command object. If you want one service to delegate calls to a number of other services, you can also create a transfer / command object to furnish the controlling service with the data it needs to invoke the dependent services.
    2. E.g. I have a huge list of the Order objects and each Order object consists of other complicated objects. So, would I have trouble to transfer that list over network? If yes, how to manage it.
    This is a large, open-ended question. If you are going to display it to a user on a screen, I do not see how you avoid a network transfer with the data. The general answer is to not pass the data itself but rather a token (such as a primary key, or a primary key and a start and stop range such as you see on a Google search result). You do want to limit the data over the network, but this comes at a cost. Usually, the database will receive additional load. Once that becomes unacceptable, you might start putting things into session. Then you worry about memory concerns, etc. There is no silver bullet to the problem. It depends on what issues you are trying to address and what trade-offs are acceptable in your environment.
    Thank you!
    AstghikBest of luck.
    - Saish

  • Business Delegate and Session Facade Pattern

    Hi!
    The only way to use the Session Facade Pattern, is if I use EJB for Persistence.
    Is valid to do this?:
    I use Ejb for simple update, insert querys. From my business delegate I call the Session Facade Layer, and from this I invoque Entyties for persistence.
    But if I have complex querys, is correct to make PL SQL Procedures and do the following:
    From my business delegate I call to the Dao layer, and from this via JDBC I call the Procedure.
    Please explain me the best form to do this, having complex querys for reporting and simple querys for inserts/update.
    Is valid to combine the use of CMP (for simple persistence cases), BMP (for complex persistence cases), and JDBC for complex select querys with multiple result rows.
    Thanks!!

    It depends on your design goals. One of the forces driving the use of patterns is the desire to tier an application and abstract the internals of each tier away from the other tiers. One (normal) benefit of this methodology is that the application should become more portable. Now, if you are using PL/SQL, BMP and CMP, you are mixing and matching portable versus proprietary. This is okay. But you should abstract away whether you are using PL/SQL, BMP or CMP from the business layer (or domain model). Ideally, you could completely swap database technologies (say from relational to object) and only have to re-write your integration tier (your DAO's).
    Session facade is simply a glorified Facade pattern. It abstracts the lower-level details of what you are persisting and instead forces you to think in terms of objects. You can use a facade without even remotely touching EJB's. It just so happens that, historically, EJB containers made a mess out of scalability when it came to entity beans. The "session" facade refers to a facade pattern implemented in session beans (that have fewer scalability problems) communicating with the entity beans which do have scalability problems.
    So... to make a long story short, use whatever persistence mechanism you desire. Remember that you should be able to completely switch your persistent store from one type or another and simply re-write your DAO's (or CMP deployment descriptors). Using a facade pattern can help towards this end, but don't make it a straightjacket.
    - Saish
    "My karma ran over your dogma." - Anon

  • Business Delegate and Session Facade usage.

    Hi guys.
    I am new to JavaEE and I recently learnt the Business Delegate and Session Facade design patterns. The tutorials from Oracle did gave me a basic idea of what they are and why they are used, but the example didn't really answer all my questions. So I decided to use a real life scenario here and put my question in to it. Any help is appreciated.
    Assume I want to create a search employee page for my company, the employees are categorized by his or her department and the province he or she is in. I have in the database a look up table for department and province. (as shown in the image below)
    http://oi46.tinypic.com/idvpsl.jpg
    So I create three JPA entities, one for each table. Now I am stuck with what is the proper way to design the session facade design pattern. I know that I will need the to access all three entities in my page. (to get the drop down list for Provinces and Departments, and to retrieve list of Employees based on the selection) So should I create a Stateless Session Bean as session facade to access all three JPA Entities or should I create three separate Stateless Session Bean to manage one Entity each?
    I came up three component diagram in the below picture.
    The first one has one Stateless Session Bean as session facade and manages all three Entities.
    The second one has a session facade to manage the relationship between business objects such as ProvinceManagerEJB and DepartmentManagerEJB which will manage the corresponding Entities.
    The last one has three Stateless Session Beans that will manage one Entity each, all three Stateless Session Beans can be looked up via the Business Delegate pattern.
    http://oi46.tinypic.com/10pqets.jpg
    Please let me know if any one of them is the proper way to use business delegate and session facade. or none of them is correct. (which I assume might happen)
    Again, thank you so much for your help.
    Cheers
    Edited by: 992005 on 05-Mar-2013 18:15
    Edited by: 992005 on 05-Mar-2013 18:17

    Well I can't access any of your diagrams from here so can't comment on them. For dividing the functionality into separate classes, think about
    1.) Quantity - Are there many enough service calls to require splitting up or will one application service class be enough? The size of the system is important here.
    2.) Are you duplicating logic in the services? e.g save person, delete person in one service and save department, delete department in another e.t.c is better factored into one service with save entity, delete entity calls because the JPA entity manager doesn't know about the type anyway and it's easier to apply common logic (e.g logging auditing) around the calls.
    3.) Will each service makes sense on it's own or do you always need the other functionality to completely describe the service? Here it is important not think about entities but about the business use cases. Process1Service is better than Entity1Service, Entity2Service ... EntitynService.Think granule of reuse = granule of release. Only split out individually reusable services. A good way to understand granules of reuse in your system is to think about (or start by writing) test cases for the functionality. Testable code is reusable code.
    4.) Will the services change together? At class level you would look at common closure principle (classes that change together should be packaged together). You can apply the closure to the methods as well. Make it easy for future developers to recognize dependent functionality by packaging it together.
    These are just general because in enterprise development requirements are king. You can chose to follow or discard any of these rules depending on your requirements as long you understand the impact of each decision.

  • Session Facade and Business Delegate Pattern

    Hi!
    The only way to use the Session Facade Pattern, is if I use EJB for Persistence.
    Is valid to do this?:
    I use Ejb for simple update, insert querys. From my business delegate I call the Session Facade Layer, and from this I invoque Entyties for persistence.
    But if I have complex querys, is correct to make PL SQL Procedures and do the following:
    From my business delegate I call to the Dao layer, and from this via JDBC I call the Procedure.
    Please explain me the best form to do this, having complex querys for reporting and simple querys for inserts/update.
    Is valid to combine the use of CMP (for simple persistence cases), BMP (for complex persistence cases), and JDBC for complex select querys with multiple result rows.
    Thanks!!

    The session facade is borrowed from the facade pattern, so you could have a facade to almost anything.
    A session facade is usually against other beans...for example if you
    (Not deployed as CMR)
    1. Address bean
    2. Phone Bean
    3. Customer bean
    as entity beans then you can build a session facade such as
    CustomerFacadeBean which will CreateReadUpdateDelete(CRUD) address and phone as well when a customer is CRUD ed.
    In your case you said you have very complex sql's so one way would be
    Business Delegate -> Session Facade -> (Bean Managed) Entity Bean -> DataAccessObject.
    If you think this is a overkill then, write a custom pattern such as DataDelegate
    DataDelegate -> (Bean Managed) Entity Bean -> DataAccessObject.
    In the above scenario you should be quite sure that the system will not evolve into a case mentioned above such as when customer is deleted a phone and address object are also thrown away.
    You said this scenario
    Business Delegate -> DAO..
    I don't think this is a good idea because, a business delegate is a proxy against business objects....and usualy in J2EE business objects are session beans. Entity and DAO objects are data objects not business ones.
    Besides if you do the above scenario you will end up wiring all the transactions, etc etc in your DAO which is not a good idea.
    Although you could use BusinesDelegates against entity beans it will lead to a misnomer.

  • Traction Problem In Session Facade Disign

    Hi
    I am using session facade design pattern.
    I have Action class calling session facade method "getData" . This method calls "findByPrimaryKey" method in BMP.
    Method "getData" has transaction attribute as "RequiresNew" and "findByPrimaryKey" has "Required".
    This combination does not assign identity to BMP hence I can not use setter getter method for retriving data(throws nullpointer exception when getter method accessed) I have made sure that I am accessing table and getting data in to BMP but as BMP is not ablle to hoild any identity its not allowing me to use BMP's getter method in session facade.
    I have Used Same transaction attribute for create method called by "addNew" method of session facade bean.
    Transaction method for "addNew" is "RequiresNew" and for "create" is "Required".
    It works fine and gives identity toBMP hense I can use Setter getter method defined in BMP bean.
    How can I avoid this and get BMP an identity?
    Thanking in Advance,
    Chintan.

    Hi
    I am using session facade design pattern.
    I have Action class calling session facade method "getData" . This method calls "findByPrimaryKey" method in BMP.
    Method "getData" has transaction attribute as "RequiresNew" and "findByPrimaryKey" has "Required".
    This combination does not assign identity to BMP hence I can not use setter getter method for retriving data(throws nullpointer exception when getter method accessed) I have made sure that I am accessing table and getting data in to BMP but as BMP is not ablle to hoild any identity its not allowing me to use BMP's getter method in session facade.
    I have Used Same transaction attribute for create method called by "addNew" method of session facade bean.
    Transaction method for "addNew" is "RequiresNew" and for "create" is "Required".
    It works fine and gives identity toBMP hense I can use Setter getter method defined in BMP bean.
    How can I avoid this and get BMP an identity?
    Thanking in Advance,
    Chintan.

  • Session facade deligator

    Hi ALL,
    I used to employ BusinessDelegate pattern in ejb 2.0. My design was SFD ( session facade deligator) ---- SFIMPL - DAO.
    I am wondering whether it is still being used with ejb3.0. Besides providing abstraction layer to the session facade some of the benefits of using a delegate was to cache EJBHome, or to provide client with the byteCode for the serialized ejb Handles and to abstract ejb/rmi exception from the client code.
    Is this pattern still applicable to ejb3.0 since now we don't use ejbHome, ejb/rmi exceptions are not visible and you have dependency injection. In ejb3.0 is the approach of serializing ebj handle still viable?
    Also with struts is it better to create intsatnce of ejb interface in base action class and avoid any session facade deliagtor and call directly ejb imp
    Thanks
    Edited by: j2ee_expert on Jul 8, 2008 1:13 PM

    You should avoid SessioCaching now and leave the job to the dependency injection. They are much more intelligent then what was possible before EJB 3.0.
    For example they will avoid RMI if both applications are running on the same JVM, and take care of all the other stuff as caching and so on.
    Bottomline: You wont need it in EJB 3.0 as dependency injection will take care of all the stuff the ResouceLocator/BD was doing.

  • Bussines Delegate -- Session Facade

    Hi,
    My design is:
    client --> bussines delegate --> session facade ---> application service --> dao
    ........................................................................................................|
    ........................................................................................................|
    ......................................................................................................pojo
    I have 2 session facade: PurchaseManagement and InventoryManagement.
    I have a use case that need access to services provided by both session facade.
    Which is the best solution?
    1- Define a bussines delegate for each session facade and the client use both bussines delegate
    2- Define a unique bussiness delegate that access to both session facade
    3- ????
    Thanks.

    I have 2 session facade: PurchaseManagement and
    and InventoryManagement.
    I have a use case that need access to services
    ces provided by both session facade.
    Which is the best solution?
    1- Define a bussines delegate for each session
    ion facade and the client use both bussines delegate
    2- Define a unique bussiness delegate that access
    ess to both session facade
    3- ????If you are using a client-side Business Delegate, you do not need a one-to-one mapping to each Session Facade. The single Business Delegate should be composed of business methods from both Session facades. This will help keep the application modular. If you ever decide to change the design of the business tier, nothing will have to be changed in the presentation tier.
    Best,
    Sam
    http://www.softwareleadership.org/docs/overview_UW_RPM.html

  • "Edit Session Facade" in JDeveloper

    Hi,
    My session facade bean in TopLink project is working well. I just added a new named query and I would like to edit session facade to expose that method. Then I would need to re-create the DataControl. I did this a couple of times and that was fine. But now it doesnot show up the "Edit Session Facade" window for me to check to include the new method. Is there a way to delete the DataControl to create a new one, or any one knows any suggestion?
    Thank you,
    John

    Make sure you added the method to the EJB interface as well.

  • Session Facades

    A question on session Facade design:
    Assume two front end banking applications both needed to perform a Withdrawal on a bank account.
    Also Assume that the coarse grained Withdrawal method would perform a set of fine grained methods (which were currently the same for the two applications but could potentially be different at some point in the future)
    Should the Withdrawal method be duplicated in two different facades (one per application) or should it be in a common facade that they both used.

    You're right when you're saying that you shouldn' have a fa�ade for every table.
    A facade is business-driver where an entity is data driven.
    You should try to group the methods in Fa�ades by "themes" rather than data. In other words, to group methods that have similare purposes, rather than thinking in terms of data.
    Knowing that, it is hard to tell what size your fa�ades should be. To big, you might have performance issues, to small, they'll become unmanageable.
    Ours are usually 10-methods big average. Theses methods being quite high-level.
    Stephane

  • Difference between Session Facade and Business Delegate design patterns

    Can someone tell me the differences between Session Facade and Business Delegate design patterns

    1. Session Facade decouples client code from Entity beans introducing session bean as a middle layer while Business Delegate decouples client code from EJB layer ( Session beans).
    2. SF reduces network overhead while BD reduces maintenance overhead.
    3. In SF any change in Session bean would make client code change.
    While in DB client is totally separate from Session bean because BD layer insulate client from Session beans(EJB layer).
    3. In only SF scenario, Client coder has to know about EJB programming but BD pattern no EJB specialization needed.
    4.SF emphasizes on separation of Verb, Noun scenario while BD emphasizes on separation of client(presentable) and EJB layer.
    Anybody pls suggest more differences ?

Maybe you are looking for