Hi Julio Cesar,

        I see a number of options for you in this situation:

1. Provide a SSB which accesses the DB directly (using SELECTs from
multiple tables in a single SQL statement) to retrieve the
information for display purposes, but update in the same way through
your Entity EJBs. This is assuming that you are not updating the
CustomerName or ProductName, which would not make much sense. You can
model the SSB as an extension of the VIEW on the server and provide
value objects which capture the extended set of data required for
passing to the client.

2. Follow the Weblogic Read-Mostly Entity pattern and create
alternative Read-Only CMP based entities which take their data
from a View in the DB which includes the extra columns. There is
very good documentation on the BEA site on implementing Read-Only/
Read-Write/Read-Mostly EJBs. Updates would be done through read-write
CMP EJBs which represented the original tables.

http://e-docs.bea.com/wls/docs61////ejb/EJB_environment.html#1074846


In both cases you are providing a rapid READ-ONLY view of the data
for initial display purposes.

Regards

DGA


> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development [mailto:EJB-
> [EMAIL PROTECTED]] On Behalf Of SAMINATHAN
> Sent: 19 February 2002 05:38
> To: [EMAIL PROTECTED]
> Subject: Re: [EJB-INT] Question about loading adtional attributes
>
> hi
>
>    Are you using JTable (Swing) kind of grid in your JSP page? if yes
,
> are
> you using any third party software for getting editable Grid.Since our
> application also is exactly same like yours, we are using Swing Client
to
> handle the huge data.
> And to be best of my knowledge CMP is not capable of handling such
> complexities.So we are using BMP.
>
> thanks and regards
> saminathan
>
>
> ----- Original Message -----
> From: "Julio Cesar Macavilca" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 13, 2002 6:04 AM
> Subject: Question about loading adtional attributes
>
>
> > Hello
> >
> > We are developing a large application in what the user in mayority
of
> cases
> > perform tasks like edting documents as an Invoice (it means Invoice
and
> > Items), but in fact more complex documents than a single
master-detail
> > Invoie.
> >
> > Imagine following tables:
> >
> > Invoice table:
> > -------------
> > InvoiceId
> > CustomerId
> > Date
> > etc
> >
> > InvoiceItem table
> > ------------------
> > InvoiceId
> > InvoiceItemId
> > ProductId
> > Quantity
> > etc
> >
> >
> > In many of our jsp pages (we are using struts) we have :
> >
> > (1) One record that represents Invoice row (Master)  enabled for
editing
> > ---------------------------------------------------------
> > | InvoiceId  |  CustomerId  |  *CustomerName*  |  Date  |
> > ---------------------------------------------------------
> >
> > (2) Many Items rows (Detail) on a grid allowed to edit too
> > ----------------------------------------------------------------
> > | InvoiceId | InvoiceItemId | ProductId | *ProductName* |  Qty |
> > ----------------------------------------------------------------
> >
> >
> > Note : We need to display two aditional Attributes : *CustomerName*
and
> > *ProductName*  from other tables
> >
> >
> > In order to implement all this:
> >
> > 1) On EJB tier : We implement Invoice and InvoiceItem as EJB CMP
> >    with relations among them
> > 2) On EJB tier : We copy Invoice InvoiceItem to ValueObjects
> > 3)             : Value Objects are sent to Web tier
> > 4) On Web tier : Value value fills JSP form
> > 5) On Web tier : JSP is displayed
> >
> > 6) Begins backward steps in order to update EJB's ....
> >
> >
> > Note that in one of this steps we need to populate the 'aditional
> attributes
> > *CustomerName* and *ProductName*'. Here we have two possibilities :
> >
> > a) Between steps 1) and 2), after ejbLoad we can perfom
> >    additional query in order to obtain adtional attribute
> >    for each entity, or instantiate aditional EJB to retrieve
> >    it's attributes
> > b) On step 4) we can perfom the same additional query in order
> >    to obtain adtional attribute for each value object
> >
> >
> > This will work, but it must be not performant, note that for each
entity
> we
> > need to execute aditional.
> > I suppose there must be any way in what I can perform a single query
and
> > obtain all attributes needed but it broke my EJB CMP (by example a
> select
> > joined some tables like SELECT ... FROM InvoiceItem, Product...).
> > I think on catching some tables too, I can do it for some, but it is
> > impossible to catching all Products or Customer table.
> >
> > I read that frameworks like BC4J from Oracle or Data Express from
> Borland
> > offers this.
> >
> > We are using Oracle and WebLogic6.1 if this helps.
> >
> > Any ideas or comments??
> >
> > file://Julio
> >
> >
>
========================================================================
==
> =
> > 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".

Reply via email to