• 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:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

What required to run Java Bean?

 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What required to run Java Bean?
 
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jvm , perhaps u could elaborate on what u really require ?

ram.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Indeed. But let's have this conversation in "Java in General (Beginner)." I'm moving this thread over there.
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A Java Bean (not to be confused with an Enterprise Java Bean -- completely different beast) is simply a class that has a default (no-argument) constructor, can be serialized, and exposes its member variable through getters and setters.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was asked this question before but I couldn't give a straight answer. I think this thread is the right place to ask... So what IS the difference between a JavaBean and EJB?

Couldn't you have some of the the same characteristics of a bean be put into an EJB? Say I want to write a stateless session EJB; couldn't I create methods to implement business logic in either type of bean? (I'm ignoring the remote and home interfaces for now and focusing on just the beans.)
[ January 28, 2005: Message edited by: Joe Tseng ]
 
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any Java Object can be a 'bean'. The term carries vary little requirments and is minimally invasive. You must have a no-args constructor, and getters and setters for your 'properties'. That's it.


that is a 'bean'. Nice and easy.

An EJB is a monstrous beast that must be hunted down and drug through the street while we all poke it with pitchforks and ...

oh, sorry about that.
 
Joe Tseng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So from your comment, my impression is that an EJB can be a JavaBean with alot more crap piled on top of it (remote/home/local-home interfaces) that have certain aspects of its behavior and interaction controlled by the J2EE container/server, right?
 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. But I would like to put some quote from the book Better, Faster, Lighter Java.

It has a table with serveral 'golden hammers' and where they can be properly used. Part of the table is:

EJB entities

Suitable for > Nothing

Not suited for > Sane applications



EJB(stateless session beans, MDB)

Suitable for > Distributed, transactional facades
Secure, distributed transaction monitor

Not suitable for > Lightweight applications
Applications where transactions are limited to one database
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic