Monthly Archives: December 2009

NEJUG ~ JSR-299 – 08-Oct-2009

Very rough notes on JSR-299 by Gavin King from NEJUG Meeting of 08-Oct-2009


  1. Will enable deployment with subset of JEE feature set – so can leave out parts you don’t use – thinner footprint, less complexity?

Theme = Loose Coupling

  1. decouple server and client via well-defined types and “qualifiers” (beyond Interfaces)
  2. decouple lifecycle of collaborating components via
    1. server-side lifecycle management by Container
    2. allow stateful components to interact like services via message-passing
  3. decouple orthogonal concerns via Interceptors
  4. decouple msg producer from consumer via Events

Theme = Strong Typing

  1. eliminate lookup using string-based names
    1. enables smarter auto-complete, more power in compiler type checking

What’s unique?

  1. implementations of a type may vary at deployment time – without need for central list of available implementations
    1. no need to explicityl list beans (e.g., Spring) or use Java-based DSL (Guice)

What kinds of things can be injected and how?

  1. Most java classes
  2. EJB session beans
  3. Objects returned by producer methods
  4. Java EE resources (e.g., JMS topics/queues)
  5. Persistence contexts (JPE EntityManager)
  6. Web service references
  7. Remote EJB references
  8. anything else can be supported through SPI (flexible extensibility via metamodel)
  9. Can define business-sensible attributes to specify injection types (e.g., InformalGreeting extends Greeting class, then have an @Informal attribute)
  10. Can use injected object in a JSF or JSP page – e.g., container will instantiate the right objects (construct as needed, etc.) and pass it is such as in: <h:commandButton value=”Say Hello” action=”#{printer.greet}”/>
  11. Beans may need to be stateful – this is supported too – handled as lifecycle attributes such as @RequestScoped for per-request or

Scopes and Contexts

  1. Extensible context model
  2. Dependent scope, @Dependent
  3. Built-in scopes
    1. @ApplicationScoped, @RequestScoped, for servlet we have @SessionScoped [e.g., Login state object may store username in a member variable], for JSF requests @ConversationScoped
  4. Custom scopes – third party frameworks can support via SPI
  5. KEY POINT: Client does NOT know anything about the lifecycle of the session-scoped object
  6. Conversation context is scoped INSIDE OF (DOES IT NEED TO BE WITHIN, or is it just defined as more granular a SCOPE than) a session – can have more than one Concersation that don’t know about each other – supports multiple tabs, wizards, AJAX and other multi-step sub-tasks
  7. Better abstracts some concepts – a set of mappings can be defined such that a class can loosely reference (my term), say, a value from another object (like the user’s first name, from the Login object), and the container will take care of all the heavy lifting and just insert that value – nicely separates lookup logic so your business logic code can stay cleaner and refer to (as in example above) their “first name”, not the Login object directly


    1. Perceived to be more flexible, more generally useful (there are very few uses for Aspects now – nothing new in 5-10 years!)
  2. Should be decoupled from implementation via semantic annotations
  3. Should be deployment-specific – e.g., can turn off my transaction support during testing
  4. Ordering of interceptors matters – so do this centrally so you can manage/understand it – don’t bing interceptors directly to components


  1. Reuse patters – not just Interceptor bindings!
  2. Capture roles of components using stereotypes
  3. A Stereotype packages up:
    1. a default scope
    2. a set of interceptor bindings
    3. the ability to specify that beans have names by defaults
    4. (more)
  4. Uses @Stereotype annotation


  1. Can be injected – as in void Login(@Observes LoggedIn loggedin)…

Proposed final draft of JSR-299:

Seam Framework reference implementation:

JBoss doc:



Value of more Type Safety in a world where Dynamic Languages are gaining traction

Debugging might be more challenging

Performance issues?

Complexity / tooling issues?

How is this different / better / worse than Spring?


Cure for Phantom Mouse Clicks on Acer Netbook Laptop Tablet from Microsoft PDC

If you attended the Microsoft PDC in 2009, you received what appeared to be an Acer Netbook, but in fact is technically an Acer Laptop (that’s what Acer support insists), though apparently is also a considered a Tablet – the Acer Aspire 1420P Convertible Tablet PC. But a Convertible Tablet at that… 

Talk about an identity crisis. Maybe we should just call it, more simply, the PDC Netabletible Convertilizer? 

If yours has trouble with “phantom mouse clicks” – where you are typing away, and it seems that somehow the left mouse button was just clicked, but you know you didn’t click it – that can be fixed with the simple act of installing the Synaptics driver for this machine that, weirdly, will not ever show up in Windows Update.  But since this is a pretty useful update, consider doing it the old fashioned way. 

Or at least it worked for me. Though belated, this blog post may save someone the challenge of finding the cure, which I thought more difficult than it oughta be. 

The PDC Netabletible Convertilizer may not be the only one out there with this problem.

As an aside, my PDC Netabletible Convertilizer also became more usable once I recalibrated the touch screen. (How does one do that? Type into the search field in the Start menu “calibrate touch” for a link to the right part of Control Panel to make this happen…)

October 2009 Boston Azure User Group Meeting Notes

Meeting #1 of Boston Azure User Group!

Keynote speaker: Brian Lambert of Microsoft

Meeting was held Thursday October 22, 2009 at Microsoft NERD in Cambridge, MA

Mike Werner (Microsoft evangelist for Azure in the Northeast) introduced the user group at this innaugural meeting, plugged the upcoming Microsoft PDC, then introduced Bill Wilder, the guy who started the Boston Azure User Group.

Bill Wilder provided an overview of the group (powerpoint slides):

  • All meetings will have Windows Azure focus
  • Any technology or business concept – cloud models, Microsoft dev technologies, tools, and so forth – is fair game, but must be presented with appropriate Azure slant: they need to be related back to Azure or else they are not appropriate for Boston Azure User Group meetings

Brian Lambert spoke on how to build applications for Windows Azure.

Bill’s raw notes from Brian’s talk:

  • Can call unmanaged DLLs through Full Trust
  • “Fabric Controller worries about the “shape” of your app”

Worker Roles

  • Background processing – utility computing
  • May communicate with outside services
  • Not externally visible to client
  • Queues ~ how we communicate to a Worker Role ~ since both Worker Roles and Web Roles can talk to storage (like Queues), this is a good medium

There are public and private containers in blog storage. Public is the only accessible to clients (w/o keys that is).

Partitioned for scale

Blobs = ? “cloud files”

  • Up to 50 GB / blob + 8k of metadata

Azure Dev Workflow:

  • Add some Web Role(s)
  • Add 0+ Worker roles
  • Add Service  Configuration
  • Add Service Package
  • Upload to Windows Azure Management Portal
  • Deploy to Windows Azure Fabric Controller
  • Provision / Run the roles and storage needs; monitors the health

Sticky Storage ?


Azure Tools + Azure SDK


For “dev” + “test” + “etc.” – may want to use REAL azure accounts – not just the “other account” you have in your main production account


Need to handle the “at least one worker role will work on it” contract – your application needs to be designed for this…

“poison message” – due to bug or oversight or bad data, a message from the queue will NEVER be successfully handled. App needs to handle this currently.

Queue timeouts can have different values – could be, say, different for different message types.


Worker Role => a class that inherits from WorkerRoleMain (what was this class name??)

Fabric occassionally calls GetHealthStatus() which returns a RoleStatus. If you tell the Fabric you are Unhealthy, the Fabric may slay you? Maybe your NIC card is flakey, so your performance to external web services is too slow?


Public container for blob – for actual image (full size) linked to from the thumb.

“Fiddler is your friend when you’re working … watch your requests.”

Dev Fabric + Cloud Storage is an excellent mode to run in for effective debugging – can watch the message traffic with Fiddler.

“There is no debugging in the cloud. There’s logging.”

RoleManager can also write to “local storage” [[more interesting access / features coming soon!]] – then can go to Portal and use “configuration” button to update your config file to “copy logs” (did they move it?)


can even bring web site up with http://localhost:8020 

WorkerRole is very simple to just run it in a process

Use Test Running to fire up a WorkerRole

  • Tight dev cycle
  • Can also now run a performance profile

Tricks: log in “real fabric”, write to console in “dev fabric”

Intuit as a Service

My notes from Intuit talk at Boston Cloud Meetup on Nov 3, 2009.

Per Alex Barnett of Intuit – only 12% of 4m Small Businesses not willing to use hosted data with SaaS.

Webware 100 finalists… best software solutions.

How do cloud-based apps Integrate?

  • Finance system know the project in Basecamp is done
  • Calendar know about CRM

Simplify by mapping services to a COMMON DATA MODEL (this is a REALLY big deal, IMHO).

QuickBooks have 4 m customers who have effectively agreed on a database schema… exposed an API to this data store. Nice…

The “Small Business Data Cloud” – available today from Intuit – as the Intuit Partner Platform.

native apps

  • Flex applications hold the logic
  • Server-side Java coming in development

federated apps

  • identity
  • data
  • billing
  • most of the action is over here (rather than native apps)

They expect to ship 1.7 m units of QB 10 over next 6-12 months – this will really launch the platform.

4 m users spending 4 b hours per year of screen time

25 million users within these Small Businesses

FAST TIME TO VALUE through SaaS solutions.

Intuit keeps 20% of the rate, rest goes to developers

Can have trial-periods, entitlements (monthly-charged extra features), more options coming next year.

Developers support the apps – Intuit supports everything else. – some Open Source in here

  • some code uses SAML
  • support Java, Python, Ruby, PHP, and .NET versions of code, such as SAML gateway

Intuit – SMB, 4m customers

Salesforce – Enterprises, 25k customers

Is it a per-user, or per-customer license? Intuit end-users don’t need a license.

Don’t need to license QuickBooks to use the overall platform – but there may be some synergies.

Intuit certifies apps for use in their marketplace. Federated apps go through a third-party security assessment – on Intuit’s dime today, though that may change in the future.