Skip to content

Feed aggregator

JBoss AS7 for Spring Developers

Java TV - Mon, 02/06/2012 - 22:19
This video shows you how JBoss AS7 with its new architecture and a new set of features provides an ideal environment for developing and deploying Spring applications. There are multiple ways in which a Spring developer can benefit from JBoss AS7. You can either use it as a generic Java EE 6 application server and stay up-to-date with the latest enterprise Java specification. Or you can take advantage of features which are unique to JBoss AS and provide a competitive edge. This video covers both angles.
Categories: Blogs

Java EE 6 and 7 at JUGICE, Iceland, JFokus 2012, and Umeå JUG, Sweden

Miles to go ... - Arun Gupta - Mon, 02/06/2012 - 18:53

After an easy January month, the conference circuit is starting with a tour of the Nordics.

What ? Java EE 6 hands-on workshop
Date ? Saturday, Feb 11, 2012
Time ? 9am - 1pm
Where ? Reykjavik University, Fönix (m-105)
Register ? jugice-ag2012-eorg.eventbrite.com
Prep work: Download and Install NetBeans 7.0.1 or later ("All" version) from netbeans.org, JDK 6 latest update from oracle.com/javase.
Twitter: @JUGICE




What ? Java EE 6 hands-on workshop (Feb 13, 9am), PaaSing a Java EE Application (Feb 15, 9am), Java EE 7: Developing for the Cloud (Feb 15, 1pm)
Date ? Monday - Wednesday, Feb 13 - 15, 2012
Time ? All Day
Where ? Stockholm Waterfront Congress Center, Sweden
Register ? jfokus.com (almost sold out, register quick)
Prep work: (For hands-on workshop only) Download and Install NetBeans 7.0.1 or later ("All" version) from netbeans.org, JDK 6 latest update from oracle.com/javase.
Website: jfokus.com
Twitter: @jfokus

Check out my reports from JFokus 2011.



What ? Java EE 6 hands-on workshop
Date ? Thursday, Feb 16, 2012
Time ? 6pm
Where ? Umeå University (Triple-Helix), Umeå, Sweden
Register ? Just show up
Prep work: Download and Install NetBeans 7.0.1 or later ("All" version) from netbeans.org, JDK 6 latest update from oracle.com/javase.
Website: umejug.blogspot.com

Where will I meet or run with you ? :)


Categories: Companies

Poll: Which HTML5 Refcard Would You Like To See Next?

So it looks like our new HTML5 Canvas Refcard proved interesting to you, our excellent DZone readers. Our general HTML5 Refcard has received a lot of downloads too -- so we've decided to go all-out and publish a whole series of Refcardz on emerging web technologies. The massive tangle of new features, APIs, etc. that generally goes by 'HTML5' (whether...
Categories: Communities

Continuing Coverage of New Java 7 Features and APIs: Video Tutorials

TheServerSide.com - Mon, 02/06/2012 - 16:36
Here at TheServerSide.com, we've obviously been giving some very decent coverage to the new features of Java 7, with a look at tackling some of the new Java 7 APIs like the new File I/O (NIO.2) and concurrency libraries with tutorials and learning guides. To compliment our tutorials on the new Java 7 features, we're kicking off a new set of online video tutorials demonstrating what Java 7 has to offer.

Add to digg Add to StumbleUpon Add to del.icio.us Add to Google
Categories: Communities

Playframework + Google Guice

TheServerSide.com - Mon, 02/06/2012 - 15:41
In this article we'll see how to integrate Google Guide with a Play Framework web application.

Add to digg Add to StumbleUpon Add to del.icio.us Add to Google
Categories: Communities

Nexus 2.0 is coming. Join Jason for the first demo.

Sonatype Blog - Mon, 02/06/2012 - 15:38

 

Join us Tuesday, February 21 at 11:00AM (GMT-0500) for a 30 minute demonstration of Nexus 2.0, with Jason van Zyl, Sonatype Founder & CTO. You’ll see all the new features and learn how Nexus 2.0 will help you:

  • Avoid downtime by using a highly available architecture
  • Improve repository management with enhanced component information
  • Standardize on a single repository for .NET, Java, and OSGi

Reserve Your Seat

If you register, you’ll also receive access to the recording after the event. So if something comes up and you can’t make it, you won’t miss out.

Categories: Companies

Griffon in NetBeans IDE 7.1

Griffon development can now be done in NetBeans IDE 7.1.

Plugin: http://plugins.netbeans.org/plugin/18664/griffon

Sources: http://java.net/projects/nbgriffonsupport

Categories: Open Source

Sneak preview: Navigating from C++ code to Protocol Buffer declaration – in Eclipse

Alex Ruiz's Weblog - Mon, 02/06/2012 - 14:26

One of the most popular features of protobuf-dt is its integration with protoc, the Protocol Buffer compiler. When this feature is enabled, protobuf-dt invokes protoc to generate Java, C++ or Python code when a .proto file is saved.

A fairly common feature request is navigation from generated code to its declaration in the .proto file. For example, navigating from a generated C++ class that extends ::google::protobuf::Message to the actual declaration of the Message element in a .proto file.

I started working on this feature a week ago and now I’m happy to show off some progress. The following movie demonstrates the following:

  1. How to enable and configure protobuf-dt’s integration with protoc
  2. How C++ code gets generated after saving a .proto file
  3. How to navigate from the generated code to the protocol buffer declaration

Under the covers

To accomplish this code navigation, I created an Eclipse plug-in that acts as a bridge between CDT and protobuf-dt. Navigation from generated C++ code to its declaration in a .proto file is as easy as right-clicking on a C++ element and selecting the menu “Open Declaration in .proto File.”

Under the covers, the bridge plug-in does the following:

  1. Finds the C++ AST node enclosed in the current cursor position in the active CEditor
  2. Derives the qualified name and type of the proto element from the qualified name and type of the C++ element found in the AST
  3. Asks the Xtext index for the URI of the proto element that has an equal qualified name and type
  4. Asks the Xtext index for the closest match, if the previous step failed
  5. Asks Xtext to open and select the element under the found URI

Of course, this a over-simplified explanation. For more details, the source code of the bridge can be found here.

Challenges

Creating this plug-in was not too difficult. I think the biggest challenge is reverse-engineering protoc to figure out how navigation from generated C++ code to .proto files should be done. A good example is nested Protocol Buffer messages. When a nested message is compiled to C++, protoc creates a top-level class using underscores in the name to concatenate the names of its ancestors.

For example:

Both the messages Outer_Message.Inner and Outer.Message.Inner will generate a C++ class with name Outer_Message_Inner. In this case, there is no single path for navigating from C++ to Protocol Buffer. Currently we identify this ambiguity and select the first match only. I’m thinking about displaying a dialog showing all the possible options and let the user chose the Protocol Buffer element to navigate to.

Another thing I haven’t figured out is how to enable this menu only for files with names ending with “.pb.h.” Here is how I define the menu in the plug.xml file:

<extension point="org.eclipse.ui.popupMenus">
  <viewerContribution
      id="com.google.eclipse.protobuf.cdt.cEditorPopup"
      targetID="#CEditorContext">
    <action
        class="com.google.eclipse.protobuf.cdt.ProtobufCdtExecutableExtensionFactory:com.google.eclipse.protobuf.cdt.actions.OpenProtoDeclarationAction"
        icon="icons/pb.gif"
        id="com.google.eclipse.protobuf.cdt.openProtoDeclaration"
        label="Open Declaration in .proto File"
        menubarPath="group.open"
        style="push">
     </action>
   </viewerContribution>
</extension>

Any suggestions or hints are appreciated! :)

Road ahead

I only scratched the surface of what can be done to integrate C++ and Protocol Buffers in Eclipse. There are still a lot of things to do. In the case of C++-to-Protocol-Buffer navigation, I still need to:

  • Figure out how protoc handles letter cases and C++ keywords in Protocol Buffer element names
  • Implement message field matching by both qualified name and type (currently matching is done by qualified name only)
  • Support navigation for the rest of Protocol Buffer elements: enum literals, groups, rpcs, services and streams

There is also other functionality that would be really useful to have:

  • Cross-language refactoring: update all references in generated code when a Protocol Buffer element is renamed.
  • Find usages of Protocol Buffer elements in generated code. This functionality can also have other interesting uses. Eclipse can warn a user, before deleting a .proto file, that there are dependencies on the code generated from that .proto file.

For now I’m concentrating on C++. Java support will come next.

Summary

In this post I have show you some of the upcoming functionality in protobuf-dt. Navigation from generated C++ code to its declaration in .proto files in Eclipse is a handy feature that is finally being implemented. It is not complete yet, but I expect to have a “beta” (or “testing”) release pretty soon.

Feedback is always welcome :)

(Image taken from Calsidyrose’s flickr stream under the creative commons license)
Categories: Blogs

Hibernate Search 4.1.0.Beta1: improve Infinispan Query mapping

Enter The JBoss Matrix - Mon, 02/06/2012 - 14:08

Hibernate Search version 4.1.0.Beta1 was tagged; the most essential change compared to January's release 4.1.0.Alpha1 was HSEARCH-1034, made to allow Infinispan Query to use the fluent Programmatic Mapping API as already available to Hibernate users.

More changes are being developed: stay tuned for new MassIndexer improvements, some new performance improving tricks, and a fierce discussion is going on to provide a new pragmatic way to define index mappings starting from the Query use cases.

Integrations with Infinispan

The Infinispan project released a new milestone version 5.1.1.FINAL, which is relevant to Hibernate Search users in many ways:

  • Hibernate Search can use Infinispan to distribute the index among several clustered nodes.
  • JBoss AS 7.1 will use this version as the fundamental clustering technology.
  • Hibernate OGM can map JPA entities to Infinispan instead of a database, and use Hibernate Search as query engine and replicate the indexes storing them in Infinispan.
  • Infinispan Query uses the Hibernate Search Engine component to make it possible to search across the values stored in Infinispan. All you need to do is add the dependency to infinispan-query, enable indexing in the configuration and either annotate the objects you store in the grid like you would do with Hibernate Search entitites, or define the mappings using the programmatic API.

More details on Infinispan Query can be found in the Infinispan reference, but if you're familiar with Hibernate Search there's not much to learn as they share most features and configuration options as defined on the Hibernate Search reference manual.

The usual links
Categories: Companies

Make your process your Rock Star, not individuals

I recall a few jobs ago I was managing the Systems Engineering team and trying to grow it into a group that could handle the daily onslaught of issues that would plague our service. We had recruiters working on sourcing folks & we felt like we had very high standards for who we wanted to hire. We talked to and turned away probably hundreds of folks it felt like (I got really good at...
Categories: Communities

Document language identification

One of the features of the latest Solr version (3.5) is the ability to identify the language of the document during its indexation. In today's entry we will see how Apache Solr works together with Apache Tika to identify the language of the documents. At the beginning You should remember that the described functionality was introduced in Solr 3.5. Preview Text:  ...
Categories: Communities

Tieing JBoss AS 7 to multiple realities

Enter The JBoss Matrix - Mon, 02/06/2012 - 12:48

We had an interesting discussion at FOSDEM about collaboring on a Free and Open Source Software project like JBoss AS 7. To really allow FOSS developers to participate you need to make sure only FOSS build tools and dependencies are used. Anything else and you would raise the bar for your contributors.

 

An interesting point was the usage of a non-FOSS issue tracker. Should you use an issue tracker which does have free access, but is not FOSS?

Personally I would say: why not? As long as you control and own the data it should pose no real threat. Just make sure the acquired license does allow for an unlimited number of free access.

 

Using Fedora 17 makes sure your build tools, dependencies and even transitive dependencies are FOSS. But does it lower the bar for contributors?

In actuallity no, because the build tool used (mvn-rpmbuild) and the component set available (latest and greatest only) makes for a different result than upstream. But this does not only go for Fedora (and it's mvn-rpmbuild), it goes for every Maven (or other build tool) project that draws in dependencies.

Looking at building Maven 3.0.3 using Maven 3.0.3 it would download and use maven-artifact 2.0 to 2.0.9, while at runtime it only uses maven-artifact 3.0.3 by its own definition.

 

Java developers give little thought about the runtime platform where their component is going to run. Regardless of the use of Maven, Gradle or Ant / Ivy. Or running on RHEL, Fedora, Debian or Windows. It will create issues once you want to integrate on a well-defined component set.

 

So we should really give more thought into where our components are going to run, be it Windows, OS X, Debian, RHEL or Fedora.

And we should try to foster an environment in which all these realities can collaborate.

Categories: Companies

RHQ CLI over XMPP

Enter The JBoss Matrix - Mon, 02/06/2012 - 12:39
I watched the great demo of the XMPP server plugin for RHQ from Rafael Chies. Rafael is using a custom DSL to query the RHQ server for information but I thought that that really shouldn’t be necessary – it should be possible to use an ordinary CLI session behind this. Granted – the “query language” [...]
Categories: Companies

Securing Rhino in Java6

Enter The JBoss Matrix - Mon, 02/06/2012 - 11:33
In RHQ we let the users provide scripts that can be run when an alert fires. This is great for automation because the script can do anything the users can do with our remote API. But the users of course can write a script like this: java.lang.System.exit(1); This would shut down the whole RHQ server, [...]
Categories: Companies

Ultra low latency Event Store

Vanilla Java - Mon, 02/06/2012 - 10:10
Overview
There are two basic libraries for managing data in Java, JDBC (for connecting to database) and JMS (for messaging). For some use cases you ideally want both, and you want it to be very fast.

HistoryThis is a redevelopment of a previous project HugeCollections The project is still on hold because its too complex IMHO for what it does. This library is lower level and much simpler to understand. It may become the basis for the higher level HugeCollections library.

The Java Chronicle LibraryThis library attempts to provide ultra low latency, high throughput, persisted, messaging and event driven in memory database with random access to previous messages) The typical latency is as low as 16 nanoseconds (between processes), supporting throughputs of 5-20 million messages per second.

Technical Features
  • It uses almost no heap with trivial GC impact regardless of size, 
  • It can be much larger than your physical memory size (only limited by the size of your disk). and can be shared *between processes* with better than 1/10th latency of using Sockets over loop back. 
  • You can attach any number of readers, including tools to see the exact state of the data externally. e.g. I use; od -t cx1 {file} to see the current state. 

It can change the way you design your system because it allows you to have independent processes which can be running or not at the same time (as no messages are lost) This is useful for restarting services and testing your services from canned data. e.g. like sub-microsecond durable messaging. 

Modes of useThe library can be used in two mode. Either as an event driven persisted journal, or as a re-writable random access store.
The main limitations are that it only designed for one writer, and "extracts" or records cannot be made larger once they are written.

Download or Browse the Java Chronicle Library
Categories: Blogs

POJOMapping in Jersey for type-safe clients

Over on his blog, Jason Lee has a detailed post on the new POJOMapping feature in Jersey/GlassFish which offers strongly-typed client API's and illustrates this with a GlassFish Cluster administration sample.

POJOMapping Client/Server Example"> ALT_DESCR

The post shows how to enable POJOMapping with a Jersey servlet initialization parameter and goes on to show the Cluster domain model. An archive with the entire sample is available there.

JUDCon 2012, Bangalore - Photos and presentations uploaded

Enter The JBoss Matrix - Mon, 02/06/2012 - 08:27
The photos and the presentations of JUDCon 2012 which was held in Bangalore have been uploaded. You can get the photos from here and the presentations from here. The videos will be uploaded soon.


Categories: Companies

Java.lang.VerifyError: Expecting a stackmap frame at branch target – JDK 7

Right now, when I try to persist an object in Google App Engine, I’m facing the error “Java.lang.VerifyError: Expecting a stackmap frame at branch target“. I’m using JDK 7 and it seems like the problem lies with this JDK. After googling a bit, I found that there seems to be two solutions to fix this problem. Solution 1: Change to JDK 6 As simple as is, change your JDK to version 6 and you...
Categories: Communities

Documentation that is useful

I was reading this article by Neil Mcallister on his Fatal Exception blog entitled "How to get developers to document their code". Now it begs the question: What documentation is actually useful? Well, like all things in general I don't think it's a simple answer, best I could say is; what works well in your context. Preview Text:  I...
Categories: Communities

Adding Version Information to your JAR’s Manifest

One of the handy things about using Maven is that, by default, the names of the artifacts it creates include the current version number from the POM's version tag. It doesn’t matter what type of artifact it is, whether it’s a JAR, WAR or EAR you generally end up with something like this: Preview Text:  One of the handy things about using...
Categories: Communities