Skip to content

Feed aggregator

Java Posse #264 - Newscast for July 2nd 2009

The Java Posse - 6 hours 48 min ago
Newscast for July 2nd 2009 Fully formatted shownotes can always be found at http://javaposse.com
  • Java mobile app of the week - jTwitter
Quick News ScalaWags Book Roundup Listener Feedback Moderator group: http://tinyurl.com/q4javaposse
Code Review Tools1. Review Board (http://www.review-board.org)2. Rietveld, from GVR, which is derived from Google's Mondrian (http://code.google.com/p/rietveld/)

OPS4J PaxRunner and PaxExamhttp://ops4j.org

Scala goes PLEAChttp://github.com/michaelkebe/pleac-scala/tree/master
PLEAC's homepage:
http://pleac.sourceforge.net

Thanks The Java Posse consists of Tor Norbye, Carl Quinn, Joe Nuxoll and Dick Wall

Categories: Blogs

Latest ADF 11g (11.1.1.1.0) Rich Client Demo is available

AMIS Technology blog - 8 hours 5 min ago
  Today I came across a brief post on the OTN Forum for JDeveloper and ADF (http://forums.oracle.com/forums/thread.jspa?threadID=923587&tstart=0). The latest demo application (11.1.1.1.0) for ADF 11g Faces RC can be downloaded from http://download.oracle.com/otn/java/jdeveloper/111/extensions/adf-richclient-demo.war. It comes as a WAR file that can be deployed on WebLogic 11g. Alternatively, we can turn the WAR file into a JDeveloper project, to inspect [...]
Categories: Companies

Boeing Shows NetBeans-Based Rich Client Platform Applications [Screencast]

Charles Ditzel - 8 hours 7 min ago
The NetBeans Platform is one of the best ways to build a rich-client platform application. Boeing has created very sophisticated platforms called the Mass Toolkit and the Boeing Shared Platform on top of NetBeans. Watch/listen the the screencast.
Categories: Blogs

OpenMQ Roadmap Updated

ALT DESCR

Ed has updated the Roadmap for OpenMQ with the information related to OpenMQ 4.4, targeted for GlassFish v3. Key features include:

• JMS Bridge -- Connect to other Open MQ clusters, or other JMS products
STOMP -- use the Streaming Text Oriented Message Protocol in Open MQ
• Embedding -- Use Open MQ as an embedded messaging provider in your own Java application

Full details at OpenMQ 4.4 Feature Page.

Jazoon ‘09: The Conference

William Louth’s Weblog - 12 hours 9 min ago

This was my first time to attend (and speak) at the Jazoon conference and though I was only able to attend for 2 days I really did have a great time attending the conference and talking in person (and drinking with) with a number of well known individuals in the Java industry including Bela “a blast” Ban (JBoss), Mike “I’m nice” Keith (Oracle), and Kirk Pepperdine (Kodewerk) who dared discuss and debate application performance management & monitoring approaches with me over lunches and walks to and from our hotel.

Kirk just about to experience my Irish resolve.

I did attend the keynote session given by Adrian Colyer (SpringSource) and I must say I was impressed with his presentation skills even though it was a tad bit too long in terms of the green theme and light on in-depth technical analysis but I suppose there is only so much you can do in such a short time especially when predicting the future which could all change with an acquisition. The same cannot be said for the other main session I attended in which Peter “let me put this chastity belt on your classloaders before everything drops out under” Kriens (OSGi) who did a very poor job of presenting a supposedly technical session which in fact turned out to be more like “let me preach & market my 10 year old modular framework (that keeps re-inventing new component models)”. Peter really used every cheap marketing trick in the book when it came to the information (can we even call it [data] that, more like the gospel according to Peter) he presented in his slides. His insistence that modularity should be managed entirely outside of the language and oblivious to the Java runtime sounded like someone completely divorced from reality (vital lies?).

When Juergen Hoeller (SpringSource) was pulled over to our table I did question him on whether Rod (SpringSource) should continue blogging or go back to coding factory classes. What is worse? His reply was “No comment”.

Categories: Blogs

PostgreSQL 8.4 now available

TheServerSide.com - 12 hours 44 min ago
PostgreSQL 8.4, the latest version of the high-end open source SQL database system, is now available. This new release has several cool features ...


Categories: Communities

jclouds releases updated beta for Amazon S3

TheServerSide.com - 12 hours 45 min ago
Control access to your files in S3, serve them up in Google App Engine, and vote on what comes next!


Categories: Communities

Interview with Dr. Erich Gamma - one of the fathers of Eclipse

TheServerSide.com - 12 hours 45 min ago
Learn about Jazz and Eclipse from the inside guy's mind


Categories: Communities

What is the Appeal of Ajax and GWT?

Ajax does have its detractors. Their argument goes as follows: Why reinvent everything that has already been done on the desktop on an inferior platform? I do agree that the attraction of Ajax is subjective (i.e., not based on technological arguments). This is obvious whenever I’m excited about something web-based, show it to non-developer friends and their only reaction is boredom. Then I...
Categories: Communities

JavaFX - ComboBox

Rakesh Menon - 16 hours 43 min ago

JavaFX SDK provides Control and Skin interface which can be used to create custom controls. Lets create a ComboBox with these two classes...

For Applet mode, click on above image

For standalone mode

The ComboBox is created using a combination of Label and ListView. The ListView instance is dynamically inserted into content of Scene so that it appears on top of all existing content. Its deleted from Scene on making list invisible.

The entire logic of control is implemented in Skin. Behavior class can be implemented to handle keyboard events. The look is copied from Nimbus. It can be easily customized.

Also available - Color Picker

Try it out and let me know feedback

Source:

var dzone_url = "http://blogs.sun.com/rakeshmenonp/entry/javafx_combobox"; var dzone_style = '2';

Categories: Blogs

E4 – A New Area For RCP/RIA Applications

I’m on the road to prepare my example for the E4 talk I’m delivering on the Eclipse-Developers-Day in Karlsruhe and I have to say that in my eyes E4 is going to open up a new world for Eclipse-RCP-Developers. James Sugrue
Categories: Communities

Caught Between Two IDEs

I seem to be caught between two IDEs: Eclipse and IntelliJ. I abandoned Eclipse a couple of years back, partly based on wide spread recommendations from many different people, and partly because Eclipse just stopped working for me (it crashed out). After I got started with IntelliJ I started to appreciate its merits, despite a generally clunky interface (with lots of modal windows), truly awful...
Categories: Communities

Java Forum Stuttgart

my take on things - David Linsin - 21 hours 37 min ago
Yesterday, I was attending the 12. Java Forum Stuttgart and compared to the last time I went, which was in 2005, the event has really fledged.

The quality of the sessions was good and the hallway was filled with familiar faces. The theme of the conference for me, was JPA and O/R mappers. There were a couple of really great talks about it and it seems like there's a lot of going on in that area at the moment.

I'm definitely gone be there again next year and I would love for the conference to be extended to a 2-3 days event.
Categories: Blogs

Microbenchmarking Scala vs Java

Wondering around - Eishay Smith - 22 hours 53 min ago
Following Nick's post I came up to check the numbers and investigate a possible improvement using Scala 2.8 @specialized annotation.
Final numbers are at the end of the post.
I added few changes:
First I thought it would be better if both Scala and Java would sort the same size of array ;-) In Nick's example Java sorted 10,000 elements and Scala sorted 100,000.
The other was to do few iterations int he same JVM run to let JIT kick in. So now the Scala code looks like this:
package quicksort
import java.lang.Long.MAX_VALUE

object QuicksortScala {

def quicksort(xs: Array[Int]) {

def swap(i: Int, j: Int) {
val t = xs(i); xs(i) = xs(j); xs(j) = t
}

def sort1(l: Int, r: Int) {
val pivot = xs((l + r) / 2)
var i = l;
var j = r
while (i <= j) {
while (xs(i) < pivot) i += 1
while (xs(j) > pivot) j -= 1
if (i <= j) {
swap(i, j)
i += 1
j -= 1
}
}
if (l < j) sort1(l, j)
if (j < r) sort1(i, r)
}
sort1(0, xs.length - 1)
}

def main(args : Array[String]) {
var time = MAX_VALUE
for(i <- 0 to 100) (time = Math.min(time, doSort))
println("Scala time = " + time)
}

def doSort() = {
var a : Array[Int] = new Array[Int](10000000)
var i : Int = 0
for (e <- a) {
a(i) = i*3/2+1;
if (i%3==0) a(i) = -a(i);
i = i+1
}
val t1 = System.currentTimeMillis();
quicksort (a)
val t2 = System.currentTimeMillis();
t2 - t1
}
}
And here is the Java code:
package quicksort;

public class QuicksortJava {

public void swap(int[] a, int i, int j) {
int temp = a[i];
a[i] = a[j];
a[j] = temp;
}

public void quicksort(int[] a, int L, int R) {
int m = a[(L + R) / 2];
int i = L;
int j = R;
while (i <= j) {
while (a[i] < m)
i++;
while (a[j] > m)
j--;
if (i <= j) {
swap(a, i, j);
i++;
j--;
}
}
if (L < j)
quicksort(a, L, j);
if (R > i)
quicksort(a, i, R);
}

public void quicksort(int[] a) {
quicksort(a, 0, a.length - 1);
}

public static void main(String[] args) {
QuicksortJava sorter = new QuicksortJava();
long time = Long.MAX_VALUE;
for(int i = 0; i < 100; i++)
time = Math.min(time, sorter.doSort());

System.out.println("java time = " + time);
}

private long doSort(){
// Sample data
int[] a = new int[10000000];
for (int i = 0; i < a.length; i++) {
a[i] = i * 3 / 2 + 1;
if (i % 3 == 0)
a[i] = -a[i];
}

long t1 = System.currentTimeMillis();
quicksort(a);
long t2 = System.currentTimeMillis();
return t2 - t1;
}
}
Decompiling the Scala code shows that there is no benefit of using the @specialized annotation since the Scala compiler compiles all the ints to primitives. Here is the Scala class decompiled code:
package quicksort;
import java.rmi.RemoteException;
import scala.*;
import scala.runtime.*;

public final class QuicksortScala$
implements ScalaObject
{

public QuicksortScala$()
{
}

private final void sort1$1(int l, int r, int ai[])
{
do
{
int pivot = ai[(l + r) / 2];
int i = l;
int j = r;
do
{
if(i > j)
break;
for(; ai[i] < pivot; i++);
for(; ai[j] > pivot; j--);
if(i <= j)
{
swap$1(i, j, ai);
i++;
j--;
}
} while(true);
if(l < j)
sort1$1(l, j, ai);
if(j < r)
l = i;
else
return;
} while(true);
}

private final void swap$1(int i, int j, int ai[])
{
int t = ai[i];
ai[i] = ai[j];
ai[j] = t;
}

public long doSort()
{
ObjectRef a$1 = new ObjectRef(new int[0x989680]);
IntRef i$1 = new IntRef(0);
(new BoxedIntArray((int[])a$1.elem)).foreach(new anonfun.doSort._cls1(a$1, i$1));
long t1 = System.currentTimeMillis();
quicksort((int[])a$1.elem);
long t2 = System.currentTimeMillis();
return t2 - t1;
}

public void main(String args[])
{
LongRef time$1 = new LongRef(0xffffffffL);
Predef$.MODULE$.intWrapper(0).to(100).foreach(new anonfun.main._cls1(time$1));
Predef$.MODULE$.println((new StringBuilder()).append("Scala time = ").append(BoxesRunTime.boxToLong(time$1.elem)).toString());
}

public void quicksort(int xs$1[])
{
sort1$1(0, xs$1.length - 1, xs$1);
}

public int $tag()
throws RemoteException
{
return scala.ScalaObject.class.$tag(this);
}

public static final QuicksortScala$ MODULE$ = this;

static
{
new QuicksortScala$();
}
}
I tried to compile and run the code in Scala 2.8 anyway and the results where exactly the same as with running it under Scala 2.7.5.
The numbers:
Scala: 1355ms
Java: 1265ms
==> Java was 7% faster then Scala (Closer gap then the 33% in the previous benchmark).
Categories: Blogs

GlassFish Adoption Report for May '09

ALT DESCR

I've posted the May 09 GlassFish Adoption Report. Some growth from April 09, but not back to the March 09 peak; probably some seasonal drop, possibly some impact from the Oracle announcement.

The full report includes the usual download data for run-time and tools bundles, a comparison with JBoss downloads, GeoMap, Registration and Update Center.

I expect to post the June report next week.

Griffon @ Silicon Valley Web JUG

Andres Almiray's Weblog - Thu, 07/02/2009 - 23:16
Want to know more about Griffon? will you be in the Bay Area around July 21st? then you're invited to Silicon valley Web JUG's next meeting, I'll have both the pleasure and honor of giving an introductory talk about Griffon. Do you still think that Swing application development simply sucks or it is too painful to bear? let me show you what Griffon offers then decide for yourself :-D see you there!

Keep on Groovying!
Categories: Blogs

Why emacs is still in my toolbelt


When I first started out as a developer one of the crackpot nutjobs with whom I worked at the time convinced me that emacs was absolutely the best editor to use.  I didn’t really know any better and he was by far the fastest and most nimble code navigator of anyone else in the group so I gave it a try.  Many hundreds of hours of elisp hacking and a 37MB ~/.emacs.d directory later I am a fairly well worn emacs yeoman.  For many years I used nothing but emacs, cramming all sorts of language modes in it to make it do fun stuff and syntax highlight everything from shell script to Java to Ruby to InstallScript (insert vomiting in own mouth joke here).

I say, with no small amount of nostalgia, that emacs is no longer the development workhorse it once was for me.  I spend most of my time writing large Java projects and have fallen prey to the siren song of fancy IDE’s with their “Show me a list of all the places this specific method is called anywhere in my project” tricks and “Refactor this entire package hierarchy with all the file renaming and moving and even rename the getters and setters to reflect the new names” chicanery.  Emacs had a few tricks to make it look like it was doing these things but it was always kinda hacky and required a great deal of TLC to keep it working across JDK upgrades and switching projects with environment variables and jdk-* elisp variables that were just right.

All that said, you can have my emacs when you pry it from my cold dead hands, and here’s a glimpse into why:

  1. Zip file handling smooth as a baby’s butt
    Have you ever tried to open a zip file with emacs?  Give it a try, its awesome. It shows you a normal list of all of the files in the zip archive.  No big deal, right?  Now move the cursor onto one of the files.  Shows you the file, doesn’t it.  Not bad, huh?  Now try editing the file.  Let’s you edit it, doesn’t it.  Now try saving it.  Oh baby.  Right back into the archive where it belongs and you don’t even have temp files to clean up.  Seriously? That’s worth the price of admission right there.
  2. That’s what you’re computer is for, numbskull
    If I see one more person with their hands hovering over their keyboards in some weird way just so that they can type “Down arrow, End, BkSpace, BkSpace” over and over for every line in a 500 line file I’m going to scream.  I know emacs is not the only editor that does simple macro recording and playback, but if your editor doesn’t have that (yes, I’m staring at your Eclipse) then you most likely have wasted some time this week.
    “C-x-( <do your thing here> C-x-) Ctrl-u 500 C-e” and 500 lines later your done.  Menial tasks should not be done by people.
  3. Graphical and terminal mode
    This may be specific to you server developers out there, but sometimes you just need a decent editor on a headless server.  I know, I know, use vi. If I wanted to ask my editors permission to type a letter I would install Clippy (ducks).  Sorry, had to get that in there.  Having a workable dev environment on a headless server has been a huge help on many occasions where fun graphical wizbang is just not an option.
  4. Cross Platform
    Linux, OS X, Solaris, even Windows if I really have to, but emacs comes with me everywhere.  It always works and so does my well worn ~/.emacs.d directory of everything I’ve ever needed.  Its a great way to lower the cognitive load of jumping around all the time.  What good is your trust side kick if it doesn’t come with you wherever the fates may carry you?

The list really goes on and on.  The idea here is less about emacs specifically and having really amazingly good reliable all purpose text editor to sit next to your honkin’ cool IDE and fill in the gaps.  If you are a gainfully employed programmer and you use notepad.exe for anything, then you are a thief stealing from your employer.

I’ll be honest, I spend a lot less time in emacs than I used to, but every good carpenter needs a good hacksaw/screwdriver/nail puller/hedge trimmer/ladder/rotary drill/french coffee press/drop cloth/tire rotater.  Right?

xkcd emacs comic

Categories: Blogs

Registration Now Open for The Ajax Experience 2009

TheServerSide.com - Thu, 07/02/2009 - 20:05
Registration is now open for Ajaxian.com's <a href="http://ajaxexperience.techtarget.com/conference/index.html?Offer=AEtsspost701">The Ajax Experience</a>. If you're developing applications using Ajax, you don't want to miss this event taking place September 14-16 in Boston. Register before the end of this month to lock in $300 early bird savings.


Categories: Communities

A Better Looking ADF Faces Application Sample

Shay Shmeltzer's Weblog - Thu, 07/02/2009 - 18:30

One of my tasks for the Fusion Middleware 11g launch event was to build the JDeveloper/ADF part of the demo (along with Juan).
One key thing that made a difference in the resulting demo was that we got help in the design of the pages from a professional UI designer - Soraya looked at the pages we designed initially and then gave us tips on how to make the application look cleaner. She also gave us the images that were used in the application. We then worked on layouting the page according to her recommendations and on skinning some of them.

One tip for better looking UI is to try and eliminate as much clutter from your UI as possible - the application we got at the end used far less components on each page.

While you can see the result in the recorded webcast of the launch event - I thought that for JSF developers out there I would give a full screen view and skip the 40 minutes talk that come before Duncan gets to actually run through the demo.
So here is a recording of the demo running on my machine - with some explanation about the specific components used in each place.
One key point - everything in this demo's UI was done decoratively with no Javascript coding.

Categories: Companies

Rails on GlassFish - "most performant of all", "simpler and just works", "blazing speed"

Miles to go ... - Arun Gupta - Thu, 07/02/2009 - 18:03

Here are some quotes about running Rails applications on GlassFish from user@jruby mailing list:

I find the glassfish gem to be the most performant of all -- and I don't need to war-up my app.

I also have some mongrel cluster stuff, but glassfish is simpler and just works.

Voila...blazing speed, can handle lots of traffic. Note that I am also cominging into apache from a dyndns name. So, whatever IP I have, I can go straight to execution on the glassfish gem and NO warring up! What could be easier deployment, or a faster execution?

It's running fantasticly and performing like nothing I've seen before :) Completely stable memory, no wirings or anything bad for 5 days now.. (with several ab/htperf stresstests).

It's always exciting to get good endorsements of our efforts in the GlassFish team :)

Other similar stories for using Rails/GlassFish in production are described at rubyonrails+stories.

Technorati: glassfish v3 gem rubyonrails stories jruby
Categories: Companies