<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Michael Nascimento Santos&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/" />
<modified>2008-05-07T01:54:40Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/mister__m/74</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2008, mister__m</copyright>
<entry>
<title>Special limited offer: extra seats for Date &amp; Time session repeat</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2008/05/special_offer_l.html" />
<modified>2008-05-07T01:54:40Z</modified>
<issued>2008-05-07T01:54:40Z</issued>
<id>tag:weblogs.java.net,2008:/blog/mister__m/74.9720</id>
<created>2008-05-07T01:54:40Z</created>
<summary type="text/plain">If you couldn&apos;t get pre-enrolled to our session before, rush up: there are a few extra seats available</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>JavaOne</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>Those of you following my work are probably aware we'll be presenting a <a href="https://www28.cplan.com/cc191/sessions_catalog.jsp?ilc=191-1&ilg=english&isort=&isort_type=&is=yes&icriteria1=+&icriteria2=+&icriteria9=ts-6578&icriteria8=&icriteria3=">JavaOne session</a> about <a href="https://jsr-310.dev.java.net">JSR 310</a>, aka the new Date & Time API. The original session got full a few weeks ago, so a repeat was scheduled a few days ago. Unfortunately, it also got full last week.</p>
<p>The good news is that our Thursday session was moved to a larger room, so now there are around 60 seats available. So, if you are interested, rush up: <a href="http://www.cplan.com/javaone2008/schedulebuilder/">login to Schedule Builder</a> and secure your seat, cause it seems Date & Time is hotter than people assume ;-)</p>]]>

</content>
</entry>
<entry>
<title>Making your components work nicer inside Matisse</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2008/02/making_your_com.html" />
<modified>2008-02-20T15:20:33Z</modified>
<issued>2008-02-20T15:20:23Z</issued>
<id>tag:weblogs.java.net,2008:/blog/mister__m/74.9237</id>
<created>2008-02-20T15:20:23Z</created>
<summary type="text/plain">Have you developed the killer component for your application, but it takes too long to load inside Matisse? Or worse - you face class loading errors since it has too many weird dependencies? Well, here is a small tip to make it work faster and without much hassle...</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>A co-worker had been developing some nice-looking custom components for a customer project. It was tightly integrated with the backend logic, though, so he tried to use it with Matisse, there were several issues, from class loading errors to slowness, since the component was trying to do its "real task" inside the designer.</p>
<p>So, when he told me that, I immediately recalled a trick I came to know way back in 1999, while I was struggling with Java and Swing for the first time. The <code>java.beans</code> package comes with a class named <code>Beans</code> that comes with a bunch of static utility methods. One of them, <a href="http://java.sun.com/javase/6/docs/api/java/beans/Beans.html#isDesignTime()" >isDesignTime()</a>, let your component find out if it's being used in preview mode.</p>
<p>He changed the component constructor to check for design time and skip the "black magic" section. It worked like a charm and he said it was the best tip I gave him last year. So now I've finally had the time to blog again, I thought it would be an interesting tip to share :-)</p>]]>

</content>
</entry>
<entry>
<title>Desktop development made easier with genesis</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/06/desktop_develop.html" />
<modified>2007-06-21T22:45:08Z</modified>
<issued>2007-06-21T22:43:17Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.7624</id>
<created>2007-06-21T22:43:17Z</created>
<summary type="text/plain">genesis 3 has just been released. This post explains what genesis is about and why you should consider it for your Swing, SWT or Thinlet application.</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>It's been quite a while since the last time I mentioned <a href="https://genesis.dev.java.net">genesis</a> here. One of the reasons is I've been working on it a lot and there isn't much time left to blog about it. Hopefully I will be able to do so more often.</p>
<p>We have just released genesis 3.0 after almost two years and a half of development. genesis is all about making the development of enterprise desktop applications easier. To accomplish that, genesis provides UI-related features and also a neat way of building and integrating with the back-end of your application. For now, let's focus on the desktop itself.</p>
<p>genesis 3.0 comes with full support for Swing, SWT and Thinlet. It supports binding, validation, actions and conditions. Let us say that for the desktop it tries to address nearly the same problem space as JSR-295 (Beans Binding), JSR-296 (Swing Application Framework) <code>@Action</code>s and JSR-303 (Bean Validation), but there are enough conceptual differences between them (besides supporting SWT and Thinlet out of the box, of course). I've already explained the <a href="http://weblogs.java.net/blog/mister__m/archive/2006/08/swing_made_easy_1.html">basic UI binding</a> functionality last year, so here I will try to show why the genesis approach is better.</p>
<p>First, genesis works with an UI model, instead of plain binding. This means your JavaBean represents the UI data plus the presentation logic behind it. It makes your presentation logic UI toolkit-independent, testable and self-contained. It also doesn't require PropertyChangeListeners at all. Consider the most basic binding example in genesis docs:</p>
<blockquote><pre>
@Form
public class LoginForm {
   private String user;
   private String password;

   public String getUser() {
      return user;
   }

   public void setUser(String user) {
      this.user = user;
   }

   public String getPassword() {
      return password;
   }

   public void setPassword(String password) {
      this.password = password;
   }

   @Action
   public void login() {
      System.out.println(getUser());
      System.out.println(getPassword());
   }

   @Action
   public void clear() {
      setUser(null);
      setPassword(null);
   }
}
</pre></blockquote>
<p>If you were to do the same with JSRs 295 and 296, you would have to create a JavaBean with PropertyChangeListener support, fire property changes on setters and also create two <code>@Action</code> methods in your view that access your bean. As the number of properties, beans and actions involved in a view increases, your code with genesis would still be self-contained and testable, while JSR-295 would require individual bindings to be produced and your actions would be tightly coupled with Swing, manipulating your beans as value objects.</p>
<p>genesis also comes with some unique features of its own, such as declarative conditions. Let's analyze the classic dependent comboboxes issue: whenever the selected country changes, the state list should be reloaded. Here is what it takes to implement this with genesis:</p>
<blockquote><pre>
@Form
public class StateSelectionForm {
   private Country country;
   private State state;

   @DataProvider(widgetName="countryTable", objectField="country")
   public List<Country> populateCountries() {
      return // business logic to retrieve countries
   }

   public Country getCountry() {
      return country;
   }

   public void setCountry(Country country) {
      this.country = country;
   }

   @DataProvider(widgetName="stateTable", objectField="state")
   @CallWhen("genesis.hasChanged('form:country')")
   public List<State> populateStates() {
      return // business logic to retrieve states
      // Notice getCountry() will return the selected country
   }

   public State getState() {
      return state;
   }

   public void setState(State state) {
      this.state = state;
   }
}
</pre></blockquote>

<p>So genesis will automatically invoke the <code>stateTable @DataProvider</code> whenever the selected country changes.</p>
<p>There are many other features and things to explore and I hope I can show them here in the next few days. The <a href="https://genesis.dev.java.net/servlets/SummarizeList?listName=usuarios">Brazilian Portuguese users list</a> is quite active these days and there is of course an <a href="mailto:users@genesis.dev.java.net">English users list</a>. Check out <a href="https://genesis.dev.java.net/nonav/3.0/en/">genesis</a> and let me know what you think.</a>]]>

</content>
</entry>
<entry>
<title>Final JavaOne report</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/05/final_javaone_r.html" />
<modified>2007-05-17T11:44:52Z</modified>
<issued>2007-05-16T22:51:44Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.7424</id>
<created>2007-05-16T22:51:44Z</created>
<summary type="text/plain">The final installment about JavaOne sessions, BOFs - including mine! - and interaction with other folks.</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>Ok, so after a long trip home, I finally managed to write the final installment about JavaOne.</p>
<p>In the morning, I attended Gavin King and Bob Lee's talk about Web Beans. The coolest thing about Web Beans is actually its dependency-injection support and the rich lifecycle model they are proposing. It is actually a merge between Seam and Guice strategies. It would be applicable to any kind of application, not only web-based, so my question was if they intended to split the spec so these features could be used, well, anywhere. They like the idea, but it is too soon to say. Let's hope they eventually do it. Watch out, Spring!</p>
<p>Then I attended the Effective Java Reloaded session. I haven't attended the 2006 session, but a few folks said it was too similar to last year's talk. I've already applied - and advocated - many best practices suggested during the talk, specially making everything <code>final</code>. By the way, Gavin, Bob and Joshua are great speakers and members of this group were in short supply this year. Sigh.</p>
<p>In the afternoon, I've (accidentally) spent some time with some NetBeans guys. First Roman Strobl:</p>
<img src="https://bloggers.dev.java.net/files/documents/84/57854/michael_roman.jpg" />
<p>I've told him a little bit more about my <a href="http://weblogs.java.net/blog/mister__m/archive/2007/05/new_genesis_rel.html">NetBeans pledge</a> (expect a follow-up post about it). Then I came across Geertjan again, that showed me his musical notepad (you can find it at <a href="https://nbjfuguesupport.dev.java.net/">nbjfuguesupport</a>). Guilherme Silveira was passing by and decided to make a video about it. He posted the <a href="http://www.youtube.com/watch?v=TPIAoLdQR5w">first part in YouTube</a> and hopefully he will upload the second part soon.</p>
<p>After that, I've attended the last few minutes of the session named "Stress Your Web App Before It Stresses You: Tools and Techniques for Extreme Web Testing". It was quite packed and it seems people liked it a lot. So, no need to be worried, <a href="http://weblogs.java.net/blog/felipeal/archive/2007/05/the_stress_is_o.html">Felipe</a>!</p>
<p>Basically I spent most of the time in the afternoon and early in the evening. Then, I was at the <a href="https://java-champions.dev.java.net">Java Champions</a> BOF. Java Champions are recognized by Sun as leaders inside the community. Some of them are Kathy Sierra, Bruce Eckel, Joshua Bloch, Neal Gafter, Jason Hunter, Calvin Austin and even myself. It was good to meet some of them and also to meet the program coordinator, Aaron Houston, a very nice guy.</p>
<p>Finally, it was show time: our BOF about <a href="http://www.jcp.org/en/jsr/detail?id=310">JSR-310, Date and Time </a>. As noted by <a href="http://www.oreillynet.com/onjava/blog/2007/05/javaone_rife_joda_struts2_1.html">Timothy O'Brien</a>, the number of people who attended was impressive. Her is a partial picture:</p>
<img src="https://bloggers.dev.java.net/files/documents/84/57869/bof_audience.jpg" />
<p>We showed <a href="https://jsr-310.dev.java.net/files/documents/6445/57867/date_and_time_bof_javaone_2007.pdf">a few slides</a> and some code Stephen started working on recently; we expect to commit this API to SVN soon. The audience made interesting comments and questions during the talk and after it - we had to stay there for almost an hour after our talk to address all questions. Some spec leads for JSRs that will make it to Java SE 7 were there and showed they intend to use our work and to support it. So, JavaOne selection team, keep it in mind for next year: date and time is a hot topic.</p>
<p>Once I had completed my main mission, I had a meal with some other Java Champions/JUG Leaders in a nearby restaurant. It was quite nice to meet these folks, shall I say.</p>
<p>From Thursday, I would like to highlight the excellent JFugue talk delivered mainly by David Koelle and with special guest star Geertjan Wielenga. David is a terrific speaker, his work is amazingly cool, his demos rocked and he managed to be funny. Geertjan also deserves congratulations for focusing on the main topic, JFugue, instead of just pushing NetBeans. Of course he mentioned his application was NB-based, but he actually focused on demonstrating how JFugue was simple to use, which just makes more people interested in his application and, well, NetBeans. So, another note to J1 selection team: we want more music-related talks, preferably with David!</p>
<p>Fabiane Nardon and Daniel Lopez's BOF, Designing Self-Evolving and Self-Configuring Java Platform, Enterprise Edition (Java EE) Applications, was also quite interesting and attended by several Java Champions. Nice job! The BoF I've attended after it was one of the coolest sessions in JavaOne: The "<code>java.lang.OutOfMemoryError</code>: PermGen Space" Error Message Demystified, presented by Frank Kieviet and Edward Chou. I couldn't believe they could actually spend 50 minutes talking about this topic with valuable information, but they actually did it. Having done a lot of profiling and OOME chasing before, I must say I could not explain the issue better. You must be on the Rock Star Speakers list for this year.</p>
<p>Fabiane and Edgar's session on Friday was very successful as well and Linda deMichiel and Kenneth, from JPA 2.0 and EJB 3.1, came to them after the session to look for input for their specs. Joshua's Puzzler session was really cool as well.</p>
<p>So, it was nice to meet everyone I didn't know in person before and to talk to all of you I've already known. See you in JavaOne 2008 (if any of my submissions is approved)!</p>]]>

</content>
</entry>
<entry>
<title>Tuesday BOFs</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/05/tuesday_bofs.html" />
<modified>2007-05-10T22:57:54Z</modified>
<issued>2007-05-10T22:53:00Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.7356</id>
<created>2007-05-10T22:53:00Z</created>
<summary type="text/plain">Closures and Java SE 7 language changes.</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>So, let's proceed with my JavaOne report. I've attended the Meet the Swing, AWT and i18n Teams BOF, mainly because Sun's representative in our JSR would be there. We - Stephen was with me - met him and another Sun guy who works in the util & i18n team. They are nice chaps and I regret not taking a picture with them. Maybe I will fix that later this week :-)</p>
<p>Then I went to Neal's talk on closures. Basically what he said is what he had already made public on the internet, so there was nothing new. One thing I asked him about is if he considered restricting the usage of closures, so people don't use closures for cases it doesn't make sense, perhaps member variables. Neal said he thinks if people are using it for something that way, they probably know what they are doing; I guess he never worked as a consultant in his life :-) Just kidding; in the end, I actually agree with Neal, but I am sure people will shoot themselves on the foot.</p>
<p>Finally, I moved to the final talk in the evening, about Java Programming Language Features in JDK Release 7, with Alex Buckley and Peter von der Ahé. It was really cool to hear from the source what is the process they use for considering language changes and to hear about some of them, including operator overloading. While I am somewhat concerned about it - and so are they, it seems -, I think it would make the Date & Time API much clearer and easier to use.</p>
<p>I've also asked Alex about method/field literals and he said I should probably create a <a href="https://ksl.dev.java.net">Kitchen Sink Language</a> project implementing them, along with a spec, so they can evaluate it. Maybe I will find the time, maybe not... Let's see :-)</p>
<p>So, wait for my Wednesday report :-)</p>]]>

</content>
</entry>
<entry>
<title>Tuesday afternoon</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/05/tuesday_afterno.html" />
<modified>2007-05-09T19:55:10Z</modified>
<issued>2007-05-09T19:54:34Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.7327</id>
<created>2007-05-09T19:54:34Z</created>
<summary type="text/plain">Fast chat with Neal Gafter, Geert, another general session, the Swing Application Framework and EJB 3.1.</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>So, after hearing from Danny Coward that our JSR is being considered for inclusion in Java SE 7, I came across Neal Gafter:</p>
<img src="http://www.michaelnascimento.com.br/eventos/javaone/2007/fotos/gafter.jpg" />
<p>Neal has contributed many things to the Java community while he worked for Sun and now he is one of the guys behind of the three closure proposals and has provided some input to our JSR - believe me, a few people need support for things you probably haven't ever heard about, like leap seconds, or that you don't fully comprehend, like femtoseconds. So far, our focus is just to get things right and working and Neal agrees with this approach.</p>
<p>After that, I went to the java.net booth and talked to some of the java.net crew, including Marla, Sarah, Daniel Steinberg and Chris Adamson. Here is a pic with Daniel and Sarah:</p>
<img src="http://www.michaelnascimento.com.br/eventos/javaone/2007/fotos/java_net.jpg" />
<p>I've also met Geert Brewin, the guy behind RIFE and continuations:</p>
<img src="http://www.michaelnascimento.com.br/eventos/javaone/2007/fotos/geert.jpg" />
<p>We talked for some time and hopefully I will be able to help him getting a JSR about continuations started.</p>
<p>Then I attended Bob Brewin's general session. There were a couple of cool things he showed, including the super extra cool <a href="http://worldwind.arc.nasa.gov/">NASA World Wind</a>, which has a Java API that can be integrated in your application and works pretty much like Google Earth. He also demonstrated Iris, which is photo editing software for the web, implemented as an applet.</p>
<p>Then I went to the talk about JSR-296, the Swing Application Framework. I am part of the expert group, so I was actually more interested in the tooling provided by NetBeans. I liked it quite a lot; Joshua did a great work, for sure. Hopefully I will be able to adapt some of his work to provide better support for <a href="https://genesis.dev.java.net">genesis</a>.</p>
<p>The last talk I attended in the afternoon was the EJB 3.1 talk. Here is a list of things (that I can remember) they're considering:</p>
<ul>
<li>Eliminating the need for business interfaces</li>
<li>Allowing EJBs to be packaged along with web components (in a war)</li>
<li>Creating an asynchronous model, including bean-managed synchronization (using <code>synchronized</code>)</li>
<li>Adding singletons</li>
<li>Improving the timer service, so a timer can be created when an EJB is deployed</li>
<li>Supporting stateful webservices</li>
</ul>
<p>For the timer service, they are considering some sort of a cron-like service. I've talked to Kenneth after the talk since I think they might find the new Date and Time API useful for these improvements, so let's see what happens.</p>
<p>Well, that's it for now. I know I'm significantly behind, but hey, I have to actually attend the talks and get some sleep ;-) And don't miss our BOF tonight (Wednesday), at 9:55PM!</p>]]>

</content>
</entry>
<entry>
<title>Everyone is a Brazilian</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/05/everyone_is_a_b.html" />
<modified>2007-05-08T21:24:00Z</modified>
<issued>2007-05-08T21:23:54Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.7300</id>
<created>2007-05-08T21:23:54Z</created>
<summary type="text/plain">It just happened again...</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>During keynote this morning, John Gage has said his classic opening sentence again: this week, everyone is a Brazilian. Hey, I am one, so if you come across me during the event, I can probably teach you something ;-)</p>
<p>So, to the real meat (I am a vegetarian, by the way, but you get it): Sun has announced that open-sourcing Java has finally been completed. You can go to <a href="http://openjdk.java.net">OpenJDK</a> and download the full source code for the JDK.</p>
<p>Rich Green also told us they will make Java much faster and that there will be a Java SE distribution for consumers which is modular and starts much faster.</p>
<p>Another cool thing is JavaFX. It is a set of technologies used to build rich client applications. Think of it mainly as the Java alternative for Flash. Part of JavaFX is JavaFX Script, a new script language targeted at making the development of this kind of applications easier.</p>
<p>There is also something called JavaFX Mobile. It will allow every Java SE API to be available on phones, as well as supporting Java ME applications. Basically, Sun wants to provide software for the next generation mobiles.Other things happened during this session, but there is no time to tell everything :-)</p>
<p>After the session, I went to the Java SE: Present and Future talk. Danny Coward talked about the JSRs that are being considered for Java SE 7 and I was pretty happy when <a href="http://www.jcp.org/en/jsr/detail?id=310">our JSR</a> was mentioned as one of them. </p>
<p>There is a lot more going on, so stay tuned...</p>]]>

</content>
</entry>
<entry>
<title>Monday afternoon at JavaOne</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/05/monday_afternoo.html" />
<modified>2007-05-08T19:41:56Z</modified>
<issued>2007-05-08T19:41:48Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.7293</id>
<created>2007-05-08T19:41:48Z</created>
<summary type="text/plain">A couple of words about Redmonk unConference and the closing NetBeans session.</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>After <a href="http://weblogs.java.net/blog/mister__m/archive/2007/05/new_genesis_rel.html">being disappointed at the Matisse session</a>, I decided to go seeing what folks were doing at Redmonk. Well, the unconference was interesting and there were discusssions about scripting languages, <code>invokedynamic</code> and several, several other matters. I reviewed Stephen Colebourne's airplane hack - that he had improved at that time - and made a suggestion to get fewer classes that abstract the period concept. Have I mentioned we will be presenting a BOF, <a href="http://www28.cplan.com/cc158/session_details.jsp?isid=286794&ilocation_id=158-1&ilanguage=english">A New Date and Time API for Java Platform, Standard Edition (Java SE)</a>, next Wednesday, 9:55 PM, and that you should add it to your schedule? :-)</p>
<p>At the closing session, James Gosling showed a lot of cool applications built using NetBeans and <a href="weblogs.java.net/blog/brunos/">Bruno Souza</a> called the NetBeans Dream Team to stage, which includes two Brazilians: Vinicius Senger, from <a href="http://www.globalcode.com.br">GlobalCode</a> and <a href="eblogs.java.net/blog/edgars">Edgar Silva</a> from JBoss. Here is a picture:</p>
<img src="http://www.michaelnascimento.com.br/eventos/javaone/2007/fotos/nb_dream_team.jpg" />
<p>Finally, there was a party and besides meeting a nice Brazilian who works as a VP of software development for JP Morgan, we (Yara, Vinicius and I) have talked to Michael Keith, co-spec lead for EJB 3.0 and what to expect from the future:</p>
<img src="http://www.michaelnascimento.com.br/eventos/javaone/2007/fotos/mike_keith.jpg" />
<p>So that was it. Hopefully I'll blog about today's morning in a few minutes :-)</p>]]>

</content>
</entry>
<entry>
<title>A public pledge to NetBeans</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/05/new_genesis_rel.html" />
<modified>2007-05-08T01:57:59Z</modified>
<issued>2007-05-08T00:55:11Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.7077</id>
<created>2007-05-08T00:55:11Z</created>
<summary type="text/plain">I could not be more disappointed after attending the Swing GUI Building With Matisse: Chapter II presented at NetBeans. It&apos;s not a problem with the Swing Application Framework or the NetBeans tooling; it&apos;s a problem with freedom of choice, vendor lock-in and a close-minded approach, not community-friendly held by the NetBeans guys. </summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>I could not be more disappointed after attending the <a http://www28.cplan.com/sb158/session_details.jsp?isid=288231&ilocation_id=158-1&ilanguage=english">Swing GUI Building With Matisse: Chapter II</a> presented at NetBeans. It's not a problem with the Swing Application Framework or the NetBeans tooling; it's a problem with freedom of choice, vendor lock-in and a close-minded approach, not community-like friendly by the NetBeans guys. </p>
<p>I hate to make such issues public, but I've been trying to solve this in a civilized way for a year. Almost <b>two years</b> ago I've filed <a href="http://www.netbeans.org/issues/show_bug.cgi?id=62180">an issue about making Matisse extensible</a>. It was ignored for a long time, but over time, I become hopeful again since the NetBeans roadmap indicated that Matisse would support binding for NB 6.</p>
<p>Over six months ago, I've emailed Tomas Pavek, the NetBeans Matisse lead developer (as far as I know) and Scott Violet, who was the spec lead for JSR-295, Beans Binding, to make sure Matisse implemented it as an abstraction, so it was possible to use Matisse with other binding technologies, such as <a href="https://binding.dev.java.net">JGoodies Binding</a> or <a href="https://genesis.dev.java.net">genesis</a>. This email resulted in a thread in which I explained to Tomas what was needed in the API in order to support other frameworks (basically, abstracting how you interact with the binding "metadata"/API and providing extension points to generate the specific binding API code).</p>
<p>One thing that limited my analysis before was the fact there was no publicly accessible code for JSR-295 or the NetBeans support and I was told that a public preview would be available in January. Well, as most of you know, it has only been made available a couple of days ago.</p>
<p>Today, during the session, I mentioned that while I actually found the tooling fantastic, many folks (just for an example, read <a href="http://forums.java.net/jive/thread.jspa?messageID=214672">this</a>) have all kind of issues with Beans Binding and whether NetBeans would allow its users to work with other binding frameworks, by providing a API that is extensible. While <a href="http://weblogs.java.net/blog/shan_man/">Shannon Hickey</a>, the new JSR-295 spec lead, understood it's not like I'm bashing his work, the NetBeans guys simply said they just want to support the standard. What does it mean to you?</p>
<ul>
   <li>If you don't believe that beans binding as a concept is the correct way to make GUI development easier (genesis does what we call "UI binding", which is different, much simpler and straightforward), you're lost</li>
   <li>If you are working with Java 1.4, sorry; NetBeans will <b>never</b> have a decent solution for you since JSR-295 is targeted at Java 5</li>
   <li>If you want to use a solution that already works with other UI technologies, such as SWT, sorry, no donut for you</li>
   <li>If you want to keep the binding logic apart from the UI logic, there is no way</li>
   <li>If you have an existing project or someone pushed another binding solution in your project, you will actually have to <b>branch Matisse and override it</b> to support it</li>
</ul>
<p>Obviously, the first answer would be: "hey, but about maintainance?" but no one is asking for a JGoodies or a genesis binding module to become <b>part</b> of NetBeans; I am just asking for the <b>possibility</b> of doing so if needed without branching Matisse. And, heck, I've read Matisse's code: the kind of support I'm asking for would require just a few days to extract the dependencies and create an abstraction based on interfaces and going through the API review process, that would allow people with enough knowledge about other binding solutions to validate it. That is it.</p>
<p>So, to sum up, what I'm complaining about here:</p>
<ul>
   <li>Sun has always promised us we would have freedom of choice, but NetBeans will get us locked in beansbinding (vendor lock-in)</li>
   <li>NetBeans should listen to the community and work with the community. For years, there weren't a standard approach for binding and there are tons of folks working with other frameworks right now that could benefit from having a plugin that allows them to work with their current binding solution.</li>
   <li>If NetBeans wants to become supported by the community, it shouldn't bite the hand of those that helped to evangelize it. I have been actively promoting NetBeans in Brazil for a few years now, both as a consultant and as a SouJava organization member. I just want to help NetBeans to help its users, but apparently NetBeans developers want to push Sun's solution down our throats.</li>
</ul>
<p>Here is my request: show me I am wrong. Show you can listen to the community. Show me freedom of choice is not just some marketing rubbish. Please.</p>]]>

</content>
</entry>
<entry>
<title>NetBeans Day morning</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/05/netbeans_day_mo.html" />
<modified>2007-05-08T00:04:01Z</modified>
<issued>2007-05-07T21:25:16Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.7264</id>
<created>2007-05-07T21:25:16Z</created>
<summary type="text/plain">Some pics and a few comments about what happened so far in CommunityOne.</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community: NetBeans</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>So today is the CommunityOne event, an event where several communities get together in order to exchange ideas, watch sessions and, well, go to some parties. Right now, I am attending the NetBeans general session held by Jonathan Schwartz and Rich Green:</p>
<img src="http://www.michaelnascimento.com.br/eventos/javaone/2007/fotos/jonathan_schwartz.jpg" />
<p>I've chatted a little bit with <a href="blogs.sun.com/geertjan/">Geertjan</a>, one of the NetBeans guys:</p>
<img src="http://www.michaelnascimento.com.br/eventos/javaone/2007/fotos/mr_m_geertjan.jpg" />
<p>He actually remembers <a href="https://thinnb.dev.java.net">ThinNB</a>, the Thinlet plugins I wrote in the painful NB 4.1 no-module-development-support days.</p>
<p>I've also met a couple of famous Brazilians folks:</p>
<img src="http://www.michaelnascimento.com.br/eventos/javaone/2007/fotos/leonardo_gaucho_mr_m_felipeal.jpg" />
<p>From left to right, Leonardo Galvão from <a href="http://www.javamagazine.com.br">JavaMagazine</a>, <a href="weblogs.java.net/blog/felipegaucho/">Felipe Gaucho</a>, myself and <a href="weblogs.java.net/blog/felipeal/">Felipe A. Leme</a>.</p>
<p>Finally, I've been chatting a lot with Guilherme Silveira, from <a href="http://blog.caelum.com.br/">Caelum</a>:</p>
<img src="http://www.michaelnascimento.com.br/eventos/javaone/2007/fotos/mr_m_guilherme_silveira.jpg" />
<p>So much to write about, so little time :-P Hopefully I will blog about the conversations I had with these pals later on. See you around :-P</p>]]>

</content>
</entry>
<entry>
<title>JavaOne 2007 is about to start</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/05/javaone_2007_is_1.html" />
<modified>2007-05-07T16:51:08Z</modified>
<issued>2007-05-07T16:49:39Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.7260</id>
<created>2007-05-07T16:49:39Z</created>
<summary type="text/plain">JavaOne is about to start and I&apos;ve already met some old friends again...</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>JavaOne is about to start and I've already met some old friends again...</p>
<p><img src="http://www.michaelnascimento.com.br/eventos/javaone/jg_and_mr_m.jpg"></img></p>
<p>'nough said :-). I've met James Gosling during registration on Sunday. Ok, it is not like he actually remembers who I am without some explanation, but anyway... :-)</p>
<p>I have had a great time since I've arrived here on Saturday. In the afternoon, I had a long chat with <a href="http://www.jroller.com/page/scolebourne">Stephen Colebourne</a>, who co-leads <a href="https://jr-310.dev.java.net">JSR-310</a> with me. We'd never met in person before, so it was nice to find out he is quite a cool guy. We've chatted a little about closures, generics quirks and some fresh code Stephen wrote in the plane that we should show up during our BOF, <a href="http://www28.cplan.com/cc158/session_details.jsp?isid=286794&ilocation_id=158-1&ilanguage=english">A New Date and Time API for Java Platform, Standard Edition (Java SE)</a>, that will take place next Wednesday, 9:55 PM, so make sure you add it to your schedule.</p>
<p>I've also had a great time yesterday with Vinicius & Yara Senger from <a href="http://www.globalcode.com.br/">Globalcode</a> and <a href="weblogs.java.net/blog/felipeal/">Felipe Leme, aka felipeal</a>, who is a long-time friend. We've just chatted about many stuff, including some of the most deceiving people we've came across in all these years in consulting. Maybe we should write a public blacklist somewhere :-D</p>
<p>Anyway, it's time to take a shower, put some clean clothes and go to CommunityOne, most of the time, to NetBeans day. I hope I can finally meet the Matisse/beansbinding guys and say a few things about its binding support before I submit a blog entry about it. It's been almost a year I've tried to reach them without success; hopefully, today it will be different.</p>
<p>I have to say a big thank you to my pals at <a href="http://www.summa-tech.com">Summa Technologies do Brasil</a>, the company I work for and that is sponsoring my trip, making it all possible. See you @ JavaOne!</p>]]>

</content>
</entry>
<entry>
<title>Displaying messages in the system tray</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/02/displaying_mess.html" />
<modified>2007-02-15T11:56:43Z</modified>
<issued>2007-02-15T11:56:35Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.6540</id>
<created>2007-02-15T11:56:35Z</created>
<summary type="text/plain">You probably have seen messages popping up in the system tray (or status area), such as &quot;Low battery&quot; or &quot;Updates are ready to be installed&quot;, produced by system tray icons. Did you know it is possible to show these messages with Java SE 6?</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>J2SE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>Many folks are aware that Java SE 6 comes with the new <a href="http://java.sun.com/javase/6/docs/api/java/awt/SystemTray.html"><code>SystemTray</code></a>   and <a href="http://java.sun.com/javase/6/docs/api/java/awt/TrayIcon.html"><code>TrayIcon</code></a>  classes that allows an icon to be added to the system tray - or status area or whatever it is called on your platform. One very cool feature  that most articles/pieces don't mention is it is possible to display a message similar to the "Low battery" warning produced by laptops or the "Updates are ready to be installed" alert Windows Update displays so often.</p>
<p>Here is the code:</p>
<blockquote>
<pre>
public class SysTray {
   public static void main(String[] args) throws Exception {
      TrayIcon icon = new TrayIcon(getImage(), "Java application as a tray icon", 
            createPopupMenu());
      icon.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
            JOptionPane.showMessageDialog(null, "Hey, you activated me!");
         }
      });
      SystemTray.getSystemTray().add(icon);

      Thread.sleep(3000);

      icon.displayMessage("Attention", "Please click here", 
            TrayIcon.MessageType.WARNING);
   }

   private static Image getImage() throws HeadlessException {
      Icon defaultIcon = MetalIconFactory.getTreeHardDriveIcon();
      Image img = new BufferedImage(defaultIcon.getIconWidth(), 
            defaultIcon.getIconHeight(), BufferedImage.TYPE_4BYTE_ABGR);
      defaultIcon.paintIcon(new Panel(), img.getGraphics(), 0, 0);

      return img;
   }

   private static PopupMenu createPopupMenu() throws HeadlessException {
      PopupMenu menu = new PopupMenu();

      MenuItem exit = new MenuItem("Exit");
      exit.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
            System.exit(0);
         }
      });
      menu.add(exit);

      return menu;
   }
}
</pre>
</blockquote>
<p>When you run this sample, an hard-drive icon (borrowed from Swing's Metal L&F) will be displayed in the system tray. If you place the mouse over it for a few seconds, the <code>"Java application as a tray icon"</code> tooltip will be shown and right-clicking it will show a popup menu with a single option, <code>Exit</code>, that will terminate our sample.</p>
<p>The cool thing is that approximately 3 seconds after the icon appears, a warning message will pop up in your system tray - and if you are running Windows and hide the task bar, it will even become immediately visible. This feature can be quite useful for some scenario, such as monitoring applications.</p>
<p>There are several other hidden gems in Java SE 6. Let's keep on searching for them...</p>]]>

</content>
</entry>
<entry>
<title>It&apos;s high time: a Date and Time API for the Java SE Platform</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/02/its_high_time_a.html" />
<modified>2007-02-09T16:59:44Z</modified>
<issued>2007-02-09T16:59:36Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.6518</id>
<created>2007-02-09T16:59:36Z</created>
<summary type="text/plain">Have you ever had problems with Date, Calendar, TimeZone, DST rules and related classes? Even if you hadn&apos;t, if you live in the USA or Canada, it is very likely you will have some bad times this year with those APIs with the new DST rules. Well, a long-term solution is on the way...</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>Community: Java Specification Requests</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>A few times in the past I've considered writing a blog entry summing up all the problems with Date, Calendar, TimeZone, DST rules and other JDK related classes. If you think these APIs are simple, functional and do not cause any harm, believe me, you really haven't done anything trivial with dates. Besides the classic "days are 1-based, month are 0-based" issues and the lack of many major concepts, such as date without time, any date/time calculation fails miserably when it includes a DST start or end date. There are simply too many issues with the current API to list here.</p>
<p>However, the point of this entry is not to bash the current Java SE API, but rather to talk about <a href="http://www.jcp.org/en/jsr/detail?id=310">JSR-310: Date and Time API</a>. As stated in the JSR, it "will provide a new and improved date and time API for Java. The main goal is to build upon the lessons learned from the first two APIs (Date and Calendar) in Java SE, providing a more advanced and comprehensive model for date and time manipulation."</p>
<p>Our main inspiration will be <a href="http://joda-time.sf.net">Joda-Time</a>, a great open-source library originally created by Stephen Colebourne (who will be co-leading the JSR), that you should definitely use today to deal with date and time. We won't simply rename Joda-Time and bless it with the JCP approval stamp. We actually want to learn from it, use Java SE 5 features to design an easier-to-use API, remove all deprecated, complex and not mature enough features and also consider addressing a few issues currently not solved by it.</p>
<p>If you want to help us, <a href="https://jsr-310.dev.java.net/">join the jsr-310 java.net project</a> and subscribe to the mailing lists. If you think you are an expert on the  matter, consider <a href="http://www.jcp.org/en/jsr/egnom?id=310">joining the expert group</a>. We intend to run this JSR as transparently as possible though, so your voice will be heard even if you just join the java.net project.</a>]]>

</content>
</entry>
<entry>
<title>Measuring the size of your objects reloaded</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/01/measuring_the_s.html" />
<modified>2007-01-12T18:58:23Z</modified>
<issued>2007-01-12T18:56:20Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.6315</id>
<created>2007-01-12T18:56:20Z</created>
<summary type="text/plain">Since I wrote the original post about measuring the size of any object using Java SE 5 beta, the process to get it to work has changed a little bit. People eventually try to achieve the task with the code posted and always complain they can&apos;t get it right, so here is a working sample :-)</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>J2SE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[<p>The requirements for defining an agent using the <code>java.lang.instrument</code> package have changed since I've done my <a href="http://weblogs.java.net/blog/mister__m/archive/2004/02/playing_with_th_1.html">first experiments with it for calculating the size of arbitrary objects</a> three years ago. Many folks have asked me how to make that sample work with the final API and while I have told them the directions, they have not always succeeded in their task.</p>
<p>So, here are the steps to build a working agent capable of computing the size of your objects. First, let's create the agent class:</p>

<blockquote>
<pre>
package br.com.michaelnascimento.javaagentsample;

import java.lang.instrument.Instrumentation;
import java.util.Calendar;

public class ObjectSizeCalculator {
   private static Instrumentation instrumentation;

   public static void premain(String agentArgs, Instrumentation inst) {
      instrumentation = inst;
   }

   private static long sizeOf(Object o) {
      return instrumentation.getObjectSize(o);
   }

   public static void main(String[] args) {
      System.out.println("Size of Object: " + sizeOf(new Object()));
      System.out.println("Size of direct subclass: " + sizeOf(
            new ObjectSizeCalculator()));
      System.out.println("Size of String \"size\": " + sizeOf("size"));
      System.out.println("Size of Calendar: " + sizeOf(Calendar.getInstance()));   
   }
}
</pre>
</blockquote>

<p>One requirement for an agent that is started with the JVM is to have a <code>premain</code> method with one of two signatures. The other possible one would just take a String.</p>

<p>Now, the main change made to agent definition is that an agent must be packaged on a jar and must be identified by a manifest attribute, <code>Premain-Class</code>. It shouldn't be too hard to do this with your favourite IDE. With NetBeans, you just need to create a Java Application and make the following changes:</p>

<ol>
   <li>Create a <code>MANIFEST.MF</code> file in the root directory of your project with the following content:
<blockquote>
<pre>
Premain-Class: br.com.michaelnascimento.javaagentsample.ObjectSizeCalculator
</pre>
</blockquote>
</li>
   <li>Configure your project to use this file by adding the following property to <code>nbproject/project.properties</code>:
<blockquote>
<pre>
manifest.file=MANIFEST.MF
</pre>
</blockquote>
</li>
</ol>

<p>Once you build your project, your agent will be properly packaged and ready to be used. To load it, though, you need to use the <code>-javaagent:</code> command-line option to define the jar that contains your agent. If you are using NetBeans, you just need to edit <code>nbproject/project.properties</code> again in order to replace the definition of <code>run.jvmargs</code> by the following one:</p>

<blockquote>
<pre>
run.jvmargs=-javaagent:${dist.jar}
</pre>
</blockquote>

<p>That is it. Running the sample in my machine produces:</p>

<blockquote>
<pre>
Size of Object: 8
Size of direct subclass: 8
Size of String "size": 24
Size of Calendar: 112
</pre>
</blockquote>

<p>As a final note, agents are actually intended to allow your code to redefine classes by replace sections of their bytecode as desired. This technique is used by AspectWerkz and AspectJ, for instance, and can also be used for special tasks, such as enabling/disabling specific monitoring, for instance. The object size calculation capability is there, but it is not its main purpose.</p>

<p><i>PS: <a href="https://genesis.dev.java.net">genesis</a> has been the most active project in December. 3.0 RC1 should be out in a few days.</i></p>]]>

</content>
</entry>
<entry>
<title>First Java SE 6 bug!</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mister__m/archive/2007/01/first_java_se_6.html" />
<modified>2007-01-12T13:27:44Z</modified>
<issued>2007-01-12T00:13:07Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mister__m/74.6307</id>
<created>2007-01-12T00:13:07Z</created>
<summary type="text/plain">I&apos;ve found and reported my first bug running Java SE 6. If you are using or intend to use javax.script API with the bundle JavaScript support, you might hit this bug as well.</summary>
<author>
<name>mister__m</name>

<email>mister__m@dev.java.net</email>
</author>
<dc:subject>J2SE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mister__m/">
<![CDATA[As <a href="https://genesis.dev.java.net">genesis</a> 3.0 is approaching Release Candidate, I decided to test it using the newly released Java SE 6. I ran the test suite and a single test failed, one involving script evaluation (I've blogged about <a href="http://weblogs.java.net/blog/mister__m/archive/2005/04/supporting_scri.html">genesis script support</a> almost two years ago).

Since JSR-223 was about to become part of Java SE 6, we've added support for it six months ago. By that time, either the test worked or it hadn't been written yet, but the genesis useradmin sample was running flawless. Well, I've filed <a href="https://genesis.dev.java.net/issues/show_bug.cgi?id=419">a bug</a> in genesis issue tracker and after some investigation, narrowed the problem to its real cause.

Basically, <b>you cannot invoke a static method that overloads an instance method</b> using <code>variable.method(arg0, arg1)</code>. The following test case demonstrates the problem:

<blockquote>
<pre>
package test;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

public class FunctionsClass {
   public static boolean xpto(Object arg1, Object arg2) {
      return equals(arg1, arg2);
   }
   
   public static boolean equals(Object arg1, Object arg2) {
      return arg1 == null ? arg2 == null : arg1.equals(arg2);
   }
   
   public static Object echo(Object o) {
      return o;
   }

   public static void main(String[] args) throws Exception {
      ScriptEngine engine = new ScriptEngineManager().getEngineByName("JavaScript");
      engine.put("f", new FunctionsClass());
      System.out.println(engine.eval("f.echo(f)"));
      System.out.println(engine.eval("f.xpto('a', 'a')"));
      System.out.println(engine.eval("f.equals('a', 'a')"));
   }
}
</pre>
</blockquote>

This test output should be something like:

<blockquote>
<pre>
test.FunctionsClass@14a9972
true
true
</pre>
</blockquote>

it actually is:

<blockquote>
<pre>
test.FunctionsClass@14a9972
true
Exception in thread "main" javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Can't find method java.lang.Object.equals(string,string). (<Unknown source>#1) in <Unknown source> at line number 1
       at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:110)
       at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:124)
       at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
       at test.FunctionsClass.main(FunctionsClass.java:24)
</pre>
</blockquote>

If you can change the script or the class being called, it is easy to work around this issue (by invoking the method on the class itself with, renaming it or rewriting it to become an instance method). However, if you cannot, you better use Rhino directly. When I run the same test using BSF over Rhino, it works.

For future reference, this has been filed as <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512123">bug # 6512123</a> (it might take one or two days for it to show up). Let's hope the fix make it to Java SE 6 Update 1. :-)]]>

</content>
</entry>

</feed>