Marco's Corner

Just another Software Developer's Musings

Browsing Posts in General

I’m involved with the “Engineers without Borders” for allmost a year now. We are currently building an annex chapter of the San Francisco – Professional Chapter. A lot of nice, long names. What it really means is, that a group of Sun people work together to help. The rest is just organizational/logistical.

We are trying to build a wireless internet link to the CREA – Panama reseach station. They collect a lot of meteorological data which needs to go to researchers and on the other hand, an internet connection will also help in the education of villagers in more sustainable methods of agriculture.

I was there in early September for a feasibility trip. It looks like we can build an long range WiFi link to the ‘more urban’ 🙂 areas where DSL would be available.

So far, so good. But since that is a complete volunteer effort on our part, we have to raise the money we need.  We were selected to represent EWB at a globalgiving.com 2008 Project Challenge. See the little image for a link. If we can raise enough money until November 21st, there are even prices;-)

Thanks for your support.

Have fun out there;-)

— Marco

OK, this article is not really new any more. It took almost a year until I came across it. But it’s always interesting to see what your old school is doing. Especially when a (German) national paper is praising it very much. Here is a link to the "Die Welt" article titled "Germany’s Smartest Pupils".

I checked a little more into it and I even found out that three of my former teachers are still there.

— Marco

Waves to Wine LogoFor the weekend I joined Team Sun and 1600 other bicycle riders for the Northern California MS150 Bike Tour “Waves to Wine”. I did not know what I get into since this was my first participation in such a fund raising ride. But I must say, it was a lot of fun. I did not really train for a longer bike ride since I’m currently really swampt with work. I do my daily two times 15 miles as part of my commute but that was it.

Partial Team Sun @ StartSo I was a bit worried before the start on Saturday. But the weather was very nice and the ride was good. It was a great day to ride over the Golden Gate Bridge. The ride was smooth and I kept in my own time esitmates for the something like 77 miles. Highway One is beautyful North of San Francisco, but I guess a couple of motorists were surprised by those many bikes.

We spent the afternoon and the night in Rohnert Park. There was a nice program, a good dinner and beer and wine, but I did not drink too much after the days workout.My family joined us for the afternoon and the night in tents. So everybody had fun.

The next morning started a bit cold. But that was OK. I felt fine after the Saturday ride, so we started at 8:00.  The route went over small roads through the wine country. We did not meet too many cars and it was all around very nice.

The 75 miles went by quickly and I reached the finish line around 2:30.

Overall it was a fun weekend. And the outcome as a fund raising effort was also quite good. I was able to raise over $ 750 and Team Sun  with it’s fifteen riders raised over $ 11,500. So it was a big success. The consensus from all the riders I’ve seen after the ride is that we will be doing that again next year.

As always, have fun out there.

Marco

I ventured a bit into different languages lately. Over the last couple of days, I tried to install and run the mailing list manager Sympa on OpenSolaris and the CoolStack packages.

Building the pieces were not a big problem. But the first problem I encountered, was the missing BerkeleyDB in the CoolStack packages. OK, BerkeleyDB is not hard to build and that was fixed quickly once I knew what was going on.

The next problem was, that the Sys::Syslog module apparently does not work so well in newer Solaris versions. I searched the web but I was not able to find any solution. So I looked at the code and decided that I would write a targeted Sys::Syslog for Solaris which would actually use the libc interfaces instead of trying to do everything by hand.

Here is my little modified module, I hope, maybe somebody will find this useful. It uses the same API as the original module, so it should work as a drop-in replacement with the only exception that it actually communicates with the syslogd;-)

Have fun.

— Marco

Fri Jul 13 17:12:06 PDT 2007

OK, today I checked and there is actually a newer version of Sys::Syslog which works just fine on Solaris 10/OpenSolaris. I compiled it and replaced the version in the CoolStack Perl.  Now I’m happy with that;-) That’s what you get when you blindly use source packages of some software:-(

It has already been a year since we generate a lot of our electricity on our roof. Starting in October 2005 we got our new meter. So this years October bill was the time when PG&E did the true-up over the year.

We did not have to pay for any used electricity;-) We only payed for the fixed connection costs (basically that PG&E runs a wire to your house and that they provide the meter) something like six dollars per month.

Our PV system produced around 5080 kWh over the last year, that’s more than the estimated 3700 kWh;-) Our household used an additional 1040 kWh from PG&E over the year. I know, other houses use that in a month;-)

Overall I think we saved something like 720 dollars on electricity costs and we avoided around 10,000 pounds of CO2 from coal firing power plants.

So I’ll visit the expo floor tomorrow and see what’s new and interesting;-) I don’t know why Sun decided not to participate in the expo. I didn’t even see OpenOffice in the exhibitor list, I hope they are somewhere.

I’m playing with [K]Ubuntu lately. So another event which might be interesting is the Ubucon Conference right after the LWE (18. &19.) at Google in Mountain View.

And to give the Linux week a good end. There is the anual Linux Picnic at the Baylands Park in Sunnyvale on Saturday.
Picn*x XV - The Linux 15th Anniversary Picnic!

So have fun and get out there;-)
— Marco

The problem came up at least twice so far on our Java Studio Creator Forum. How can the application server use a proxy to connect to remote webservices etc when the proxy setup requires user authentication?

It looks like the normal Java SE 5 JDK does not provide any system properties alongside http.proxyHost and friends. At least I could not find any reference in the official documentation.

I think I found a way;-) But – I can not test it!! I don’t have a proxy setup which requires authentication. I did some tests with normal web site authentication and those seemed to work as expected;-)

This will only work with Java SE 5 or newer! In that version java.net.Authenticator changed a bit so that I can distinguish between authentication requests from normal servers and from proxies.

The Authenticator is not hard to write, I wrote one which takes additional system properties, http.proxyUserName, http.proxyPassword and the https.* versions. You can also write one which will find that information in a file or from LDAP if you like. In a development environment you could even bring up a dialog;-) But that will not work for headless systems;-)

The trick is, you have to get a default Authenticator registered with the jvm which runs the application server. That turned out to be a bit harder. I did not find any hook where I could execute some code in the global server at startup (or at least before the first connection attempt to the proxy). You can’t add it to normal applications, the SecurityManager will not let you do that:-(

My solution to the problem was a little jar file in the boot classpath;-) I took the java.net.Authenticator source from the JDK src.zip and added a little static bit to it;-) Something like

   
    static {
        ProxyAuthenticator.registerProxyAuthenticator();
    }

That will make sure, my Authenticator will be the default one;-) If something later overwrites it, that’s ok I guess.

So when a proxy server (or a web server) asks for authentication, my code will be invoked and I can do whatever I need to get the username and password;-)

To use this approach, add the following into the domain.xml in your application server.

<jvm-options>-Xbootclasspath/p:<path_to>Proxy1.jar</jvm-options>
<jvm-options>-Dhttp.proxyHost=<host></jvm-options>

<jvm-options>-Dhttp.proxyUserName=<user></jvm-options>
<jvm-options>-Dhttp.proxyPassword=<password></jvm-options>

Here is my little NetBeans 5.0 project and a pre-built jar file. I hope this helps some people. Please let me know if it works;-)

Have fun
— Marco

Late JavaOne impressions

3 comments

Last week was a lot of fun;-) JavaOne time. But at the end of it, I was very tired.

Everything started with the NetBeans Day on Monday. Or better with the registration to it. Seeing all those people standing in line to listen to what’s new and coming in NB was quite a sight. I talked to a couple of people while standing in line about what tools they were using. Most of the people I talked to there where using more than one editor/IDE. Some little missing features  can sometimes make the live harder than it should be. I pointed a couple to Sandip’s blog to show them that there is more out there and how easy it is to write your own little additional modules.

The presentations were good, but the conference rooms in the hotel could not hold all the people. I was especially interested in Sandip’s presentation of the future Creator pack. That went well and I think a lot of people liked the idea that we are finally combining the two.

Tuesday, the AXAJ and Semplice showings in the keynotes were well recieved. I don’t think too many people understood really what Tor was showing there. I think a couple got it later in the week at the Semplice coming out session.

One session was called “Twelve Reasons to Use Creator”. Charles Ditzel wrote about it. I know a lot about Creator but I wanted to see what questions and concerns would come up there. Overall, I think the audience did learn a lot about different corners of Creator. For me the best part was when Octavian tried to squeeze into a small NetBeans shell (ahm t-shirt;-). I tried to take some pictures but those little digital cameras don’t work so well at a distance:-(

I talked to a lot of people during my shift at the Creator booth in the Pavillion. Some things that came up again where Tomcat and JBoss, Java EE 5 support (and the unfortunate lack of Java SE 5 support in the current Creator), JDBC driver issues, and portlets/portal questions. Overall I somehow seem to see an increase in interest in the portlet area. At J1, at the Creator forum and I even get emails asking about deploying our portlets to different portals. So I used the pavillion to talk to the JBoss Portal and the LifeRay people. In the end I was successful to deploy our portlets to both of them;-)

Later in the evening I went to the packed JavaPosse BOF. The room in the Argent hotel could hardly hold all the people. Ofcourse I know all those four guys and it was a fun evening. Listen to episode #55 to get an impression;-) But it ended (officially) at 23:20 and I had to get home.

On Wednesday the most interesting talk for me was probably the Groovy talk. I come from a Unix background and did some scripting all along. I find that combination of Java and a scripting language good. I hope I can try to play with that a bit more in the near future.

Thursday started with the IBM keynote. I did not know what to expect but was surprised by the Eclipse and it’s community talk. I found the demo of the tight integration of the IDE with the overall process very interesting. There was an old joke in the Emacs world: “When do you know that an editor matures? – When it can send email.” I guess that process integration is a step into the same direction, doing more in the same environment.

Next was the Semplice talk. Unfortunately it was moved from the afternoon to the moring. So I don’t know how many people did not make it. But the people who made it found it very interesting. Unfortunately the talk now collided with another talk “Dynamic Typed Languages and the JVM” which I would have also liked to attend:-(

In the evening, the famous J1 Bash with James Gosling’s t-shirt throwing-machine contest. Some time to relax a bit and have fun.

Later I went to two NetBeans BOF’s. In the first one Geertjan and Petr showed how easy it is to extend or customize NB with a new Web Framework. The second one was about the NB collaboration modules with a twist. The transport layer was JXTA;-) At that BOF one guy came up and talked about how he had tried to get the NB collaboration modules working in Creator. He was not completely happy. I tried that as well way back when. I got most of it to work but then too much other stuff came in between and that never went anywhere.

And it was again 23:20 and time to get home.

Friday started with the fun Sun keynote. I did not ride my bicycle that week:-( I was simply too tired and BART has restrictions on which trains you can bring your bike, so it did not play out. But quite some people did ride;-) And one guy won the Lance Armstrong jersey;-)

James Gosling had the final of the RT Slot Car Race on stage. That race track was always surrounded by a lot of people at the pavillion. And I’ve seen quite a few people spending a lot of time there trying to get into that final. Four kids from Germany made it and ended up taking second place;-)

Two interesting talks were the NB API development talk and a session on JSF in portlets.

Overall I trink it was a very good conference. I don’t have any numbers but it looked more buzzing than the last couple of years. One thing, I have to think about, is how to better handle late BOF’s, early keynotes and a 1.5 hour commute time.

And now I need some time to play with my new toy;-) The Jasper S20 phone. So far, it works pretty well as normal cell phone but I got it to play with the devlopment for it;-)

Have fun;-)
— Marco

PS: I had big problems today. For whatever reason, my FireFox timed out all the time when I tried to write this post:-(

I’m toying with a Planet Java Studio Creator site idea. So far I’ve my first attempt but I would like to know if other people find this useful and what they would like to see there.

The CSS is still completely messed up but look at planetjscreator and let me know if that would be useful. Currently it’s only using feeds from Sun but I would like to open it to other Creator related feeds.

Please be patient, that’s currently hosted on my little Cobalt Qube 3 on a DSL line. It might move or completely disappear depending on the responses I get;-)

I’ve also created a thread on the Creator forum. So you can also discuss this there.

Thanks,
— Marco

Bike to JavaOne;-)

4 comments

A lot of the Java enthusiasts will know that the 2006 edition of JavaOne will be held next week in San Francisco. I’ll be there as well as for the NetBeans Day on the Monday.

If you have seen the Java Studio Creator web site, you also probably realize that I’m riding my bicycle quite a bit. So I was pleasantly surprised when I saw the Sun Announcement:
“Think Green – Bike to JavaOne and Demonstrate Sun’s commitment to Eco-Responsibility”

I don’t know where this went on the outside web site (yet), but here are some passages, which might be interesting for all interested readers to repeat (I even asked the marketing person before repeating them here;-):

“As part of the Participation Age, Sun is making a concerted effort to promote eco-responsibility to its employees, customers and partners. This year, the JavaOne Conference runs from May 16th – 19th and overlaps “Bike to Work Week.” To support this effort and in keeping with Sun’s efforts to help reduce greenhouse gas emissions, Sun employees planning to attend JavaOne are urged to bike to the event.

To make biking to JavaOne as convenient as possible, Sun has partnered with the San Francisco Bike Coalition to offer a free “Bike Valet” service Tuesday through Thursday from 8:00 am – 7:00 pm PT and Friday from 8:00 am – 1:00 pm PT in front of the Moscone Center South Hall. The San Francisco Bike Coalition is a non-profit advocacy organization dedicated to promoting the bicycle for everyday transportation. SFBC staffers will watch over bikes and give riders free advice on how to keep their cycles in top shape.

To inspire non-Sun attendees to bike to the show and add a little fun to the challenge, JavaOne participants who support Sun’s efforts by biking or taking public transportation will be entered into a drawing for a Lance Armstrong signed Discovery Team bike jersey, other Discovery Bike Team gear, Timbuktu messenger bags and other great prizes. Although Sun employees are not eligible to win the raffle prizes, you can receive a free Nalgene bottle available to the first 100 people who participate.”

I don’t like the last paragraph so much because that means, I can’t get any of the good stuff. But I guess that’s ok;-)

So I’ll try to ride into SF at least once;-) I won’t do the whole 70 miles (one way), but maybe getting of BART at Oakland and using a free ferry on Thursday, the 18th sounds like fun. The other days it’s BART for me.

Have fun at NetBeans Day and JavaOne next week;-)
— Marco