• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

How to start with entity bean

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic