geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher James Blythe (JIRA)" <...@geronimo.apache.org>
Subject [jira] Created: (DAYTRADER-23) Decouple backend impls in order to support additional backend implmentations (ie. JPA, EE5, etc)
Date Mon, 13 Nov 2006 16:37:37 GMT
Decouple backend impls in order to support additional backend implmentations (ie. JPA, EE5,
etc)
------------------------------------------------------------------------------------------------

                 Key: DAYTRADER-23
                 URL: http://issues.apache.org/jira/browse/DAYTRADER-23
             Project: DayTrader
          Issue Type: New Feature
          Components: EJB Tier, Web Tier
    Affects Versions: 2.0
            Reporter: Christopher James Blythe


Currently, all of the backend impl modes (Direct, EJB and the new SLSB to JDBC) are packaged
together inside the ejb.jar. To provide greater flexibility and the ability to support additional
back impls, I think we need to re-org the code within Daytrader. I've been brainstorming and
have come up with the following...

Create interfaces for the DaytraderServices and each of the access beans (ie. QuoteDataBean,
OrderDataBean, etc.)

	util.jar (contains the following...)
	- Interfaces for access beans - defines interfaces with getters and setters
	- DaytraderServices (interface) - defines the high level transactions similar to TradeServices
		- Operation return types are based on access bean interfaces (not impls)
	- Any other commonly used routines

For the EE4 component impls...

	jdbc-impl.jar (depends on util.jar)
	- Contains DaytraderJdbcServices class that implements DaytraderServices interface
	- Also contains impls for access beans that will be used for all EE4 components

	ejb2.1-impl.jar (depends on util.jar and jdbc-impl.jar)
	- Contains 2 impls for EJB modes (Session2Jdbc and Session2Entity)
		- DaytraderSession2JdbcServices class provides SLSB that wrappers DaytraderJdbcServices
		- DaytraderSession2EntityServices class provides SLSB to Enity bean impl
	- Both impls depend on access beans defined in jdbc-impl.jar

For the EE5/JPA components

	- Define new access beans for EE5 impls based on interfaces
	- Also create new impls for DaytraderServices interface

Provide DaytraderServicesFactory class which can...
	- Detect which impls a present during initialization using Class.forName()
	- Create instances of the desired services given a string parameter (assuming the service
available)
	- Can either be packaged in the war or another utility jar
		- CANNOT go in util.jar to avoid circular dependency

Key points:

	- New backend impls are isolated to their own jars
	- Backend impl jars can be removed for AppServers lacking support
	- Operation return types are based on interfaces (consequently EE4 and EE5 impls could co-exist)
	- war servlets and JSPs only know about access bean interfaces

Any thoughts or comments? 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message