Originally posted by Matt Sloan:
I am using session beans to perform my business logic and what not. So in my session bean I will have a method that looks something like:
Then in my Name bean, I will have something that looks like this:
Now, here is where I have my question. In my DAO class, I have the findByName method defined, I do my sql select to retrieve the appropriate record from the database. Now, do I have to create a helper class to load the needed data in to, and add that to my collection to be returned? OR do actually return a collection of Name EJBs?
If both ways are possible, what is the 'preferred, professional or correct(according the the J2EE spec)' method of doing this?
TIA
The requirements are that this app use entity EJBs - I am thinking BMP beans since we already have all the needed sql written in a giant DAO class.
in this case findByName(name). What happens in the Name bean is we call the dao which returns a collection of plain java objects. I am wondering if we are doing it wrong - instead of the plain java objects, shouldn't we be returning a collection of ejbs?
I think, therefore I exist -- Rene Descartes
Originally posted by Valentin Tanase:
You have to return a collection of primary keys.
Originally posted by Matt Sloan:
This just blew my mind. If I return only the primary key, how do I get the data that is tied to that primary key?
Originally posted by Gemini Moses:
Matt,
Have you started the TUSC tutorial?
I am intrested in doing this tutorial.
am stuck with some setup on chapter 2.
In classpath_variable , on my eclipse I see JRE_SRC as empty where as , as per the tutorial it is having value where src.zip file is saved.
What installation gets src.zip on your machine? I dont find any on my machine.
Can someone help me with this?
Thanks,
Gemini
The requirements are that this app use entity EJBs - I am thinking BMP beans since we already have all the needed sql written in a giant DAO class.
SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Originally posted by Matt Sloan:
Ok still a bit confused.
The requirements are that this app use entity EJBs - I am thinking BMP beans since we already have all the needed sql written in a giant DAO class. We are using session beans to use the home interface and call whatever method needed - in this case findByName(name). What happens in the Name bean is we call the dao which returns a collection of plain java objects. I am wondering if we are doing it wrong - instead of the plain java objects, shouldn't we be returning a collection of ejbs?
Originally posted by Gemini Moses:
Thanks Ken for your reply.
I do not have src.zip onmy machine.
I have installed Eclipse using
eclipse-SDK-2.1-win32.zip
I also installed ,
j2eesdk-1_4-windows.exe
I am instrested in doing this application and not enjoying getting stuck with this set up stuff
Can someone give me exact links of files that I should be installing.
I am ready to uninstall everything and start again.
Awaiting reply..
Gemini
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |