EJBs are kind of a hard way to learn java ;-)... I like Richard
Monson-Haefels EJB book ok although its getting kind of old.
I prefer to do all db access from some kind of ejb for architectural
layering reasons, so your presentation (jsp) and flow control (probably a
servlet) don't get mixed up with your data model and business operations.
So I'd put the query in a (stateless) session bean.
david jencks
On 2001.09.26 15:34:10 -0400 [EMAIL PROTECTED] wrote:
> Thats exactly what I want to do (just a query) I guess I dont have a good
> understanding of EJBs yet(or Java in general) this is not a good
> induction
> into java programing!!
> So I need to execute a query in a JSP or Jbean to fill my <option> box?!
> THANKS!
>
> -----Original Message-----
> From: David Jencks [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 26, 2001 1:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Custom finders in Jaws
>
>
> ummmm
> if you only want the last name ... you need an entity bean with only the
> last name in it?? You will have big problems if 2 people have the last
> name, usually last name is not a very good candidate key.
>
> I think maybe what you want to do here is not get a collection of entity
> beans, but to just execute a query in a session bean and get all
> (distinct?) last names (do you want an id too??) and put them as strings
> in
> a list of some kind.
>
> Finders get you a collection of entity beans, normally entity beans do
> not
> have lazy loading of fields/columns... you might be able to do this with
> ejb 2.0, but even there I doubt it is what you want.
>
> david jencks
>
> On 2001.09.26 14:04:50 -0400 [EMAIL PROTECTED] wrote:
> > Howdy, How can I declare a findByLName() in jaws, I tried this.Like the
> > docs
> > chpt 6
> > <entity>
> > <ejb-name>ClassBean</ejb-name>
> > ...
> > <finder>
> > <name>findByLName</name>
> > <query>LNAME!=null</query>
> > //What I want is for the collection to contain all lastNames from all
> > records(I guess I need a wildcard here so It will return all)
> > //Similar to a findAll() except returning only 1 column from the table.
> > </finder> </entity>
> > THANKS!!!
> > Graham
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> >
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user