Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Chat

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
Print Button
 
Office Hours Transcripts Index

Office Hours:
Introduction to the JavaBeans API
August 12, 1999

Moderator (MDR): Tim Rohaly of the MageLang Institute

MDR-rohaly: Hello, I'm Tim Rohaly, from the MageLang Institute, and I'd like to welcome you to the JDC for this discussion.

Today we are holding office hours for the on-line training short course "Introduction to the JavaBeans API," which is posted on the JDC at: JavaBeans. I encourage you to ask any questions about the course material or the practical excercises. I will also be happy to answer any questions about JavaBeans in general.

Ruby: Hi Mr. Rohaly, I am new to Java Bean Development. I have been reading the bean api since I read in JMX that both the models are similar. I figure I could use some more information. Thanz. Ruby

rohaly: One place you can start is, of course, the JavaBeans short course here on the JDC at This short course includes self-paced practical exercises with included solutions. These are designed to give you some experience developing some simple beans. Is there anything specific I can help you with?

GoSun: Hi Mr Rohaly, I have a question which may not be directly related to JavaBeans. The way singleton pattern is used requires all the constructors be private and instead provide one accessor method. Also bean specification requires that there should be no arg constructor so that during de-serialization the system can construct the object using that constructor first. Does this mean we have problem trying to serialize singleton objects ?

rohaly: Actually, the JavaBeans specification does not require a no-arg constructor, although the spec. does say a JavaBean component must implement either Serializable or Externalizable. In the case of Externalizable, the Serialization spec. mandates a public no-arg constructor. It is quite possible to have a JavaBean that is a singleton. But you have to be clear on what role you intend this JavaBean to perform, and how you define the state of a singleton object. Remember, static data does not get serialized. Singletons also don't require that the constructor be private, although this is a common way to implement them. Do you have a specific case where you are trying to do this and are having trouble?

rohaly: One other thing... It is probably good practice to write your JavaBean with a public no-arg constructor, even if the spec. doesn't require it. This is because IDE's tend to choke on JavaBeans that don't have this. Think of it as a practical requirement rather than a mandate; one brought on by a weakness in the available tools.

Franco: Hello Mr. Rohaly, I am looking for a source of information that will help me develop a Java applet that will access MS Excel Spreadsheet and to do MAPI calls.Is JavaBeans the right place for me to start or do youy have another suggestion. franco

rohaly: I don't think that JavaBeans is the right place to start. If you're doing this as anything but a learning exercise, I would suggest trying one of the third-party products (class libraries) that lets you do this. I don't have any names for you off the top of my head, but I know there are several companies who sell Java classes to allow you to access Excel spreadsheets - try a search engine.

rohaly: Well, our time is up for this week. You may join us again in two weeks on 26 Aug at 11AM PDT for another JavaBeans short course office hour. Thanks for coming.

Franco: No I have an application that currently reads excel spreadsheets. My client wants to Web enable the application. Thanks for your help.

rohaly: Then one of the third-party product should do just fine for you.

Forum closed at Thu Aug 12 12:05:49 1999

Max number of users at any time: 3

coffeecup


Reader Feedback

Tell us what you think of this transcript.

Duke

Very worth reading Worth reading Not worth reading

If you have other comments or ideas for future articles, please type them here:


Print Button
[ This page was updated: 21-Sep-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary | Feedback | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.