Hi Ted,
Excuse me, perhaps i did not explain it properly (English is not my
language)
I do not want to re-make the whole code nor using it "as it" in another
way. I
talking about taking pieces (some classes) from another projects that
were
designed mostly for web-apps with less or without any persistence. I
know I can
add persistence (and ohter features) to data without using Ejb. But I
was
thinking about using Ejb (mostly for new apps not remaking the old ones)
for
these reasons:
- Multiple web-apps are asking (in some cases) for the same data. As
they
live in more than one container or context, even if they have
"application"
scope for this data they can not share it easily. Some data does not
mean much
overhead if it is asked several times, but some other queries should be
done
once (if possible) and its results remain alive.
- I could find more support from container (transaction,
persistence, etc)
if i use Ejb than make it all myself.
- Some tools offer me the possibility of using Ejb as data source,
but i
could not point them to my own program (without a lot of restrictions,
as only
one object returned or the like)
...
These are the main reasons. I was just asking for advice, not assuring
it was
the right thing :).
Carlos
Ted Neward wrote:
> Why on earth would you want to take proven code that already works for you,
> and immediately start forcing the square peg into the round hole? Why do you
> need EJB at this point for your persistence layer?
>
> Ted Neward
> {.NET || Java} Course Author & Instructor, DevelopMentor
> (http://www.develop.com)
> http://www.javageeks.com/tneward
>
> ----- Original Message -----
> From: "Carlos Alonso Vega" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 01, 2002 4:10 AM
> Subject: [EJB-INT] Recycling (possibly a silly question)
>
> > Hi all,
> >
> > Imagine that you want to "export" some proven classes that deals with
> > objects to an ejb project. This objects are build up from several
> > tables, so there is no object<->(one)table mapping. These objects are
> > not complex themselves, but takes some queries from a group a tables to
> > get them (In some way, they are summaries of a collection of data)
> >
> > I would want to use the "load" and "create" classes that already have
> > instead of recoding all queries in ejbCreate and ejbLoad methods.
> > ejbLoad would call my "load" methods and ejbCreate would do similary.
> > So, almost (if not all) Sql queries would be done outside the ejb
> > classes.
> >
> > Doing this surely is not the "right" thing, for a several reasons
> > concerning with ejb rules (for example, I would take control of database
> > access instead of letting ejbs and container do it for me)
> >
> > I would like to know if anyone has a similar experience or if there is
> > better way of doing it or if it is a completely mistake.
> >
> > Thanks in advance
> >
> >
> ===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff EJB-INTEREST". For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
> >
> >
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".