Different Roles

Discussions

EJB design: Different Roles

  1. Different Roles (1 messages)

    Hi:
    I'm working on a system that has 4 roles in it , and number of roles will be changed in future, so we should have a good architecture for this purpose.

    some of these roles have similar tasks but not completely similar , their task are some how similar in ejb tier [80%].so i decided to use this architecture, I put two layers of session bean in front of entities , first level is consist of nearly 10 session beans that give some sort of services , for example registering and activating a bunch of users and ... . at the top of this level i put 5 session beans that 4 of them are for specific roles and one them is a common proxy session between these roles.
    i think with this architecture i can isolate roles from each other , so when i want to remove on role i can remove its proxy session without any effect on other roles.

    remeber that when roleA want to do something, its request goes to its proxysesion , this proxysession may call some of the proxysession on level 1 and return.

    could u please help me on this decision ?
    is it goood to have 2 layer of proxy sessions like this ?

    Thanks a lot
    I hope u can read my english :)
    --Amir Hossein

    Threaded Messages (1)

  2. Different Roles[ Go to top ]

    Your overall model seems fine to me, but I don't know why you need to make each role an EJB. Remember that each bean is proxied anyway (through its stubs) and you are now proxying each role again through an explicit proxy bean.

    Is it not adequate to implement each role as a dependent object to your proxy bean? In other words, implement each one as an ordinary Java class which the proxy bean instantiates and delegates to as necessary?

    Unless you have special architectural requirements for rendering these roles as EJB's, doing so could be overkill and an unnecessary strain on the container.