Saturday, December 31, 2011

Wishing you a Happy and Prosperous New Year!

Even if I didn't intent to write another post, I came across a wonderful offering of my former mentor and inspiration Friedhelm Fischer. Back in the days he was the one responsible for growing my interest in programming and web technologies. Nowadays he is marketing responsible for a German company after successfully running a web design company for years. He also is into 3D modeling and DSLR filming. Check out his website, if you have a second left during the leaving 2011.

Free greeting card done by Friedhelm Fischer

An optimist stays up until midnight to see the new year in. A pessimist stays up to make sure the old year leaves.
Bill Vaughan

Wishing you a good start into 2012! Thanks for your interest, your time, your thoughts! Looking forward to a wonderful 2012!

Saturday, December 24, 2011

The Heroes of Java: Rod Johnson

The 10th part of my "Heroes of Java" series. This is the Christmas edition and I would like to thank all readers for their interest in my series! If you have ideas for interview partners: Let me know!

Rod Johnson
is the father of Spring, which grew out of his influential book, “Expert One-on-One J2EE Design and Development,” which initiated the “lightweight” transformation of enterprise Java. Rod co-founded SpringSource, where he served as CEO until its 2009 acquisition by VMware, where he is now a Senior Vice President and leading VMware’s SpringSource product division.
Rod is an authority on enterprise Java architecture, a thought leader on open source development and business models, and a popular speaker at conferences around the world. He remains actively involved in guiding the direction of Spring and is a member of the Java Community Process (JCP) Executive Committee (EC). Rod has over 15 years technology, management and business experience. He holds a BA with Honors in Computer Science, Mathematics and Musicology as well as a PhD from the University of Sydney.

General part
Who are you?
I’m a musician, computer scientist and businessman. The order changes every so often.

I spent several years as a Java developer and architect, wrote two books on enterprise Java architecture based on that experience, and out of that founded the Spring Framework, and then a business around that.

Your offical job title at your company?
I’m Senior Vice President, Application Platform, at VMware. Prior to that I was CEO of SpringSource.

Do you care about it?
I believe in what we’re doing and I really like working with my colleagues. I think VMware has some really good values as a company.
Do you speak foreign languages? Which ones?
I read French fluently, or at least I used to. My spoken French is extremely limited, however. Unfortunately, as for most English speakers, my foreign language skills are very poor.

How long is your daily "bootstrap" process? (Coffee, news, email)
It varies how much I have time for. The two essentials are a shower followed by a latte, which I prefer to make myself: I love the ritual. I’m not a morning person, so I need a kickstart. All up it takes about 30 minutes before I’m ready to leave the house, or go into my study if I’m working from home.

I also scan my email on my phone, to see if there’s anything urgent I need to think about or respond to. On the weekends I have time to read the New York Times and Sydney Morning Herald on my iPad, and cook breakfast for the family.

When I’m in the States I like to listen to NPR on the drive to work, when I’m not on conference calls.

Twitter
You have a twitter handle? Why?
I originally got into twitter as a marketing tool [Ed.: @springrod]. But I always felt that it had to be authentic, so I would never tweet anything unless I truly cared about it and meant it. Today I often go a long time without tweeting, but I also tweet some personal stuff. My wife once got offended when I tweeted about her broken leg. I’m not sure why twitter can get addictive, but it does, at least from time to time.

Whom are you following in general?
Mainly other tech people whose thoughts interest me. And also friends. I’m happy to avoid celebrities. I don’t follow too many people, as I don’t want to be overwhelmed and find twitter another source of stress. There are enough already.

Do you have a personal "policy" for twitter?
Not really. I do think privacy is important, so I would never tweet things about other people that they might not want publicized. I’ve been surprised when people have tweeted things that I would have thought were better kept among friends.

I do believe it’s important that everything I tweet is honest. If I can’t say what I truly feel about something, I’ll shut up.

Does your company restricts or encourages you with your twitter usage?
There’s no formal policy. Certainly no restriction. We encourage people to tweet to interact with the developer community. Essentially, just to be themselves.

Work
What's your daily development setup? (OS/IDE/VC/other Tools)
SpringSource Tool Suite. I love the convenience of an integrated distribution, optimized for the things I care about. And Powerpoint, unavoidably.

Which is the tool providing most productivity to your work?
Probably my smartphone. It’s incredible to think this technology didn’t exist just a few years ago. I couldn’t live without it.

Your preferred way of interacting with co-workers?
Anything but email! Email is a scourge on productivity and happiness at work. It’s evil, and most emails are pointless.

We’ve always used Skype a lot at SpringSource. It’s handy to be able to IM and then slip into a voice or video conversation as needed.

Face to face communication is best of all, but we have always been a distributed team.

What's your favorite way of managing your todo's?
I tend to use handwritten lists a lot. I’m most productive when I’m working through a list.

Lists are great, but pen and paper is a bit primitive. Tasktop is a nice way of linking a todo list with applications running on the desktop. It’s based on the Eclipse platform, too!

If you could make a wish for a job at your favorite company: What would that be? I’d want to be either CEO, or in a purely technical role as an architect/developer.

Java
You're programming in Java. Why?
It’s the most popular language in the world, for some good reasons. It runs nearly everywhere, it performs well, it has comprehensive libraries, and it’s easy to understand code written in it. The last point is really important. Take C++, Perl or Ruby: A lot of code written in those languages is hard to pick up except by the author.

I find Java the most useful language for most of the things I want to do. It’s not perfect, but it’s a good tool.

What's least fun with Java?
It’s a verbose language. String handling sucks.

If you could change one thing with Java, what would that be?
There are quite a few things that could be made less verbose, like variable declarations. I still miss default method argument values from C++. On the whole I think the improvements being made in the language in 7 and 8 are on the right track, and will make it nicer to program in Java.

I’m not really a language purist or language geek. In general I think it’s more important what’s available around a language than in the language itself. Frameworks and libraries give a language leverage and make it useful.

What's your personal favorite in dynamic languages?
I’ve played around with Ruby and Groovy most, but I haven't fallen in love yet.
Which programming technique has moved you forwards most and why?
I think it was when I truly got object orientation. It’s such an elegant means of modeling a lot of domains.

What was the biggest project you've ever worked on?
Definitely the Spring Framework project. Not so much in terms of lines of code, but in terms of level of activity and team collaboration and how critically important it is as infrastructure relied on by millions of developers. I’ve worked on a number of big industry projects, especially in banking, but they were less challenging.

Which was the worst programming mistake you did?
I’ve made many mistakes, but at least I do tend to refactor them away! Unless Juergen gets to them first.

Thursday, December 22, 2011

Moving Java Forward? A definition. A year in review.

This post is among many other "year end" blog-posts and reviews. But it was intended not to be like this. I'm trying to summarize what I have learned about Oracle and Java in 2011 and I also try to explain what "Moving Java Forward" means to me and what I think should be better or simply changed a bit. Thanks for following my blog through the year and thanks for the many comments, visits, downloads, follower on Twitter and personal conversations on meetings and conferences. I enjoy sharing: Thoughts, tips, tricks, experiences, pictures and whatever comes along my way on the journey called "Enterprise Java". I am wishing you and your loved ones a wonderful, peaceful Christmas time and a happy new year! (btw: one last post will follow Christmas Eve ;) be sure to check it out!)

"Moving Java Forward". Probably the sentence of the year 2011. At least for the Java Community. After long months of discussions about the Sun acquisition and what it mean for Java and the whole ecosystem around, 2011 finally was the year to deliver. And that is exactly what happened. Oracle delivered Java 7. After long four years, seven months and seventeen days Java developers around the world have been able to play around with the new features and start embracing them in their daily projects. From an Oracle perspective the "Moving Java Forward" slogan simply expresses what they are committed to:

Moving Java Forward - Oracle's Part : Deliver On Promises
Keep the backbone of their portfolio alive and kicking. But: The community is skeptical. Over a period of long years they have been used to a friendly Sun. Used to a lot of community support and openness around. It's unfair to call Oracle the complete opposite of Sun; but especially the parts which are involved with community communication and openness are (probably still) underdeveloped within this "multinational computer technology corporation" (Source: wikipedia). The reasons for that are understandable. There are big differences in supporting paying customers and collaboratively developing a platform ecosystem of the size of Java. And even if I personally believe, Oracle could be awesome at the second part, there is still another thing to take care of: Finding the balance between investment into the ecosystem and generating real value from it. Even if Simon Phipps (@webmink) denies my thoughts about the Oracle OSCON Keynote back in July (especially the comments about Sun earning money), I still believe that the information presented there are the key part in understanding the way Oracle is interacting with the communities. And this is still backed by Lines of Business (LoB). So, to turn it around I guess that every LoB has/or is willing to "adopt" an open source project from the larger Java ecosystem. If you see anybody around from OTN (e.g. @Java, or the Java Magazine) they are paid by the LoBs and it's most important to get this community message clear to every responsible PM and above at Oracle: Every single cent or minute invested in OTN and the community is paying back to you! If you are not supporting OTN you deny to deliver on Oracle's promises and you miss the chance to get your value back. And it's worth it: We are paying in a currency called "Adoption"! Broad adoption!

Moving Java Forward - Community Part : Broad Adoption
After the worldwide launch events in July the adoption of latest Java 7 started to grow. More and more products and projects get either certified or start implementing the latest available features. Apart from minor problems with early releases this is on a good road. The community is working through features and use cases. Presenting and writing a lot about technical stuff again. The most popular OTN article of 2011 is about Java 7's Fork/Join Framework and it was hard to find a single Java related conference program without a slot on any of the new Java 7 features. For me personally this was a powerful Java year. Not only the SE adoption with latest features was a big topic but also the reach of EE 6 which is some years old now started to make big progress. More and more servers got certified and even commercial projects started adopting the new release. This wouldn't be possible with all the early adopters from the community. Not sleeping until the last interested developer knows about the details about relevant specifications. And this also wouldn't be possible if Oracle decided to move things on their own.

Moving Java Forward - Industry Effort : Commitment 
Java is claiming to be an industry standard. Especially the platforms have obviously been build with products and industries in mind. Compared with the community noise about Oracle's stewardship the news about supporting corporations have been sporadic. After Apple and IBM joined the OpenJDK and Apache leaving the JCP back in 2010 this year didn't surprise us a lot. Twitter joined both the JCP and the OpenJDK. Taking long time Oracle employee Adam Messinger as a substitution. Another new face is ARM. They joined the Java ME Executive Committee (EC). What about Google? Are they in? Working? Doing anything? Fact is, that all the corporations supporting the JCP do this comparatively silent. You can see the individual JSR's review ballots as an overall mood and health check of single companies. Google is more or less passionless on the EE JSRs; strictly voting NO on SE improvements with regards to licensing terms. Yep. I got it. As long as both Oracle and Google are working out this endless law suite we will not see a single Google speaker at an Oracle conference or read about any significant involvement with new JSRs. A shame. For both Oracle and Google. Oracle because they are unable to find a shorthand solution to this old Sun heritage and Google because they are obviously not able to divide community issues from company issues. You will ever be my favorite web search whatever service. But by refusing to send your employees to the (still) biggest Java conference around you are hurting the Java Community and NOT your opponent. Back to the "Moving Java Forward" title of this post: Google is doing it wrong here, if you ask me! Let's see how long this will work out for them before they are hurting their reputation.
This is a very personal impression which obviously lacks precise information. But this lack of information is true for nearly any single company on the JCP (with RedHat making a huge difference because of their team!) A more general wish would be to actually see the involvement of bigger corporations with Java. Wouldn't it be nice to have a jcp.org/members/company page where anybody could see, what associated members belong to them and where they are contributing? Nearly every single social network as an engagement indicator. What about the JCP? I would love to know more about the single companies to keep track of their Commitment.

Moving Java Forward - Combined Effort : Collaborative development
Back to the alive and kicking members of the JCP. Beside the few non-Oracle JSRs the whole ecosystem is more or less driven the way, Oracle was used to it. Them delivering the products (JSRs, RIs, and more) and supporting the adoption. But a necessity for a vibrant ecosystem is the collaborative development. A key to success of an industry standard is broad support and joint development. And all the community pressure was successful. A new version of the Java Community Process (JCP 2.8) was build in the public (JSR 348). As of 18 October 2011, every new Java Specification Request (JSR) will be required to conform to the terms of the new JCP with the most challenging goal to support a "new era of complete transparency" (Source: JCP). Backed by the java.net infrastructure every single JSR should open their discussions to the public and be open for continued feedback. Realizing that the JCP still is a very formal (JSPA) and slowly moving organization the London JUG proposed the "Adopt a JSR" program to their members. This program is intended to encourage members of the LJC to get involved in a JSR and to evangelise that JSR to the wider LJC community in order to increase grass roots participation. Most important lesson to learn for Oracle: Open specification is great. And more and more JUGs are joining, too. Gathering a broader community feedback is a challenge with a formal process. To me it seems as if it would be best to have an anonymous feedback box as part of every single JSR. I know about a lot of people feeling not precious enough to provide visible and open feedback. It would be best to either anchor a general feedback loop with the JUGs or build a "baby hatch" into the JCP. Find a way for everybody in the community to bring in what is out there. And don't let a single idea die because of missing courage or fear.

Moving Java Forward - Your Personal Effort : Spread the word!
Those four pillars are basically the cornerstones of the Java ecosystem. Oracle, the broader industry the active community and their collaborative development. But as with any single other organisation it is not enough to simply structure and guide every little legwork. What is needed is the personal engagement of every single one of the 9 million Java developers out there. But how could this look like? It could be simple: Start using Java (more) regular. Share your knowledge. Give feedback. Engage with your local Java User Group. Attend conferences and most important be an active user by hunting bugs with early releases, trying out new features with your year old project and keep being curious for new stuff. If you know something that is valuable to your team, your department or even your company: Share it. Try to setup a monthly learning Friday. Write some stuff: blog-posts, articles, tweets, whatever. To make it short: Spread the word. And keep moving forward.

"Even if you are on the right track, you'll get run over if you just sit there."
Will Rogers

Thursday, December 15, 2011

Running RichFaces 4.1.0.Final on WebLogic 12c

You might have noticed, that I simply love JSF. Not only the specification and the reference implementation Mojarra but also the most creative component suites on the market. This is my all-time favorite PrimeFaces and of course RichFaces. This is the reason why you find "running xxx on xxx" posts here :) Today is my RichFaces and WebLogic day, so a little followup on my earlier post this is more an update on how to get it running on latest WebLogic 12c. Here we go:

Preparation
Download the IDE of your choice. I will use NetBeans 7.1 RC 2 for this post. Download and install WebLogic Server 12c. Either with the platform installer of your choice or from the ZIP distribution. Go on with creating a domain and adding the server to NetBeans. (For more details see my earlier post.) Go back to NetBeans, check your maven settings and create a new Maven Web Application project. Let's call it rfshowcase for now. Enter the missing stuff (Group, Version and Package). Select or add your local Oracle WebLogic server as your runtime environment. Add the JBoss Maven repository and the magic richfaces-bom to your pom.xml:

<repositories>
 <repository>
 <id>jboss</id>
 <name>JBoss Repository</name> 
 <url>http://repository.jboss.org/nexus/content/groups/public/</url>
 </repository>
</repositories> 

<properties>
 <org.richfaces.bom.version>4.1.0.Final</org.richfaces.bom.version>
 <!-- ... -->
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.richfaces</groupId>
                <artifactId>richfaces-bom</artifactId>
                <version>${org.richfaces.bom.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
<!-- ... -->
        </dependencies>
    </dependencyManagement>

Add the RichFaces dependencies:

<dependency>
 <groupId>org.richfaces.ui</groupId>
 <artifactId>richfaces-components-ui</artifactId>
</dependency>

<dependency>
 <groupId>org.richfaces.core</groupId>
 <artifactId>richfaces-core-impl</artifactId>
</dependency>

And you are done! Unlike with earlier version of WLS (compare my older post) JSF 2.x and JSTL 1.2 have been incorporated directly into the server's classpath. Applications deployed to WebLogic Server can seamlessly make use of JSF 2.x and JSTL 1.2 without requiring developers to deploy and reference separate shared libraries. So, you can actually start implementing your application.

Some simple tests
Let's go and add an index.xhtml to your Web Pages folder. Add the RichFaces namespaces to your html tag:

xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"

And start using your needed components. In my little example I stripped down the rich:panelMenu taken from the showcase.richfaces.org . Now right click on your project and "Run" it! NetBeans is starting your WLS instance and deploys your application. After this is done it should open a browser which points you to http://localhost:7001/rfshowcase/ and you see your application up and running. That's all. Nothing more to do. No library deployment, nothing else. That's what I would call a good progress. Compared to the stupid library deployment that was needed with earlier versions of WLS you know have the freedom to use whatever comes your way. Even if you feel like using another RI you could simply revert the classloader by specifying the prefer-application-packages tag in your weblogic.xml

13.12.2011 20:48:43 org.richfaces.application.InitializationListener onStart
INFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.1.0.Final

Clazzloading or Oracle and RedHat vs. Google
If you look at your application from a classloader point of view you will see, that you have a good number (705) of classes in conflict. In the case of RichFaces all these are in the com.google.common.* package. The reason for that is, that WLS is distributing a com.google.common_1.0.0.0_0-6.jar which conflicts with the RichFaces dependency com.google.guava.guava.r08. Running my small tests this doesn't seem to do any harm at all. But it would be best to configure a so called FilteringClassLoader which provides a mechanism for you to configure deployment descriptors to explicitly specify that certain packages should always be loaded from the application, rather than being loaded by the system classloader. So you should change your project to be an EAR module and add this little paragraph to your weblogic-application.xml (ear level):
<prefer-application-packages>
   <package-name>com.google.common.*</package-name>
</prefer-application-packages>

I'm NOT speaking at Kscope12, 24th-28th June 2012 in San Antonio

ODTUG Kscope12 is the place to be for the Oracle technical community in 2012. If you are a developer, architect, technical lead, or database administrator who works with Application Express, Business Intelligence, Oracle EPM; including Hyperion products, Essbase, Planning; Database Development or Fusion Middleware, Kscope12 is where you should be. It’s hard to find a conference that’s big enough to attract world renowned speakers and small enough to get the chance to share knowledge. Kscope12 is that conference. Find it on http://lanyrd.com/2012/kscope12/

UPDATE: 20.02.2012
Oracle OTN notified us today that they are not going to sponsor Kscope12. The updated Oracle ACE Director Travel Support Policy lists Kscope as one of those conferences, which:
"[...] are well-established conferences and communities, in FY13 we will not provide travel support [...]"
Unfortunately this means, that I will not have a sponsor for travel and accommodation and therefore I will have to withdraw my session proposals which I am going to do in a minute via email. So, I wish everybody a wonderful conference.

Original post (for your reference):
After two wonderful Kscopes in 2010 and 2011 I have the pleasure to attend a third round. This time in San Antonio, Texas in the JW Marriott which combines the rustic beauty of the Texas countryside with the upscale elegance of the flagship property. Built in 2010, this property boasts a state-of-the-art meeting space and Internet access.

I will be giving two sessions about Java EE and WebLogic server. And yes, I will use WebLogic 12c for everything I am going to show :)

Session-ID: 324822
Java EE - Running vanilla Enterprise Java on your FMW
Date: 6/26/2012 Time: 8:30 AM-9:30 AM
Your running FMW with the whole stack? Running ADF, SOA, BPM, Applications? And you are wondering what else you can do with your WebLogic Server? Let's deep dive into what the Java Enterprise Edition (Java EE 6) Specification has to offer as an industry standard for developing and running Java in the Enterprise. Get a brief introduction into Java EE and it's containers. Learn about the contained specifications and see what you can achieve with the Oracle Enterprise Pack for Eclipse to develop a custom and simple Java EE app.

Session-ID: 324829
WebLogic Server Developers 101
Date: 6/25/2012 Time: 4:15 PM-5:15 PM
The Oracle WebLogic 12c application server product line is the industry's most comprehensive Java platform for developing, deploying, and integrating enterprise applications. It provides the foundation for the complete Fusion Middleware Stack. This session brings you the real basics. Everything you need to know about basic concepts (Domains, Servers) your environment (Nodes, Instances, Clusters) and the configuration options. You get to learn how to monitor WebLogic Server instances and get the needed information out of the various configuration options.

Tuesday, December 13, 2011

Next gig tonight: Java EE 7 update for JUG Darmstadt

Normally I don't do this kind of posts happily. But this one is an exception. The German Java User Group Darmstadt was kind enough to invite me to speak about my favorite topic. With all the topics I have talked about in 2011 I thought it would be a good idea to update the guys on Java EE 7 roadmap and progress. And I was right! Why? Johannes Leebmann designed a really nice poster for the event and I simply love it! This will be a great evening! Looking forward to tonight. If you feel like going, find more details and information about how to register at the jug-da.de website.


And one last thing: A big "thank you" to msg systems ag (Travel and Logistics) for supporting both me and the JUG Darmstadt tonight!


UPDATE 14.12.11:
Here are the slides! Hope you like them! (Beside the title, they are completely English, btw :) So, don't fear looking at them ;)

Scaling up to WebLogic 12c Server from GlassFish 3.x

One of the main goals of Oracle's strategy for GlassFish server was to "integrate with Fusion Middleware and Products" (source: Community Roadmap May, 2010). Back in this year you heard a lot of fears and rumors about the two servers becoming one. Seeing both products moving forward in terms of features and releases it gets clearer what that strategy could be. Beginning with GlassFish's support for a limited set of weblogic specific deployment descriptors, Oracle also moved on with WebLogic to do the same. Beginning with 10.3.6 WebLogic Server adds support for reading and using GlassFish's web deployment descriptors. These are glassfish-web.xml and sun-web.xml. This is useful for providing specific GlassFish behavioral settings and mappings for resources and security to WebLogic Server. The goal behind that obviously is to allow a GlassFish application to be deployed more easily to WebLogic Server and vice verse.



What WebLogic knows about GlassFish
WebLogic Server detects the presence of GlassFish web deployment descriptors in WAR files and parses them. Known entries are parsed into WebLogic server settings and applied at runtime via WebLogic MBeans (weblogic.j2ee.descriptor.wl.WeblogicWebAppBean).
WebLogic always will use an existing weblogic.xml instead of the GlassFish deployment descriptors if it is present and WebLogic applies the settings at runtime which means, that no weblogic.xml is actually generated.

glassfish-web.xml Element Name Weblogic Support (weblogic.xml)
context-root context-root
security-role-mapping
role-name
principle-name
group-name
security-role-assignment
role-name
principle-name
principle-name
session-config
session-manager:manager-properties:reapIntervalSeconds
session-manager:manager-properties:maxSessions
session-manager:manager-properties:directory
session-manager:manager-properties:timeoutSeconds
session-descriptor
invalidation-interval-seconds
max-in-memory-sessions
persistentOstoreOdir
timeout-secs
ejb-ref
ejb-ref-name
jndi-name
ejb-ref-description
ejb-ref-name
jndi-name
resource-ref
res-ref-name
jndi-name
resource-description
res-ref-name
jndi-name
resource-env-ref
resource-env-ref-name
jndi-name
resource-env-description
resource-env-ref-name
jndi-name
class-loader
delegate
container-descriptor
prefer-web-inf-classes
jsp-config
checkInterval
keepgenerated
scratchdir
jsp-descriptor
page-check-seconds
keepgenerated
working-dir

If you deploy a GlassFish web-application to WebLogic you get some log messages with INFO level and you can follow what is happening:

<Info> <HTTP> <BEA-101392>...
<Glassfish Descriptor element <glassfish-web-app> is not supported>
<Glassfish Descriptor element <context-root> was successfully parsed and applied>
<Glassfish Descriptor element <idempotent-url-pattern> is not supported>
<Glassfish Descriptor element <property> is not supported>
<Glassfish Descriptor element <reapIntervalSeconds> was successfully parsed and applied>
<Glassfish Descriptor element <res-ref-name> was successfully parsed and applied>
<Glassfish Descriptor element <jndi-name> was successfully parsed and applied>
<Glassfish Descriptor element <delegate> was successfully parsed and applied>
<Glassfish Descriptor element <keepgenerated> was successfully parsed and applied>


Compared to what GlassFish knows about WebLogic, this is still a very limited set of parameters. But it covers the most needed ones. And we are still looking forward to even less xml configuration with further Java EE versions. But let's look at the other side.

What GlassFish knows about WebLogic
GlassFish Server offers limited support for the weblogic-application.xml, weblogic.xml, and weblogic-webservices.xml deployment descriptor files. The only element in weblogic-application.xml that GlassFish Server supports is security. The equivalent element in the glassfish-application.xml file is security-role-mapping.

weblogic.xml Element Name GlassFish Server Support
role-name under security-role-assignment role-name under security-role-mapping glassfish-web.xml equivalent
principal-name under security-role-assignment principal-name under security-role-mapping glassfish-web.xml equivalent
resource-description resource-ref glassfish-web.xml equivalent, but resource-link not supported
resource-env-description resource-env-ref glassfish-web.xml equivalent, but resource-link not supported
ejb-reference-description ejb-ref glassfish-web.xml equivalent
service-reference-description service-ref glassfish-web.xml equivalent
timeout-secs under session-descriptor timeoutSeconds property of session-properties glassfish-web.xml equivalent
invalidation-interval-secs under session-descriptor reapIntervalSeconds property of manager-properties glassfish-web.xml equivalent
max-in-memory-sessions under session-descriptor maxSessions property of manager-properties glassfish-web.xml equivalent
persistent-store-dir under session-descriptor directory property of store-properties glassfish-web.xml equivalent
prefer-web-inf-classes under container-descriptor delegate attribute of class-loader glassfish-web.xml equivalent
context-root context-root glassfish-web.xml equivalent
cookies-enabled under session-descriptor Servlet 3.0
cookie-name under session-descriptor Servlet 3.0
cookie-path under session-descriptor Servlet 3.0
cookie-domain under session-descriptor Servlet 3.0
cookie-comment under session-descriptor Servlet 3.0
cookie-secure under session-descriptor Servlet 3.0
cookie-max-age-secs under session-descriptor Servlet 3.0
cookie-http-only under session-descriptor Servlet 3.0
url-rewriting-enabled under session-descriptor Servlet 3.0
persistent-store-cookie-name under session-descriptor Cookie-based persistence is supported
keepgenerated under jsp-descriptor keepgenerated init parameter of JspServlet
working-dir under jsp-descriptor scratchdir init parameter of JspServlet
compress-html-template under jsp-descriptor trimSpaces init parameter of JspServlet
index-directory-enabled under container-descriptor listings init parameter of DefaultServlet
index-directory-sort-by under container-descriptor sortedBy init parameter of DefaultServlet
save-sessions-enabled under container-descriptor Same as asadmin redeploy --keepstate=true or keep-state in glassfish-web.xml
run-as-principal-name under servlet-descriptor principal-name under servlet glassfish-web.xml equivalent


weblogic-webservices.xml Element Name GlassFish Server Support
webservice-type Possible values are JAXRPC or JAXWS. GlassFish Server does not support JAX-RPC web services with JSR 181 annotations. The use of this element is limited, because the container can find out if the type is JAX-WS or JAX-RPC based on presence of JSR 181 annotations.
wsdl-publish-file Same as wsdl-publish-location in glassfish-web.xml
service-endpoint-address Similar to endpoint-address-uri in glassfish-web.xml, except that webservice-contextpath and webservice-serviceuri are specified separately
j2ee:login-config Same as login-config in glassfish-web.xml
j2ee:transport-guarantee Same as transport-guarantee in glassfish-web.xml
exposed under wsdl Accepts true or false, defaults to true. Controls the publishing of WSDL to clients.
stream-attachments Accepts true or false, defaults to true. Only for JAX-WS web services. Configures the JAX-WS runtime to send attachments in streaming fashion.
validate-request Accepts true or false, defaults to false. Only for JAX-WS web services. Configures the JAX-WS runtime to validate that request messages are as the WSDL definitions specify.
http-response-buffersize Property of ReliabilityMessagingFeature configuration, similar to ReliableMessagingFeature.setDestinationBufferQuota()
reliability-config Partially supported. Subelements map to Metro's ReliabilityMessagingFeature.
inactivity-timeout under reliability-config Maps to ReliableMessagingFeature. getSequenceInactivityTimeout()
base-retransmission-interval under reliability-config Maps to ReliableMessagingFeature. getMessageRetransmissionInterval()
retransmission-exponential-backoff under reliability-config Maps to ReliableMessagingFeature. getRetransmissionBackoffAlgorithm(). Returns enum values, one of them is exponential.
acknowledgement-interval under reliability-config Maps to ReliableMessagingFeature. getAcknowledgementTransmissionInterval()
sequence-expiration under reliability-config Maps to ReliableMessagingFeature. getSequenceInactivityTimeout(). In WebLogic Server this value applies regardless of activity. In Metro it applies only to inactive sequences.
buffer-retry-count under reliability-config Maps to ReliableMessagingFeature. getMaxMessageRetransmissionCount()
buffer-retry-delay under reliability-config Maps to ReliableMessagingFeature. getMessageRetransmissionInterval()


But for what is all that good for?
Good question. There are some possible interpretations for what is happening.
1) GlassFish could be positioned as a certified, lightweight development platform for Oracle's FMW stack based on WebLogic server. If this would be the main goal, I wouldn't expect WebLogic to understand any of the GF DDs but GF knowing about all tweaks and settings of WLS.
2) Easy re-deployment of GF apps on WLS. This is what you find on the official launch slides. If you are running GF and you need to scale up to WLS you have a more easier migration path.
3) Both teams are trying to get hands on the concepts and switches of the other side. The GF roadmaps from the past highlight a "Common Server Platform" for WLS and GF. So knowing each other could be an easy and obvious first step for the teams.
As always, a bit of everything might be true. So there is nothing else left for now than simply to be happy about and watch how both excellent servers come closer together and to be open for future possibilities.



Monday, December 12, 2011

The Heroes of Java: Agnes Crepet

The ninth part in my Java interview series: "The Heroes of Java".

Agnes Crepet
is a French Java Software Architect, involved in the community (JUGs Leader, Conference and podcast Curator). After 10 years working in France, I decided few months ago to do a break and I took a sabbatical. I started a world trip (Africa, Asia, USA...) not only to discover the world but also to meet the technical communities around the world. So, during this (awesome) trip, I do some non profit jobs (Java trainings for African students for example), some talks for local JUG (Togo, Kuala Lumpur, Jakarta) about Design Patterns, Agile practices... And I bring some help to launch new Duchess group in some countries : you can read my feedback about the launching of Duchess Africa and Duchess Indonesia... Beside Computer Science field, I'm the president of Avataria association, which curates music gigs and Linux Party!

General part
Who are you? (Describe yourself in max three sentences)
I am a passionate technologist with over 10 years of software development experience as Developer, Architect, or Agile Coach. Beside my professional job, I'm also involved in the Java community : founder of the French conference Mix-IT and the podcast Cast-IT, and leader of two JUG: Duchess France and LyonJUG.

Your official job title at your company?
Currently I'm a Geek-Trotter! I'll come back to France in next April and will return to my regular job : I'm a Software Architect for the IT department of a French pharmaceutical laboratory, called Boiron, specialized in Homeopathy.

Do you care about it?
No! I care more about the job itself and its context, the latitude you have, the interests of the projects...

Do you speak foreign languages? Which ones?
French is my mother tongue and I speak English... not very well! During my world-trip, I do some technical talks for local JUGs, in English! I hope the attendees understand me... ;-)
And I speak a little Spanish...

How long is your daily "bootstrap" process? (Coffee, news, email)
During my breakfast, I read news, check my mails (without answering yet), Twitter and Google+. So my breakfast might be sometimes 45 minutes long ;-) ! I then have to commute by car for another 45 minutes. I usually share the drive with a colleague of mine, which he's also a friend. We have plenty of time to speak about just everything, so I come to work very relaxed and ready to rumble! I grab a mandatory coffee at the vending machine (an other occasion to discuss with acquaintances, which is often where you learn the most valuable things about your company!), and I gather my teams to run the morning stand-up with each one.

Twitter
You have a twitter handle? Why?
Yes, I do have one: @agnes_crepet. I use it mainly for keeping in touch with latest technical development.

Whom are you following in general?
I mainly follow people involved in technical communities I care about. I also like to follow former colleagues and people I've met during my world-trip. It's an easy way to keep in touch.

Do you have a personal "policy" for twitter?
I rarely speak about personal concerns on Twitter. I also try not to tweet to much : I don't like people who clutters my timeline, and usually unfollow them if they tweet more than thirty times a day!

Does your company restricts or encourages you with your twitter usage?
My company blocks Twitter and other social networks. What a shame! As it is now my main tool for technical watch, I'll try to make it change when I go back from my sabbatical!

Work
What's your daily development setup? (OS/IDE/VC/other Tools)
My machine is a Dell Vostro V130 running with Ubuntu Oneiric, easily transportable during my travel. My IDE choice is Netbeans, and I use Git for my personal projects (on GitHub), and Subversion at work. My projects are mostly Maven-based, and under continuous integration servers like Jenkins/Hudson.

Which is the tool providing most productivity to your work?
I discovered Play!Framework 6 months ago, and I'm now hooked! Finally an easy and productive Java web framework! On the non technical side, Atlassian's bug tracker JIRA is very well thought for task managements in our teams.

Your preferred way of interacting with co-workers?
A great part of my job I really enjoy is when you have to share your knowledge with your co-workers. During some meetings, when you have to take a decision about a technical stuff, I like when each one tries to defend its point of view, takes a pen and draw its concerns on paperboard. I simply like when we build things together. With fun, because I am convinced that when people have fun, when they are passionate, they can give the best of themselves.

What's your favorite way of managing your todo's?
As work, in our projects, we use JIRA as I said. For my personal collaborative projects, it's a mix of Trello and Google Docs. And my simplier tool might just be some notes on my smartphone!

If you could make a wish for a job at your favorite company: What would that be?
I dream of a company where I can work remotely from Bali, London, or Lyon ;-) !
I'd like technical watch being an acknowledged and inherent part of a developer job. A company where knowledge sharing would be a major concern. A job where you would have to learn continually.

Java
You're programming in Java. Why?
I've been programming in Java for 10 years, and even if I think there are other interesting languages, I still think that Java is productive, thanks to its huge ecosystem (all those frameworks are an amazing value!).

What's least fun with Java?
I could have say verbosity, but I hope that it could change with the new trend initiated by Java 7 and its Project Coin. I'm looking forward to Java 8, and mainly Jigsaw.
You can find a lot of boilerplate code in a classical Java Enterprise application! The lack of proper immutability is often an issue. It's why I think that functional languages could be interesting too...
From the non-technical side, I'm a little sad that Java community may have an image of old-school legacy : I'm a little envious of the dynamic of JS community. They're really pushing things forward, with fun and motivation.

If you could change one thing with Java, what would that be?
As everyone else, a “properties” feature would be great, to avoid writing all those getters and setters. Sadly it won't happen in Java 8. And I would make official the functional approach of collections (which is planned on Coin 2/Java 8. Fortunately we already have Guava to wait for it!)

What's your personal favourite in dynamic languages?
Groovy is tightly integrated with Java, and has an already rich ecosystem. I also regret not to be more involved with JavaScript, seeing all that happen in there : I think I'm missing something!

Which programming technique has moved you forwards most and why?
Test field, specially automated tests. I have difficulties to code without unit tests, they are for me mandatory to ensure code reliability. I've also recently discovered Behavior Driven Development approach (with Jbehave). They are other types of tests, integration tests, and it's for me perfect way to ensure that we meet the Done Criteria (in Scrum thinking).

What was the biggest project you've ever worked on?
A project for Boiron laboratory (10000 man-days). It was a very challenging project for me with new tools (Enterprise Service Bus, Master Data Management, business rules engine, etc.). For me, the most interesting projects are the ones where I have to deal with new tools and new technologies. This project was very interesting, and I was lucky to work with exceptional people, might be project managers, developers, or architects.

Which was the worst programming mistake you did?
During an interview for a job in London a guy asked me how resolve the “double-checked locking” problem, with a code sample. When I saw his face and I understood that I failed ;-) It's now a running gag with my colleagues ;-).
But in real applications, I've sometimes faces troubles with Spring AOP and transparent nested transactions demarcation. I've learned it's better to ever log Spring Transaction package to be sure of what happens when!

It doesn't feel like, but I was in Brazil for JavaOne!

JavaOne is on the road again and just a few days back the Brazilian show ended. According to the blog-posts around it was a big success! I was a bit jealous about not making it there. But I was on the road quite a bit this year and I also have a daily job to do and family is important too, and, and, and ... You know how those kind of sentences end. It was a pleasure seeing Fabiane and Bruno doing an awesome job at the community keynote which was recorded by Loaine. Ok, what's the point of that post exactly? I just wanted to keep you updated with the result of a wonderful idea. At the end of November Fabiane and Bruno called out to the Java developers and asked for their picture in which they are spending precious time on their hobbies. I liked the idea and submitted a picture taken by my little 3 y/o daughter (!). And yes, thanks to the wonderful SouJava people it also made a small appearance in the JavaOneBr Community Keynote.



Here is the complete video, watch minutes 18:30 ongoing for the complete show.


Thanks Fabiane, Bruno, SouJava and Oracle! It was a pleasure contributing :)

UPDATE (13.12.11)
Here is a revised version of the "Real Java Geeks".

Installing and Using the NEW WebLogic 12 Maven Plug-In for Deployment

You might know, what the WebLogic Maven Plug-In is available since WLS 10.3.4.0. This nice little plug-in has been revised and updated with the recent WebLogic 12c release.

What changed?
Since the Maven support has been there for some time, it's interesting to look at what changed over time. Most notably, the old way of generating the weblogic-maven-plugin.jar is no longer required. You now find a pre-bundled version in $MW_HOME/wlserver/server/lib/wls-maven-plugin.jar the corresponding pom.xml is also there $MW_HOME/wlserver/server/lib/pom.xml. Since you don't have to use the jarbuilder you can simply install the dependency almost like you did before. Change to $MW_HOME/wlserver/server/lib/ and type:

mvn install
mvn install:install-file -Dfile=wls-maven-plugin.jar -DpomFile=pom.xml


Now you can use it.

mvn com.oracle.weblogic:wls-maven-plugin:help

Or add the corresponding build element to your projects pom.xml. There is one thing you need to be careful of. The class name changed: it's not longer weblogic-maven-plugin but wls-maven-plugin. This is especially important if you already have an older plugin in place.
If you don't like to use the full-qualified class name, you can add the following lines to your ~/.m2/settings.xml prior to executing the mvn install commands from above!

<pluginGroups>
  <pluginGroup>com.oracle.weblogic</pluginGroup>
</pluginGroups>


Deployment Goals until today

Until today the plug-in only supports the maven goals in the following table.
weblogic:deployDeploys or redeploys an application or module.
weblogic:undeployStops the deployment and removes staged files from target servers.
weblogic:redeployRedeploys a running application or part of a running application.
weblogic:start-appStarts an application.
weblogic:stop-appStops an application.
weblogic:list-appsLists the deployment names for applications and standalone modules deployed, distributed, or installed in the domain.
weblogic:update-appUpdates an application's deployment plan by redistributing the plan files and reconfiguring the application based on the new plan contents.
weblogic:helpLists all the deployment goals

New Goals with 12.1.1.1
The 12c release introduces six new goals which makes using WLS in CI environments a breeze.
mvn wls:install Automated WebLogic server installation from zip file
mvn wls:uninstall Automated WebLogic server de-installation
mvn wls:create-domain
  Create a domain for WebLogic Server using the default domain template.
  For more complex domain creation use the WLST goal.
mvn wls:start-serverStart WebLogic Server 
mvn wls:wlstExecute inline and external WLS scripts
mvn wls:appc
The appc compiler generates and compiles the classes needed to deploy
EJBs and JSPs to WebLogic Server. It also validates the deployment
descriptors for compliance with the current specifications at both the
individual module level and the application level.

wls:install
This goal installs WLS into a local directory to enable it to be used execute the other goals, as well as a installation to create a WLS domain that can be used to deploy and test the application represented as the Maven project. To install, you need a distribution to install. This is specified using the <artifactLocation> configuration element in the wls maven plugin section of the pom.xml, or specify it using the –DartifactLocation property when Maven is invoked.
You can even distribute the WLS zip install via your central maven repository. First step is to install it:

mvn install:install-file -Dfile=wls1211_dev.zip -DgroupId=com.oracle.weblogic -DartifactId=wls-dev -Dpackaging=zip -Dversion=12.1.1.1

The target directory for the installation is specified using the optional weblogicHome configuration element. This is set to ${basedir}/Oracle/Software by default. Specifying a <middlewareHome> value will direct the install to be performed in the specified location. The following goal will install a WLS into d:\wls12:
mvn wls:install -DartifactLocation=com.oracle.weblogic:wls-dev:zip:12.1.1.1 - DmiddlewareHome=d:\wls12
How cool is that? Think about the endless possibilities rolling out the WLS instances and configurations to a complete team! But we are only half through. We also need a domain:

wls:create-domain
The location of the domain is specified using the optional <domainHome> configuration element. By default <domainHome> is set to ${basedir}/Oracle/Domains so it will be created in an Oracle/Domains subdirectory of the root directory of the Maven project. The WLS installation to be used is specified using the optional <middlewareHome> configuration element. This is set to ${basedir}/Oracle/Software by default, so if the default location has been used to execute the install goal, it can be left out of this goal. Additionally you only need to provide a user and a password via the identical named parameters.

mvn wls:create-domain -DdomainHome=d:\wls12\user_projects\domain1 -DmiddlewareHome=d:\wls12 -Duser=system -Dpassword=weblogic1

Now you have setup your domain completely.

wls:start-server
So, let's start the server. The start-server goal executes a startWebLogic command on a given domain, starting the WebLogic Server instance. This goal also uses the <middlewareHome> and <domainHome> configuration elements to specify the location of the WLS installation and domain to use.

mvn wls:start-server -DdomainHome=d:\wls12\user_projects\domain1 -DmiddlewareHome=d:\wls12

That's it, try to access: http://localhost:7001/console/ and you will see, that your newly created domain is up and running!

mvn wls:wlst
The WLST goal enables the WebLogic Scripting Tool (WLST) to be used to execute scripts that configure resources or perform other operational actions on a WebLogic Server domain. The WLST used by the wlst Maven goal is the standard environment WebLogic Server WLST environment so all existing scripts should be able to be used. The relevant configuration elements are user, password and filename. Where the last one identifies your WLST script.

mvn wls:wlst -DartifactLocation=com.oracle.weblogic:wls-dev:zip:12.1.1.1 -Duser=system -Dpassword=weblogic1 -Dfilename=create-app-ressource.py

Wonderful. Now you have your system configured with all needed resources.

mvn wls:appc
The appc goal executes the WebLogic Server application compiler tool to prepare the application for deployment. The appc compiler generates and compiles the classes needed to deploy EJBs and JSPs to WebLogic Server. It also validates the deployment descriptors for compliance with the current specifications at both the individual module level and the application level.

That's all! Give it a try! It is simple as Maven :) And to make this a little more handy for you I prepared a sample maven project with all you need to setup a environment for WebLogic server.
all you need to do is to install the zip distribution and the wls-maven plugin to your local repository as described above. Download the sample maven project (it can be opened in NetBeans right away) and try:

mvn install

if you want to run it on WebLogic server, simply revise the path settings in the properties section of the pom.xml (<fmw.home>d:\temp\wls\</fmw.home>) and execute:

mvn install -Pdeploy


Friday, December 9, 2011

Quickstart WebLogic 12c with NetBeans 7.1 RC 2

WebLogic server 12c is out since a few days. It is for "naked" Java dev - the fancy Fusion Middleware stuff will move on to 12c down the line. So, this is basically my release to run. Today I am giving you a quick start with latest NetBeans 7.1 (RC 2) and WebLogic to run the Pet Catalog example with MySQL.

Preparation
First step is to download all required components. Grep a copy of latest NetBeans 7.1 RC 2, WebLogic 12.1.1.1and MySQL 5.5.18. Install WebLogic, NetBeans and MySQL according to the instructions. Next is to create a simple WebLogic server domain. Start the configuration tool (%WL_HOME%/common/bin/config.exe|sh) and add a "petcatalog_domain" with the basic configuration. Give a admin user and password.
Fire up NetBeans and switch to the Services tab. Right click on the Servers node and select "Add Server...". Choose "Oracle WebLogic Server" and click next to enter the Server location "/Oracle/wls1211/wlserver_12.1". Click next to select or browse for the new domain (petcatalog_domain), enter the administrator username and password. Click finish and right click on the new Oracle WebLogic Server node. You can start, stop and restart a domain. In normal, profile and debug mode. A quick link to either the server log and the Admin console is also available. Now fire up the MySQL Administrator and create a new db (e.g. petcatalog). Make sure, that you have a db user, that has access to it.

Pet Catalog Example with NetBeans
Since late 2009 a application called the Pet Catalog is part of NetBeans. It's a Java EE 6 example that demonstrates the usage of JavaServer Faces 2.0 and the Java Persistence API based on MySQL. It's basically there to demonstrate the usage of GlassFish with MySQL. Find more details about the application on java.net. What a wonderful show-case to deploy on the new WebLogic 12c server.
Back to NetBeans: Select "New Project" and project type "Sample/Java Web/Pet Catalog". Enter a project name and location. Click finish. Confirm the "Missing Server" problem dialog and right click on your newly created project, choose "Resolve missing Server Problem...". Select "Oracle WebLogic Server" and click ok. After a short project scan and a re-build, the project is opened and has all the needed libraries. Open a mysql command line or the query browser and execute the "netbeans-projects/PetCatalog/setup/catalog.sql" script against your newly created db. If you are down there already, open the project's configuration files and open the "persistence.xml". Comment out lines 5 to 8 (all in-between and including <properties> and </properties>).

Pet Catalog Data Source in WebLogic Server
Even if you also see a sun-resources.xml in your project, you can't take advantage of it.
You need to create a suitable datasource in WebLogic server first. Open the WLS console/, expand the "Services" node in the left tree, click "Data Sources". Select "New" on top of the table and select "Generic Data Source". Give it a suitable name (e.g. "Pet Catalog Pool"), JNDI Name ("jdbc/petcatalog") and select MySQL as the Database Type. Click next and review the database driver ("com.mysql....) click next and select the transaction options (leave default for now). Click next and enter the connection properties Database Name (e.g. petcatalog), Host Name (e.g. localhost), Port (3306), Database Username, Password and Password Confirmation. Click next and select "Test Configuration" on top. A green "Connection test succeeded" message should appear on top   (compare screenshot). Click next, select Admin Server as target and click finish. Now your all set. The petcatalog Data Source is all set up.

Run it!
All finished. Right click your project in NetBeans and select "Run". You see that the WebLogic server is started and the project is getting deployed. If everything is finished, your system browser is opened and you are redirected to the applications start page:


Adding Primefaces
That's all. Nothing more to do! So, we have a new sample application for WebLogic server :) But let's make this a little bit more fancy. Let's add Primefaces to it. Right click your NetBeans project and select "Properties". Select category "Frameworks" and select tab "Components" where you can select "Primefaces 2.2.1". Click ok to update your project. Now open your list.xhtml and add the primefaces namespace
xmlns:p="http://primefaces.prime.com.tr/ui" to the <html> element.
Next is to change the list.xhtml to use the Primefaces DataGrid example. And add a public List<item> getAllItems() method to Catalog.java. Same place introduce a selectedItem property with getters and setters. And if you have done everything the right way, you have your primefaceified Pet Catalog running on WebLogic Server 12c! Congratulations!


Oracle JRockit Mission Control 4.1 released

Oracle released a new version of their former JRockit-only tooling Mission Control Suite (JRMC). The 4.1 version is a minor version upgrade which directly follow the 4.0.1 which was released way back middle 2010. But even if the version number indicates, it's a minor upgrade, you still find tons of new features in it.
JRMC is a set of plug-ins for the Eclipse IDE designed to help develop, profile and diagnose applications running on the Oracle's JVMs. It includes tools to monitor, manage, profile, and eliminate memory leaks in your Java application without introducing the performance overhead normally associated with tools of this type. It's functionality is always available on-demand, and the small performance overhead is only in effect while the tools are running.

New Platform Support
The Mission Control client is now built and tested on some new platforms. The new platforms are Mac OS X, Solaris x86 and Solaris SPARC. Beside that it can now be run on Hotspot JVM, which was not possible with earlier versions. Mission Control can also start the local management on Hotspot JDK 1.6 and later. Note that you will still need to connect to a JRockit to be able to use most of the Mission Control tools. The underlying Eclipse has been upgraded to Eclipse 3.7 (Indigo).

New Plugins
DTrace Analysis GUI
The new Solaris support also comes with a new experimental plugin for DTrace. To install it into the stand alone version of Mission Control, go to Help | Install plug-ins... on the menu. To install it into Eclipse, first install the Eclipse plug-in version of Mission Control, then install it from the Experimental update-site. Mission Control provides a domain specific language that extends the DScript syntax to make the data self describing. The default .de script provides probes for recording both Hotspot behaviour as well as data from the operating system. This makes it easier to bring the the data into the Mission Control event model. If Mission Control is run in Eclipse, the DSL comes with an editor providing features such as syntax highlighting. Just like with flight recorder, there is an action for starting a DTrace recording. The wizard allows for configuring the parameters declared in the .de file, as well as enabling and disabling probe sets.The GUI provided with the DTrace plug-in uses the Flight Recorder components and GUI editor. There are too many tabs to describe them all in detail here, however, an example recording is provided with the plug-in which allows you to try out the GUI, even on platforms where DTrace is not available.

There also a new Coherence plug-in available. Like all Plugins it can be installed into the stand-alone version of JRMC or into Eclipse via the update-site. It gives you memory details (Heap) about any Coherence Nodes and an overview about the configuration.

The previous experimental "Native Memory" tab is part of the core distribution now.

The Management Console
Support for new JDK7 MBean attributes
- Zooming the charts will now freeze the range, and it is now possible to use the mouse wheel to zoom. Clicking the refresh toggle button after freezing the range will keep the zoom settings but realign the x-axis to always show the latest value.
- File resource operations better respect the Eclipse environment. For example, if a trigger which logs to file is created when running Mission Control in Eclipse, the file will be an Eclipse file resource. If the log is opened in an editor, the editor will be refreshed whenever new content is available.
- There are now default trigger rules available for deadlocks.
- There is a new tab which lists textual information that is commonly of interest. Among the listed information is the library path of the Java process, the bootclass path, and the JVM and application arguments.
- Some JRockit attributes have been ported to Hotspot in JDK 7. Mission Control 4.1 supports these new attributes to provide a better experience when connecting to a Hotspot JVM. For instance, the Overview tab will be fully populated and the Threads tab will work to a greater extent than before.

The Flight Recorder (JFR)
Improved operative set
- The thread graph now has support for rendering thread transition information. Note: When recording with JRockits prior to R28.2, the transition arrows are currently being rendered from the thread which held the monitor at the beginning of the blocking event, to the end of the blocking event.
- It is now possible to select between zooming and selection in the toolbar in the thread graph.
- Since the important information in thread names is usually in the beginning and/or end of the names, the thread graph will try to crop information from the middle of the thread names and replace the missing characters with an ellipsis.
- There is a new operative set action available which adds all events occurring during the same time and in the same thread as a selection of events to the operative set. This is particularly useful together with higher level events such as WLS related events. In the screen shot, events occurring at the same time as the events of a WLS transaction has been added, revealing low level IO events.
- The performance of the parser as well as memory footprint has been optimized. It is now be possible to open recordings with more than 10000 threads. Also, as long as there is sufficient heap available, opening recordings with more than 20 million events should be no problem.
- Mission Control features a built in GUI editor. It can be used to redesign the GUI from within Mission Control itself. It is currently unsupported, but can be started by adding the -designer parameter to the launcher. See various blog entries or the JRockit book for more information. In 4.1 the built in GUI editor has been much improved. There is now an editing history and proper undo/redo functionality. Also container components, such as tab folders and sashes, are now properly drawn in the GUI editor. There are several new components available, such as distribution charts. Components can now be configured in three level master/slave dependencies.

The Memory Leak Detector
Short cuts for selecting instances
- Sometimes any instance of a certain type will be of interest. There is now a shortcut available for selecting a random instance. There is also a short cut for selecting the class loader instance of the type.
- There is now an extension point available for better visualizing of instances. By default, extensions are provided by character arrays, Strings and some common collections. If the WLS plug-in is installed, visualization of app class loaders will be improved to reveal information such as application name and domain.
- There are now resettable delta counters for instances available in the trend table.
- There is an instance limit available that prevents the client from fetching too much data from the server. This instance limit can now temporarily be increased directly from the instance view. It can, of course, as always be changed in the preferences.
- In 4.0.x the tree representations of the type and instance graphs were shown on separate tabs. Now there is a toggle switch in the toolbar to switch between the graph and tree representations.

What will be next? Java Mission Control 5.0!
According to what I know, this will be the last 4.x release. If you look through the slides by Marcus Hirt according to the future of Mission Control, the next major release will drop it's JRockit past and move on into the direction to be the Mission Control suite for the converged JVM. Will only be available for Hotspot, even if JRockit updates still will appear in the 4.x. It will contain the flight recorder and much of the MBeans. What will be missing is the Memory Leak Detector in JDK 7. Even if all this was presented with the usual safe harbor statement, I guess we can anticipate, that it will be available within the JDK 8 timeline.

Further Links and Readings
HotRockit Slides by Marcus Hirt from JavaOne2011
https://oracleus.wingateweb.com/published/oracleus2011/sessions/22260/22260_Cho2634610.pdf

What's new in JRMC 4.x by Marcus Hirt from JavaOne2011
https://oracleus.wingateweb.com/published/oracleus2011/sessions/22261/22261_Wang2554410.pdf

Download:
http://www.oracle.com/technetwork/middleware/jrockit/downloads/index.html

Eclipse Update Site Information:
http://download.oracle.com/technology/products/missioncontrol/updatesites/base/4.1.0/eclipse/

Blog from Marcus Hirt:
http://blogs.oracle.com/hirt/



Thursday, December 1, 2011

Oracle Announces Availability of Oracle WebLogic Server 12c - first experiences!

Oracle announces Oracle WebLogic Server 12c the latest release of the #1 application server in this very minute. In exactly one hour from now you can attend the online launch, Developer Deep-Dive, December 1, 11:00 a.m. PT (Register here). Read the complete press release. I am quoted there, too:
"Oracle WebLogic Server 12c is exactly what I have been waiting for. Developing Java EE 6 applications for Oracle W! ebLogic Server has never been easier. Development, deployment, management and productivity have now been taken to the next level, which makes Oracle WebLogic Server 12c, in my opinion, the most reliable Java EE application server ever." said Markus Eisele, a German Software Architect and Consultant.
I had the pleasure to contribute to the beta program and give my recent developments a try with WebLogic 12.1.1.0. After long years we finally have the full Java EE 6 profile up and running on WebLogic server. Beside the Java EE 6 specs, you already know, you also get a complete Java SE 7 certified Java EE runtime.
Together with the new WLS 12c you also can start with the latest Oracle Enterprise Pack for Eclipse (OEPE 12.1.1.0 beta) release which fully supports WebLogic Server 12c (12.1.1.0). Note: This is a pre-GA version of Oracle Enterprise Pack for Eclipse 12.1.1. It gives you a rich, widely-used development tool with which you can develop and test Java EE 6 applications on WebLogic Server 12c.

The release is based on the Eclipse 3.7 Indigo platform. A number of Oracle developed plugins are also bundled to help you build, deploy and test applications with WebLogic Server. The "Oracle WebLogic Server tools plugin" delivers the tight integration into the IDE. You can control, deploy and debug your applications right from Eclipse. The "WebLogic Server Scripting Tools" allow you to create, execute, and debug WLST scripts. The "Coherence Tools" assist you with building, configuring, running, and debugging Coherence distributed caches. The "JPA Tools" assist you with the development of JPA 2.0 based applications. And last but not least the "Web Tier tools plugin" supports the development of Java EE 6 Web applications.

The coolest part of the beta was the test application. It was the ConferencePlanner which was used to demonstrate the new PaaS capabilities of GlassFish 4.0 at the JavaOne2011 Keynote.


It has been developed by Arun Gupta using Java EE 6 using the Java EE 6 Reference Implementation, GlassFish 3.1. Even if I did not port it personally, I was only running it, I heard that it was a breeze doing it. WebLogic understands the GlassFish deployment descriptors and the only thing that needed to be changed was the used database. This summarizes my own experiences with the deployment of existing Java EE 6 GlassFish apps, too. It was comparably easy. If you have ever find yourself porting GF 2.x to WLS 10.x you know that this is a huge progress. The only thing that still is a bit tricky are the security related artifacts. Especially if you are using custom realms and login modules. You simply have to dig into the details. This is not the fault of either WebLogic or GlassFish but probably of the thin specification there.

Final words: Go for it! After a very long wait for Java EE 6 support you can finally give it a try! And it's worth it! Good to see WLS back in the field of the players! Thanks Mike, thanks Steve, thanks Oracle!