Nuxeo/Blogs

Nuxeo Developers Blog/News from the Open Source ECM trenches

Archive for March, 2009

Nuxeo on Glasshfish TV

without comments

Glassfish TV tomorrow!

I'll be playing Ed
McMahon
to Stefan
Fermigier
's Johnny Carson
tomorrow on Sun's Glassfish
TV
. Well, perhaps one could apologize to Paul Simon and say "you can
call me Al" … of "Stefane Fermigier et al."

We will discussing a number of key areas of interest that are of
interest to Nuxeo users/developers, Glassfish
users/developers/crustaceans, and general Web ne'er-do-wells:

  • Our analysis of the (approximately) two dozen Java web technologies
    and how they perform under the strain of a transport
    workers strike
    .
  • Our efforts to reduce the locking costs -and thus increase the
    number concurrent users served – of our large (>200,000 lines) JSF
    application, after we have had a few bottles of Beaujolais
    Nouveau
    at lunch.
  • Maximizing the heat dissapation of a large number of JVM in a small
    machine room : Reblochon
    is the answer.
  • Our proposal for a new JVM bytecode
  • Read more

Written by

March 25th, 2009 at 4:53 pm

Posted in Java,Slides

Java Management Interface, coming in 5.2 RC1

without comments

Credit Where It's Due

This blog post would not have
been possible without the diligent and thoughtful assistance of Stéphane
Lacoin. Stephain gave me the big clues on how to configure the current Nuxeo
5.2 "head" to make all the JMX stuff "turn on" and also personally tracked
down and squashed a number of bugs that made this article possible
(including one in JBoss!). Somebody, please give that man a
croissant!

Not Quite in 5.2.0.m4

This blog post is about a
feature that did not quite make it into the 4th
milestone release of Nuxeo 5.2
. It is in the current
source code
build (or you can get it from the
nightly snapshots
) but I thought those that are waiting for the release
candidate release might be interested to see what's "coming down the pike."
As of the time of this writing, it is expected to be in … Read more

Written by

March 9th, 2009 at 6:01 pm

Posted in Java,Nuxeo

Two more soldiers down

without comments

Double your pleasure, Double your fun

This has been a busy week on the book front and general purpose Nuxeo
chicanery. I’ve got a number of things cooking right now so that I can
show off features of the platform. Both of these features are of the
“should be available to the public soon” type, so I’ve had to actually
garner time from the developers to get them to give me demos and let me
capture screenshots. I hope both of those posts are available tomorrow. I
have the text of one written and the other should not be a major
hurdle.

I’ve completed two more chapters, one fairly short one about XMap and Apache
Commons Logging
. I think it’s only fair to admit that I really dislike
Apache Commons Logging beacuse it gives people the distinct idea that
writing more logging frameworks is ok. I can’t believe the … Read more

Written by

March 5th, 2009 at 9:30 pm

Posted in Uncategorized

Selenium and Ajax Requests

with 2 comments

Following Lance Ivy’s excellent post (http://codelevy.com/articles/2007/11/05/selenium-and-ajax-requests), here’s an easy way to write Selenium tests for Ajax requests when you’re not using Prototype directly, but using Ajax4JSF or RichFaces.

Add this to your user-extensions.js:

/** * Registers with the a4j library to record when an Ajax request * finishes. * * Call this after the most recent page load but before any Ajax requests. * * Once you've called this for a page, you should call waitForA4jRequest at * every opportunity, to make sure the A4jRequestFinished flag is consumed. */Selenium.prototype.doWatchA4jRequests = function() { var testWindow = selenium.browserbot.getCurrentWindow(); // workaround for Selenium IDE 1b2 bug, see // http://clearspace.openqa.org/message/46135 if (testWindow.wrappedJSObject) {   testWindow = testWindow.wrappedJSObject; } testWindow.A4J.AJAX.AddListener({  onafterajax: function() {Selenium.A4jRequestFinished = true} });}

/** * If you've set up with watchA4jRequests, this routine will wait until * an Ajax request has finished and then return. */Selenium.prototype.doWaitForA4jRequest = function(timeout) { return Selenium.decorateFunctionWithTimeout(function() … Read more

Written by

March 5th, 2009 at 1:38 am

Posted in Uncategorized

Cross validation with jsf

with 3 comments

I’m happy to have found an elegant (and easy) way to handle cross-validation of JSF components. The idea is to add an hidden input and bind it to a validator, passing component ids to validate as attributes:

<h:inputHidden value="needed" validator="#{myBean.validatePassword}">
<f:attribute name="firstPasswordInputId"
value="#{layout.widgetMap['firstPassword'].id}" />
<f:attribute name="secondPasswordInputId"
value="#{layout.widgetMap['secondPassword'].id}" />
</h:inputHidden>

Note that here, component ids are retrieved from the layout widget ids,
but any id bindings will do (taking example on what’s done when adding a
“for” attribute to a h:message tag for instance).
Note also that the hidden input has to be placed after the referenced components in the page, so that they have been validated, and had their local values set.
The “needed” value is just here because the tag requires its “value” attribute to be set on my box, even if it’s useless for us.

The validation method can then retrieve the components values:

public Object retrieveInputComponentValue(UIComponent anchor, … Read more

Written by

March 5th, 2009 at 1:31 am

Posted in Uncategorized

Events, both real and imagined

without comments

Another week, another chapter?

Yeah, I know I said I’d be releasing these chapters every day or so,
but sometimes things go astray. I had a rough week with a lot of
immigration into France problems (for my dog! my wife didn’t have any) as
well as having to install my “world” on yet another machine. I’ve got
through an old mac, a big server in the amazon cloud, and I’m now using my
desktop remotely (via the old mac) on some huge 8 way server in a Nuxeo
machine room. Sigh. Anyway, that setup is performing pretty well so I
should be out of the woods now until my new macbook comes. (Air! Will
somebody give me an Air, puh-leeze?)

This installation is nominally about Events and Event Handling–but
secretly there is a agenda! I wanted to introduce readers to all of the
tricks involved in getting eclipse to … Read more

Written by

March 1st, 2009 at 12:11 pm

Posted in Uncategorized