Women in Technology

Hear us Roar



Article:
  Stateful Session EJBs: Beasts of Burden
Subject:   more reasons to use SFSB ...
Date:   2005-03-10 03:41:25
From:   bravegag
Hi,


There are couple more reasons I can think of for using SFSB even on top of a J2EE Web Application:


1-. Better distribution of responsibility i.e. encapsulation: In order to avoid state on SFSBs at all costs the Web Tier IMHO should never implement "Business Logic" inherent to the "Application Tier" just because this "Business Logic" has to keep short-lived conversational state with remote clients. Moving business logic away from SFSB to the Web tier breaks encapsulation and distribution of resposibility in the application implying **real evil** consequences i.e. a system much harder to maintain and extend.


2-. Poor reusability and integration: Again, avoiding the supposedly "evil" SFSB at all costs will consequence lower reusability as the moved functionality will not be able to be reused directly from non-Web Application clients e.g. exposing the SFSBs as Stateful Web Services for B2B integration.


I think that any technology can be easily misused, SFSB is not the exception, all have their place. I think also that moving conversational state inherent to the J2EE application "Business Logic" anywhere else out of the SFSBs is a HACK and will consequence that the application will not migrate well to evolving specifications and improved implementations of J2EE Servers. After all, Application Server Providers expect to find Your "Business Logic" state in the SFSBs.


Best Regards,
Giovanni