--- Brad Cox <[EMAIL PROTECTED]> wrote:
> Could someone please respond to this request? A
> pointer to relevant 
> references would do. Thanks!
> 
> ----
> 
> Hi. I'm converting a legacy application from
> servlets/jdbc to 
> ejb/xdoclet and am stymied by a problem with no
> obvious answer.
> 
> The application is essentially a double entry bank
> accounting 
> application. There are accounts for each customer
> that compute the 
> account balance by summing transactions managed as
> separate 
> transaction records. No problem so far.
> 
> The problem is that the system must somehow support
> monthly rollover 
> of the transaction tables. This is both for
> efficiency (to avoid 
> having to sum transactions through arbitrarily long
> transaction 
> tables) and for backup/restore purposes (so ancient
> records can be 
> archived and restored without breaking referential
> integrity between 
> the several tables involved in transaction recording
> and journaling).
> 
> The solution used in the legacy system is to give
> each monthly 
> transaction table a unique name based on the
> year/month. I.e. instead 
> of Ledger, RequestJournal, SessionJournal, etc, so
> for Jan 2003, 
> there is 0301Ledger, 0301RequestJournal,
> 0301SessionJournal. The 
> application supports retrospective browser access
> over the most 
> recent six months by emitting the monthly table name
> in the jdbc 
> calls; i.e. select whatever from 0301Ledger,
> 0302Ledger, ... as 
> appropriate. There is a rollover process that
> creates new tables each 
> month, initialized with the balance from the
> previous month. This all 
> works fine in the legacy app.
> 
> The question is: can this solution be implemented in
> xdoclet? Can it 
> be implemented in J2EE? CMP? BMP? Or is this
> approach simply 
> boneheaded and should be replaced with an entirely
> new design? I'm a 
> programmer, not an accountant, and wouldn't be at
> all surprised if 
> there's a much cleaner approach.


XDcolet is source code generator and nothing more....
So it certainly can not implement this. However, it
can assist you in this task. 

Renaming tables would require changes in persistence 
settings ( and thus force redeployment of application
) - this is uncool. 

As for arhitecture - I would not use EJB ( entity )
unless absolutely necessary. 

I would model my domain data, use hibernate as
persistence layer, (maybe ) create SLSB for accessing
hibernated datastore ( depends on your architecture ) 

If you to this clever, you will end with a transaction
log which  can be safely archived / truncated.

Another cool feature of hibernate is using of POJOs,
so you do not have overhead of EJB layer. 

After all, throw in decent MVC framework ( webwork is 
highly recomended ) and you get really cool
application
with a good performance. 

regards,

=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to