What is the difference of using JavaBean and regular classes?

Experts,
I am new to JavaBean(not EJB), and wondering what is the difference of using JavaBean for JSP page compared with using regular Java class?
I know there are Bean tags which save some lines, what else?
What does "serialization" mean compared with "not serializable"?
thanks very much.

No.
A JavaBean is a regular JavaClass that:
1) implements java.io.Serializable
2) Its data members are private, and its data is accessed via getters and setters. You must define the getters and setters. Getters retrive the property, and must be in the format:
public PropertyType getPropertyName()
for most cases. The exception is when the PropertyType is a boolean, in which case you use:
public boolean isPropertyName()
Setters assign values to the property, and are in the form:
public void setPropertyName(PropertyType propValue)
3) There is also a PropertyChangeEvent model that needs to be followed.
A marker interface has no methods you need to implement. It just marks the class as supporting certain operations. In the case of Serializable, it means the class can be written to be an ObjectOutputStream for persistant storage.
As far as an example of JavaBean persistance, take a search on the java.sun.com site for Serializeable
Also, take a look at this: http://java.sun.com/developer/onlineTraining/Beans/beans02/
It concentrates mainly on gui component beans, but not all beans need to be gui parts... There are other pages to look at, but I can't find them at the moment, and I have to run...

Similar Messages

  • What's the difference between XI basis and regular basis?

    I am an SAP basis admin for years.
    Now my corp starts to use XI.
    What is the difference between XI basis and regular basis if there is any?
    Thanks!

    Hi,
    No difference... Basis is Basis (Technical consultant)... According to me its just terminology changed. i.e. SAP Administrator instead of SAP basis.
    For XI you may need to additionally control the Java stack administartion along with ABAP stack.
    Please go thourgh the below link to know about SAP NetWeaver Administrator, then you may compare with regular Basis activities
    http://help.sap.com/saphelp_nw70/helpdata/en/7e/c82c42be6fde2ce10000000a1550b0/frameset.htm
    Also
    Refer - PI/XI administartion study material links
    PI Administration, monitoring document
    Thanks
    Swarup

  • What Is The Difference Between Budget Cost And Regular Cost For Resources?

    What's the difference betwee budget cost and regular cost for resources?
    Here is the explanation which I didn't understand from the book;
    In planning your departmental retreat, suppose you
    have specific budget targets
    for certain cost categories, $2,500
    for travel expenses, $500 for printing,
    and $1,000 for conference room rentals. Using Project’s budget resource
    feature, you can define your budget
    for different categories
    of items. You can then group your resources to
    com-pare your budgeted
    costs to your planned costs. This way, you
    can view your travel budget
    of $2,500 side by side with your planned
    costs of, say, $3,700,
    and immedi- ately see that your next
    goal is to find a way to trim those travel
    costs.

    Hi,
    You have to differenciate the proejct budget from the project cost:
    The project budget is the amount of money which has been allocated to your project by the executive board based on the estimation you provided. This is not meant to be changed unless you go through a change request process, justifying why you need to change
    (increase) the budget, meaning asking more money. Consequently it will not be related in MS Project with the tasks, assignments. It is entered on the project summary and can be meanly used in portfolio reports where you can consolidate yours budgets (you can
    have several different budgets) among a set of projects.
    The project cost is something which lives, changes along the project lifecycle. It is meant to be updated on a weekly or biweekly basis from the team members tasks updates approved by the project manager. Then the PM updates the remaining work thus the project
    cost.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |
    You say that the budget cost is total money which committee gave you for the project.
    But the book refer budget cost for every resource. I don't understand that.
    " In planning your departmental retreat, suppose you
    have specific budget targets
    for certain cost categories, $2,500
    for travel expenses, $500 for printing,
    and $1,000 for conference room rentals. Using Project’s budget resource
    feature, you can define your budget
    for different categories
    of items. You can then group your resources to
    com-pare your budgeted
    costs to your planned costs. This way, you
    can view your travel budget
    of $2,500 side by side with your planned
    costs of, say, $3,700,
    and immedi- ately see that your next
    goal is to find a way to trim those travel
    costs. "
    For example here travel budget cost is 2500 whereas planned cost is 3700. Planned cost of travel expense is created by the project manager. Who does define travel budget cost?
    Let's say an employee's cost is 20 dollars per hour and I write it on the project. So how much is this employee's budget cost, Who does define it, From whom do I learn that data?

  • What is the difference of using Invoke and without invoke for invoking delegate references .

    Lets consider the below example,
    1. Invoke the delegate reference with Invoke keyword,
    public delegate double returndel(int r);
     private void button1_Click(object sender, EventArgs e)
                returndel ret = CalculateArea;
                double yt = ret.Invoke(4);   
                MessageBox.Show(yt.ToString());
            public double CalculateArea(int r)
                return 3.14 * r * r;
    2.  Invoke the delegate reference without Invoke keyword,
    public delegate double returndel(int r);
     private void button1_Click(object sender, EventArgs e)
                returndel ret = new returndel(CalculateArea);
                double yt = ret(4);
                MessageBox.Show(yt.ToString());
     public double CalculateArea(int r)
                return 3.14 * r * r;
    What is the difference between these two ?
    Thanks and Regards
    Bijukrishnan.BS

    No difference if you just want to call single function.
    Try the following:
    public delegate void DoMyWork(int i);
    static void DoMyWork1(int i)
    Console.WriteLine(i);
    static void DoMyWork2(int i)
    Console.WriteLine(i * i);
    static void delegateTest()
    DoMyWork work = new DoMyWork(DoMyWork1);
    work += new DoMyWork(DoMyWork2);
    work.Invoke(4);
    The output would be:
    4
    16

  • What's the differences between a singleton and a class with static methods

    Hi everybody.
    My question is in the subject. Perhaps "differences" is not the good word. The positive and negative points ?
    Imagine you have to write a connection pool, sure you gonna choose a singleton but why ?
    Thank you very much.

    A class is a class. Java doesn't have (and I wish it
    did) a static outer class. Any class can extend
    another class or implement an interface.A Class object cannot extend or implement anything - it is not under programmer control in any way. You can create a class which implements interfaces, but calling static methods is completely unrelated. Interfaces only affect instance methods, not class ones. I think all of your comparison to C++ is actually confusing you more. In Java, there is a real class object at runtime, as opposed to C++.
    YATArchivist makes a good point about being able to
    serialize, altho I've not met that desire in practice.
    Maybe a concrete example would help.
    mattbunch makes another point that I don't understand.
    A class can implement an interface whether it sticks
    its data in statics or in a dobject, so I guess I
    still don't get that one.See my comment above. Static methods are free from all contractual obligations.
    I prefer instance singletons to singleton classes because they are more flexible to change. For instance I created a thread pool singleton which worked by passing the instance around, but later I needed two thread pools so I made a slight modification to the class and poof! no more singleton and 99% of my code compiled cleanly against it.
    When possible, I prefer to hand the instance off from object to object rather than have everything call Singleton.instance() since it makes changes like I mentioned earlier more feasible.

  • What is the difference between CRM basis and regular basis?

    Hi! Experts:
    Is CRM basis different from regular basis ? I mean anything extra for CRM?
    Thanks!

    Christy,
    Five years ago there was a major difference, now it really doesn't differ much from ERP.  Basically as long as you can administer a full netweaver landscape(all technical components), then you can do CRM admin.
    The CRM middleware role is sometimes a basis person, but generally most companies have a "hybrid" person for that role(think functionaltechnicallimted basis).
    Take care,
    Stephen

  • What is the difference between 'command delete' and using 'delete original and all versions'?

    My masters are not referenced and I usually have only one version.  What is the difference between using 'command delete' versus going to the top menu bar and using 'dele

    Good question  .
    When the Version is the only Version based on the Original of that Version, the two commands have the same effect.
    See this User Tip by master Aperturist Frank Caggiano.

  • What's the difference between using and 802.11a and 5GHz only?

    What's the difference between using "802.11n (802.11a compatible)" and "802.11n only (5GHz)" modes on the Airport Extreme?

    802.11a gives you 802.11g speeds but using 5GHz (54mbps
    802.11n gives you 144Mbps (600 peak) at 2.4GHz or 5GHz

  • What is the difference between sy-uline and uline in sapscripts ?

    hi guys,
    what is the difference bt sy-uline and uline in sap scripts ?
    this is an interview question ?
    also how can we draw a line without using above ?

    Hi ,
    sy-uline is a system field.
    No-difference.  Except that uline is used outside
    the Write Statement
    TO draw a line.
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    OR
    Draw a horizontal line by setting the HEIGHT in a BOX command to 0. Draw a vertical line by setting WIDTH to 0.
    /: BOX FRAME 10 TW WIDTH 0 TW HEIGHT '10' CM
    Vertical line 10 CM long
    /: BOX FRAME 10 TW WIDTH '10' CM HEIGHT 0 TW
    Horizontal line 10 CM long
    ALSO
    You can draw a line by setting the Height or Weidth to 0
    and add a frame. E.g. a horizontal line:
    /: SIZE HEIGHT '0' MM WIDTH '200' MM
    /: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100
    <i><b>Reward if helpful.</b></i>
    Regards,
    Pritha.
    Message was edited by:
            Pritha Agrawal

  • What is the difference between Topic Keywords and Index File Keywords?

    What is the difference between Topic Keywords and Index File Keywords? Any advantages to using one over the other? Do they appear differently in the generated index?
    RH9.0.2.271
    I'm using Webhelp

    Hi there
    When you create a RoboHelp project you end up with many different ancillary files that are used to store different bits of information. Many of these files bear the name you assigned to the project at the time you created it. The index file has the project name and it ends with a .HHK file extension. (HHK meaning HTML Help Keywords)
    Generally, unless you change RoboHelp's settings, you add keywords to this file and associate topics to the keywords via the Index pod. At the time you compile a CHM or generate other types of output, the file is consulted and the index is built.
    As I said earlier, the default is to add keywords to the Index file until you configure RoboHelp to add the keywords to the topics themselves. Once you change this, any keyword added will become a META tag in the topic code. If your keyword is BOFFO, the META tag would look like this:
    <meta name="MS-HKWD" content="BOFFO" />
    When the help is compiled or generated, the Index (.HHK) file is consulted as normal, but any topics containing keywords added in this manner are also added to the Index you end up with. From the appearance perspective, the end user woudn't know the difference or be able to tell. Heck, if all you ever did was interact with the Index pod, you, as an author wouldn't know either. Well, other than the fact that the icons appear differently.
    Operationally, keywords added to the topics themselves may hold an advantage in that if you were to import these topics into other projects, the Index keywords would already be present.
    Hopefully this helps... Rick

  • What is the diffrence between a javabean and  EJB

    hi!
    what is the diffrence between a javabean and entreprise jvaabeans! i mean which are the uitilization featires of eaxh one !

    i am seeking for a solution for my problem , in fact i ma trying to implement and develop an application with java that allows a certain range of IP adresses to be connected to a database server in order to extract the suitable data from the server .
    let me explain mor ethe suitation , in fact what i am loking for is to use javabeans to grant my application much more consistence and pertinence : si i am asking if it could be possible to use javabeans in my case especially if i am not trying to developp a web application but a cleint /server one allowing some services.
    The application is in fact dealing with a stock exchange market and what i am trying to do is to grant particilar registrated customers to have the informations that they need ( portofolio, currency's status, market indicators, .) also drawing some charts decribing rates, variations, and others specefic financial caracterestics .So , if we consider that this application is not a web application ( no HTTP request and no servers like apache or others ) how it is possible to use javabeans and not EJB to build the application? i mean what could be suitable and preferable to rely on and dvelop to ensure a good java application !!
    if you need more details to help you find the answer for me don't hesitate to answer me back !!
    Someone here gave me that answer
    use RMI to code the services and (Updateable) Value Objects to pass the information between tiers.
    RMI is an all-java distributed component framework (ie. EJB, CORBA, DCE/RPC, DCOM, etc.), that is very suitable for developing non-containerized multi-tier applications. Refer to the RMI trail in the Java Tutorial as a starting point for coding RMI solutions (http://java.sun.com/docs/books/tutorial/index.html). Under this scenario you would code the database access service as an RMI service (server-side). Client/server communication should be facilitated through the use of JavaBeans/classes that wrap the information being passed (customer information, portfolio details, market information, etc.) - these are refered to as 'Updateable Value Objects' (a design pattern). Graphing and charting would be handled in your client from the information received from the (RMI) server. GUI JavaBeans can be used to provide this functionality as well as other client-side services. There are numerous "shrink-wrapped" components for GUIs available on the market just peruse any Java magazine to find them.
    but how comes? how can i do it !! and where can i find more information please about 'Updateable Value Object "
    thanks

  • What is the difference between HUI emulation and MMC?

    This may help clear up my issues with dm24 & LE. I am trying to have channels 1-24 of the Tascam dm 24
    control volume and pan..etc for tracks 1-24 of LE (AUDIO, Midi and or softsyths, inst), without having to use the mouse to select the LE tracks directly. In other words I need to use the dm24 as a control surface. What is the difference in using mmc to do this versus Control surface. I cannot locate the proper compatible driver or whatever it needs to get this to work in LE.. I even tried using the dm24 macro environment found on tascams site .. all it does is allow me to see the faders move in the environment( bidirectionaly) , but I cannot interact with the actual LE audio, midi and softsyth tracks , unless I actually select the tracks with the mouse, I do not need the dm24 do do this , as this was possible with my KX controller using the volume slider. It appears as if I may have a total lack of understanding of the dm 24 functions regarding using it as a control surface for LE 7.2.3

    Like previously stated, refurbished can mean many things.  Someone may buy a camera and when they get it have buyers remorse and return it unused, but, once Canon gets it back they have to completely check it out to make sure it meets specs and then they sell it as refurbished.  You might get a camera with 0 shutter actuations but you might get one with 1000 or more shutter actuations.  Either way Canon completely rechecks each camera before they sell it.  I have bought 2 refurbished DSLRs from Canon and they have both been great cameras.  You couldn't tell if they had ever been used or not.  Recently Canon started offering a 1 year warranty on refurbished DSLRs but I am not sure if that applies to other models or not.
    Joe

  • What is the difference between Video-out and mirroring?

    What is the difference between Video-out and mirroring? I can't get iPhone 4 video to work on my TV screen
    I have just bought an MD098ZM/A (Apple 30-pin Digital AV Adapter). I am struggling to get it to show a picture on my TV. I know I'm doing something right because the audio is coming out of my TV speakers but no picture on the TV screen.
    I have used the same HDMI channel (on the TV side) with the same cable and my thunderbolt port (MacBook Air) without any trouble - and on the same app (BBC iPlayer download then full-screen mode).
    Now I note that the packaging for the MD098ZM/A says video-out on iPhone 4 but mirroring only on iPhone 4S. I only have an iPhone 4 (not the 4S). Now if the lack of iPhone 4 support for mirroring means that I can't play video material out to my TV, then in what sense is there any video-out capability at all?
    There is only safety and warranty paperwork in the Apple adapter packaging - no help information. And I haven't found further guidance online either.
    I do note somewhere online that it suggests that basic non-mirroring video-out (for this adapter) only works with some external TV sets. Any way of finding out which? I'm using a Sanyo CE32LD90-B LCD TV if it helps.
    So far not doing very well.

    Now found these but have had to give up on this adapter!
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
    http://support.apple.com/kb/HT4108

  • What is the difference between jsp :include and server side include

    what is the difference between jsp :include and server side include(request dispatcher include method)????
    i understand that both request dispatcher include method and jsp:include take dynamic data,so when would one use request dispatcher include and when jsp:include.
    Is the usage interchangeable?i believe jsp include is used only for jsp/html but include directive can be used to include servlets ,jsp and html....correct me if i m wrong and
    do suggest if u hav ny other diff in this context...

    The difference really is: in what format do you want your inclusions? If your environment has many Java developers and only a few designers that focus mainly on, say, Flash, that might push you more towards the server-side include() directive. Or, if you have a large set of pages that receive dynamic content that is displayed in a consistent fashion (such as a workflow header area on a page).
    If, on the other hand, you have more web designers, there may be a greater desire to deal in markup rather than Java code. Java developers themselves might prefer to view markup (JSP) that more resembles the eventual output than something occuring in Java code.
    Finally, there are considerations of tiering. While it is totally possible to (and I have previously) implement 'view classes' that render markup or generate layout templates, JSP's offer, IMO, a subtle, psychological advantage. By forcing a developer to work in a different format, markup versus Java source, the separation on view from controller and model becomes a bit easier. It is still possible to make mistakes, but if a developer at some point notices, "Wait, I'm in a JSP, should I be importing a java.sql class?", then the choice to use JSP includes has paid off in spades.
    - Saish

  • In OSX Activity Monitor, what's the difference between 'free' memory and 'inactive' memory

    In OS X Activity Monitor, what's the difference between 'free' memory and 'inactive' memory. My daughters 2Gb MacBook Pro is very slow, it probably needs more memory but there is almost 1Gb of 'inactive' memory but no 'free' memory when an application is opened.
    Thanks

    Free RAM is the one that has not been used by any application since you started up your Mac, and inactive RAM is the one that was used by an application and it is not in use anymore.
    1 GB of inactive RAM is a lot, and it may be the cause of the slowness. There are a lot of apps that allows you to turn inactive into free RAM. I use FreeMemory, but have a look at the Mac App Store.
    If you are a developer, you can do that with a command you can type into Terminal:
    sudo purge

Maybe you are looking for

  • Missing required files (cannot run iTunes)

    Hey guys, every time I finish installing iTunes and try to open it, I get an error saying "iTunes cannot run because some of its required files are missing. Please reinstall iTunes" I've un-install/re-installed/fixed iTunes but the same error message

  • The computer wont boot from original boot disc

    I replaced the dead hard drive with a new hard drive. I used a disc utility to format the drive. But the computer keeps on spitting out the dvd when I try to reinstall the OS from the original disc. And yes I'm holding down the "c" key.

  • How to enable in-app purchases with restrictions

    We are setting up a group of 17 ipads. We did enable restrictions with a password and when we disable the restrictions it will not allow us to make changes. We are trying to add in-app purchases.

  • After effects and photoshop ,,,help please

    hi all can anybody help please. ive been making a short film with my son and putting some basic effects in, just for a laugh. i noticed an effect on ADOBE TV that was done by Gareth Edwards in his movie MONSTERS which i thought would be good to try o

  • Macbook pro itunes not recognising ipad 2

    cant get macbook pro to see ipad 2 in itunes - iphoto comes up overtime but no itunes for syncing