JavaBeans Section Index | Page 3
What is a FileDataSource?
A FileDataSource is part of the JavaBeans Activation Framework, package javax.activation. It represents a DataSource associated with a file, that relies on a FileTypeMap to associate mime types wi...more
How can I access an already initialised (in a jsp) JavaBean with "application" scope in a standard Java class. When I try to create the bean it creates another instance of the application scoped JavaBean rather than using the one that already exists.
You need to pick up the bean out of the servlet context. Don't try to create the bean, that's why you are getting a new instance. See What servlet code corresponds to the various "scope"...more
Can we run BDK 1.0 with JDK 1.2 or JDK 1.3?
Sure you can. While the Sun site says that you must use BDK 1.0 if you are using JDK 1.1, it doesn't mean that you can't use it with later versions of the JDK. The converse of this is not true. BD...more
What is the unregbean program that comes with the Sun JDK?
The Java Plugin has a feature that allows JavaBeans to be packaged as ActiveX controls. This allows JavaBeans to be used with an ActiveX Container, for example from within Visual Basic. UnRegBean....more
Can I specify a custom class loader to load my beans?
Yes, just pass in the custom class loader to the java.beans.Beans.instantiate() method.more
How do I order my property descriptors in my custom property sheet dialog? It seems that getPropertyDescriptors() returns them in a very arbitruary fashion!!
You can't do this.
What I did was to add a custom attribute "order" to the BeanDescriptor of the BeanInfo class which specifies the order, and then my GUI tools used this property.
FAQ...more
If I set the same custom property editor for two or more properties in the same bean, how do I identify which property is being changed?
There is no standard way to know it. What you can do is implement the most you can in an abstract class that inherits from PropertyEditor and then extend it in both property editors. You could ask...more
What are the differences between Infobus and the JavaBeans Activation Framework? Why would I choose one over the other?
The InfoBus is a mechanism for sending messages between multiple components within the same JVM. In this case, it is more like the Java Message Service (JMS), another Java API for interclient mess...more
Where can I find a tutorial for a beginner to intermediate level Java Programmer to start learning about JavaBeans?
The jGuru/MageLang tutorial over at the Java Developer Connection, while from the summer of 1997 is still rather current. The API hasn't changed at all since then. Another tutorial is the JavaBean...more
With regards to JavaBeans, what is a manifest file and how is it used?
You can think of the manifest file as the Jar-file meta-data, describing the contents of the files inside the Jar. Each file in the .jar file can have an entry in the manifest file. This entry can...more
How do I generate an application when using the bean box tool?
The BeanBox tool is not really cutout for creating applications, just applets. What you can do is generate an applet and then use that applet in your own frame, calling the necessary startup metho...more
What is the difference between an ActiveX control and a JavaBean component?
An ActiveX control is a reusable component written to take advantage of Microsoft's Component Object Model (COM). They basically execute well within browsers on Windows platforms but don't work an...more
How can I access EJBs from JavaBeans Components?
In short, JavaBeans are not special; you access EJBs from JavaBeans the way you would from any other EJB client.
However, JavaBeans can be useful as a 'wrapper' for EJBs that hide some of the com...more
Is a Java Bean a server side component or client side component?
A JavaBean component can be used anywhere, either like an AWT component on the client or with a JSP page on the server. There is nothing that requires it to be one or the other. In fact, the same ...more
What is a servlet bean?
A servlet bean is a serializable servlet that follows the JavaBeans component architecture, basically offering getter/setter methods.
As long as you subclass GenericServlet/HttpServlet, you are a...more