Speakers Mark Davidson (markd) and Onno Kluyt
(Onno)
Moderator Edward Ort (MDR-edO)
This is a moderated forum.
MDR-edO: Welcome to Java Live! Our guests today are Mark
Davidson and Onno Kluyt, members of the Sun JavaBeansTM team. They'll answer any question you have about
the Javabeans component architecture in the JavaTM platform. So let's begin.
Keith Garry Boyc: I have been able to write a javabean
and succesfully package it, but when I attempt to imbed it in activex container
on NT using either jdk1.3 or jdk 1.2.2 it GPFs. Any ideas about this?
markd: Unfortunately, the ActiveX bridge technology is in the
hands of the Java Plugin team. I can't answer your question. Sorry.
Margie: I can't get anything to work.
EdO: Margie, can you be more
specific?
Margie: I wish I could. I am new to Java, even though
I have been trying to get it to work for me since the beginning of this year.
The last language I programmed in was Turbo-C about 6 years ago. Everything has
changed so much it makes me feel like I don't know anything. First of all, what
is the directory structure I need for Java to work best?
EdO: Margie, there are some excellent tutorials available for
Java. You might want to go to the JDC Docs & Training page and look at the
available tutorials.
Michael: I am somewhat familiar with JavaBeans. My
experience with them has been in conjunction with IBM Visual Age for Java and
JBuilder3. I've mostly utilized them but never created them. In the materials I
have found outside the Sun tutorials a comparison is always made to ActiveX
components. Is this a fair comparison? Do they compete on the same level?
Onno: There are similarities, both are component models.
JavaBeans has, of course, many advantages: - it is part of the Java programming
language, no new APIs to learn - it is self-describing - it really is
objected-oriented (contrary to ActiveX) - it is platform independent.
Keith Garry Boyc: in ClassCompiler.java in activex
bridge there is code like following p =
Runtime.getRuntime().exec("javac " + args[0]+ " "
+ args[1]+ " "+ args[2]+ " "+ args[3]
); This causes javac to run to compile adaptor class. javac
runs but never compiles or returns control to beanbox there is thus no way to
test bean in beanbox. Is there any work around for this?
Onno: Keith, you may want to post that question to
bridge-comments@eng.sun.com.
EdO: We've got two excellent guests, but no technical questions
in the queue. So if you have a question about JavaBeans questions, please ask
away!
Onno: Currently we are in the investigative stage for Merlin
(version 1.4). Do you have JavaBeans related things you like us to see do for
that upgrade release?
Keith Garry Boyc: Is the Sun philosophy behind
Javabeans to cause the programming community to switch from programming activex
controls to programming platform independent Javabeans? If so, why so far I have
seen no dedicated javabean container. In addition, the only application of
Javabean technology that I've been able to get to work is on the web. Is that
Sun's primary purpose for javabeans technology?
Onno: Yes, please write once run anywhere! JavaBeans containers
exist in many forms. For example there are applications like TaskForce by
SevenMountains, LEIF by DTAI, WorkSpace by Digital Harbor and others that
provide an application framework within which they reuse other peoples
components for the vertical functionality, like TimeCruiser by WebMan,
ICESoft's ICEBrowser, KL Group's and Protoview's componetn suites. Also in many
cases enterprises compose and compile Beans into applications and or applets.
Michael: Is Sun planning to release a more advanced
JavaBean toolkit? Is Sun planning to compete in this market?
Onno: Michael, as you may have read, Sun acquired Forte. It is
important for Sun to provide a complete solution to its enterprise customers.
In the case of the Java platform this goes as well. However, here the
partnerships with folks like IBM, Symantec, Inprise, NetBeans and others are
very important to help them make their tool successful.
JoeSam: I've created a graphical percentage bean and a
demo program. For the demo, I don't want the bean to be persistent. The
obvious means to me was to override serialization, but some IDEs, like
VisualAge, use initialization code. I used some mumbo jumbo trick code, but
later saw something in the spec about specifying "hidden-state" in the Bean
Descriptor. Would this, in conjunction with overriding serialization solve the
problem or can you describe a better means?
markd: We are coming up with a better mechanism for the storage
and retrieval of Beans. This technology was introduced at the last JavaOne by
Phillip Milne and is a text based persistance mechanism. The output could be
XML, "BeanScript" of any other storage mechanism. This format is immutable to
changes in the JDK and will be the suggesed method for Bean storage in the
future. This technology will be released within a new "BeanBox" on the Swing
connection in the near future. Please keep a watchfull eye on the Swing
connection (http://java.sun.com/products/jfc/tsc) for details.
JoeSam: Sorry, my point was meant to be that I don't
want the bean class included in a demo to be useable by potential customers.
Otherwise they could just grab the demo bean and go without ever purchasing it.
Just to keep honest people honest.
Onno: JoeSam, the Java programming language is not really
different than any other platform. You can use code obfuscation to make it
harder to reverse engineer your product, you can timestamp the demo so that it
expires, you can disable save/print and other functionality in the demo version.
markd: I'm currently designing a new BeanBox using all the
Swing components for the swing components. It's a lightweight GUI builder that
uses the new 1.3 java.lang.reflect.Proxy class to generate event
adapters on the fly. We are releasing this as a demonstration of new
SwingBeanInfo technology (re: @beaninfo javadoc tags0 and Phillip Milne's XML
persistance mechanism. Hopefully this tool will instruct people about how the
Introspection of Methods, Properties can create a dynamic application.
markd: Do any of you depend on serialization for persistance?
JoeSam: Yes or I did.
markd: In response to your point about "hidden state"
persistance in Serialization, the new Beans persistance mechanism will only save
the public state of the bean.
Keith Garry Boyc: Onno, wrt investigative stage for
version 1.4 and what new features we would like. I think it's great that Sun
has the technology and ability to compete with Microsoft, but it is my
experience that after spending the time and effort to circumvent programming in
Microsoft's SDK and making beans instead of activex controls, much of the
promised functionality is not delivered. Lot's doesn't work. (eg: Activex
bridging, Testing of beans) Also things are getting confusing. On my PC alone
there are about 4 Java Virtual Machines1 some of
which automatically download off the web to excute Javabeans. Isn't it in Sun's
interest to get a really stable application development platform rather than to
keep releasing new versions of software? Instead of the complexity of
maintaining code on different platforms there is now the complexity of
maintaining code on different virtual machines? Is this really much better? Also
with respect to open source. In your opinion is Java open source? Would Sun not
benifit from the user community helping Sun to bring the technology forward?
Onno: Keith, I think we are getting a lot better about
delivering stable technology. Take for example Kestrel, which is currently in
beta. It is a lot faster than previous JDK's; it is smaller and it is certainly
for a beta release pretty stable. For the Java platform we use the community
source licensing model instead of open source to assure compatility and
compliance among all the different implementations.
JoeSam: In fact, I'm looking at the spec and it says
"All beans must support either Serialization or Externalization. It is always
valid for an application to save and restore the state of a bean using the Java
Seri-alization APIs. (The serialization APIs handle both Serializable and
Externalizable objects.)"
Onno: JoeSam, you are correct. The current spec requires
serialization. The scheme Mark is referring to is experimental work. It is an
alternative to persist graphs of Beans. Serialization is still and will remain
key to the Java Platform. Not only thee Beans spec requires it but also RMI and
JNI depend on it.
EdO: We have about 15 minutes left in the scheduled session. So
ask your questions now.
Keith Garry Boyc: markd, How soon will you release the
new beanbox? Are you aware of the issues I reported with the previous beanbox?
Will you address and fix them? Is there a beanbox buglist? In the new beanbox
will you be able to call methods with arguments? The current beanbox does not
seem to support this.
markd: The tool that I mentioned will illustrate the new
archiving mechanism. It will also illustrate method hookup between beans with
arguments. You can submit bugs against the BeanBox in the Bug parade against
classes_beans. You can also send email to java-beans@eng.sun.com with your
findings and suggestions.
Keith Garry Boyc: I am told that a JVM is spawned for
every Javabean that I embed. Is Sun working on a JVM that will act as a server
for all calls to jvm on a particular machine?
markd: When you create an application with multiple Beans, then
it runs in one VM. You could probably use RMI to get mulitple Vm's to
communicate with eachother.
EdO: Less than 10 minutes to go. Now or never!
Keith Garry Boyc: I understand if you create an
application with multiple Beans it runs in one VM but if you have multiple
applications then how can you reduce system resource requirements and allow them
all to use a server VM? Is sun working on anything like that?
Onno: For a future version, possibly Merlin, we are
investigating running multiple processes on one VM. Currently we are looking
into security requirements, load balancing, and the likes. I don't know the
email alias for this release from the top of my head. If this is important to
you, send your wishes and requirements for this capability to
java-beans@eng.sun.com and I will forward it to the appropriate team.
Keith Garry Boyc: Have any of you personally ever
since 1.2.2 ever embeded a Javabean in an activex container? If so what were
your experience? Did it work? What was the performance like in the app?
EdO: Keith's question is open for anyone in the audience to
answer.
EdO: Well, we're at the end of the hour. I want to thank you
for participating in the chat. And I want to especially thank our guests Mark
and Onno.
Onno: Folks, thanks for joining us. If you have suggestions,
comments on JavaBeans you can reach us via our alias: java-beans@eng.sun.com.
EdO: Signing off.
EdO: Last moderator (me) signing off. The forum is now
unmoderated
Max number of users at any time 17
_______
1 As used on this web site,
the terms "Java virtual
machine" or "JVM" mean a virtual machine
for the Java platform.
Reader Feedback
Tell us what you think of this transcript.