aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes How to start with entity bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to start with entity bean" Watch "How to start with entity bean" New topic
Author

How to start with entity bean

pardha saradhi
Ranch Hand

Joined: Nov 08, 2001
Posts: 52
Hi I am new to EJB. I could successfully execute stateless and statefull session beans. Now have to start with Entity bean. I have gone thru some examples on site but they seems to be very confusting and tough.
Can any one tell me how to start with entity bean? where can I get simple examples with database design?
Can I go with MSsql?
If any one has the sample code please send me that to saradhi74@yahoo.com
Thanking you in advance
Saradhi


*** Share and let share ***
Mathias Andrae
Greenhorn

Joined: Feb 04, 2002
Posts: 23
The most important is to read the tutorial of your application server and your deployment tool.
you have to find out, how to connect table and bean...
the entity-bean itself is easier than a session bean.
Conrad D'Cruz
Greenhorn

Joined: Jan 22, 2002
Posts: 14
Originally posted by saradhi java:
Hi I am new to EJB. I could successfully execute stateless and statefull session beans. Now have to start with Entity bean. I have gone thru some examples on site but they seems to be very confusting and tough.
Can any one tell me how to start with entity bean? where can I get simple examples with database design?
Can I go with MSsql?
If any one has the sample code please send me that to saradhi74@yahoo.com
Thanking you in advance
Saradhi

Could you provide some details on the container
(i.e. web application server that you are using)
Yes Entity Beans are a little bit more
challenging to understand and write.
When dealing with Entity Beans you have
two choices for persistence .. Container
Managed or Bean Managed. The Deployment
Descriptor allows you to declare which
one you use to communciate with the database.
From my experience ... you need to know
SQL very well to write BMP Entity Beans.
For CMP, the container handles most of
the nitty gritty details of SQL. If you are
writing custom finders for CMP it does
get a little complicated but manageable with
some practice.
The tutorials on java.sun.com are a great
way to get your feet wet with EJBs. Lots
of sample code and good examples.
You can go with pretty much any ODBC compliant database because (hopefully) the container/web app server is using JDBC and you can get away
with using the jdbc dbc bridge. If you have the type 4 MSSQL (Microsoft SQL server) jdbc driver, you will learn a Entity Beans a lot faster :-) not really, but the database access will be faster.
If you don't have a type 4 driver and would
like to have the right environment for learning JDBC and EJB, you should take a look at MySQL.
Very powerful full feature OpenSource RDBMS and it is
priced just right $0.00. You can download the jar file that has the JDBC driver from the web site
http://www.mysql.com/

Conrad
Karl Laird
Ranch Hand

Joined: Jul 14, 2001
Posts: 67
I concur entirely - start with CMP managed entity beans and you should find things alot easier. Which version of SQL server? SQL Server 2000 has (currently) free JDBC drivers available from microsoft, other versions things can be a bit more difficult. I would also agree that another database like mySQL where the drivers are easier to source is a definate benefit.
If you want to easily see entity beans in action grab the trial enterprise version of Forte or JBuilder from their respective sites. This then allows you to autogenerate the beans from the database schema. Then at least you can play around with some working example beans


The Eagle sneers at the Peacock<p>Systems Administrator<br />OrderWare Solutions Ltd<br /><a href="http://www.orderware.net" target="_blank" rel="nofollow">http://www.orderware.net</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to start with entity bean
 
Similar Threads
Loading and Caching Entity Beans
Wrapp entity bean
Deploying Entity Beans in Bluestone UBS 7.2 Server
How do you map a table to a collection of Entity Beans
Why Entity Bean is crap ?