- 1 March, 2010 - 23:00
iBATIS is a project used primarily for data access object (DAO) and object-relational mapping (ORM). You can use it to easily work with Java objects and databases. The update for iBATIS 3 beta 9 was posted January 23, 2010. iBATIS 3 is a completely rewritten version of iBATIS and includes some significant updates. This article introduces some of what's new in iBATIS 3.

Deploying an External List via Feature Using CAML #sp2010

Java Developer Journal - 4 hours 43 min ago

I’ve been talking a lot about external lists lately as you may know.  They are so easy to create with SharePoint Designer, but you wouldn’t really deploy them to production that way would you?  Of course not!  We need a feature.  At first, you might think generating all of that CAML might be too difficult, but remember we can use the Save Site as Template page to generate a .wsp file for us.  Using this we can import it into Visual Studio and learn what CAML we need to use.

We’re going to start with the same external list from yesterday.  You can build your own using SharePoint Designer as described in my BCS post.

Once you are happy with your list, go to Site Settings –> Save Site as Template.  Fill in the fields and it will save a solution package in your solution gallery of your site collection.  Save the .wsp file to disk and we’re ready to begin.  Once you have your solution package, open Visual Studio 2010, create a new project, and use the Import SharePoint Solution Package project template.  You will be prompted for what site to use and where the package file is.  On the next step, you will be prompted for what you want to import.

The solution package has every site column, content type, page, list, etc, on the site so there is a lot to sift through.  However, the only thing we really need is the list instance in question (in my case Products).  You will want to unselect everything else as it will take forever to import if you don’t.

Quick Tip: There isn’t a select all button, so press Ctrl+A, and then unclick a checkbox to deselect everything.

On the next step you will get a warning about dependencies.  Go ahead and just say yes and your project will import.  Your project will likely have a bunch of stuff you don’t really care about.  All that you really need is what it is created in List Instances.  Your list instance might look something like this.

At this point, I created a new project because I want to keep things clean.  Create a new project and create a new List Definition.  At this point, you will have a schema file and two new elements files.  The elements.xml file with the list template can be deleted since I don’t want users creating new versions of this list.  Before we start digging into the CAML that is required to make an external list work, let’s go back and look at SharePoint Designer so we can remember what our application definition looked like.

The reason I show you this is because these values we’re going to see when we take a look at our elements.xml file.  Here is the file that came from the site export.

<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="">

<ListInstance FeatureId="{00bfea71-9549-43f8-b978-e47e54a10600}" TemplateType="600" Title="Products"

Description="" Url="Lists/Products" CustomSchema="Files\Lists\Products\Schema.xml"

HyperlinkBaseUrl="http://sp2010/Test" RootWebOnly="FALSE"



<Property Name="Entity" Value="Products" />

<Property Name="EntityNamespace" Value="http://sp2010/test" />

<Property Name="LobSystemInstance" Value="bcs_test" />

<Property Name="SpecificFinder" Value="Read Item" />




A couple of things to note here.  First, the TemplateType is 600 .  We can only presume this is the list template id for an external list.  The other thing of note is the new DataSource element.  This was not in previous versions of SharePoint.  As you might notice here, these values correspond to what we see on the external content type.  This is what you will change should you decide to rename the entity in or change the LobSystemInstance name.  This XML is highly useable in our own feature, but I am going to remove some of the unnecessary attributes such as FeatureId and CustomSchema.  I’m also going to give it a new Title so that we know this is a different list.  Here is what my new elements.xml looks like.

<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="">

<ListInstance TemplateType="600" Title="Products - Deployed by Feature" Description=""

Url="Lists/ProductsDeployedByFeature" HyperlinkBaseUrl="http://sp2010/Test"

RootWebOnly="FALSE" xmlns="">


<Property Name="Entity" Value="Products" />

<Property Name="EntityNamespace" Value="http://sp2010/test" />

<Property Name="LobSystemInstance" Value="bcs_test" />

<Property Name="SpecificFinder" Value="Read Item" />




Honestly, I think I can get rid of HyperLinkBaseUrl as well.  It doesn’t seem to matter though, I deployed it to a few other sites and it seems to work fine.  Now let’s take a look schema.xml.  It’s actually pretty small which is nice compared to the files we were used to in the past.

<?xml version="1.0" encoding="utf-8"?>

<List Title="Products" Direction="none" Url="Lists/Products" BaseType="0" Type="600"

FolderCreation="FALSE" DisableAttachments="TRUE" Catalog="FALSE" RootWebOnly="FALSE"

SendToLocation="|" ImageUrl="/_layouts/images/itgen.gif" xmlns:ows="Microsoft SharePoint"





<ContentType ID="0x01" Name="Item" Group="List Content Types" Description="Create a new list item." FeatureId="{695b6570-a48b-4a8e-8ea5-26ea7fc1d162}">

<Folder TargetName="Item" />


<FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" />

<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="TRUE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />



<XmlDocument NamespaceURI="">

<FormTemplates xmlns="">










<Field DisplayName="BDC Identity" Hidden="FALSE" Name="BdcIdentity" SourceID="" StaticName="BdcIdentity" Type="Text" />

<Field DisplayName="Name" Hidden="FALSE" Name="Name" SourceID="" StaticName="Name" Type="Text" />

<Field DisplayName="Id" Hidden="FALSE" Name="Id" SourceID="" StaticName="Id" Type="Integer" />

<Field DisplayName="Color" Hidden="FALSE" Name="Color" SourceID="" StaticName="Color" Type="Text" />

<Field DisplayName="Description" Hidden="FALSE" Name="Description" SourceID="" StaticName="Description" Type="Text" />

<Field DisplayName="Price" Hidden="FALSE" Name="Price" SourceID="" StaticName="Price" Type="Decimal" />


<Forms />


<View DisplayName="Products Read List" DefaultView="TRUE" BaseViewID="1" Type="HTML" MobileView="TRUE" MobileDefaultView="TRUE" ImageUrl="/_layouts/images/generic.png" XslLink="main.xsl" WebPartZoneID="Main" WebPartOrder="1" Url="Read List.aspx" SetupPath="pages\viewpage.aspx">


<Method Name="Read List" />



<FieldRef Name="Name" />




<FieldRef Name="Name" ListItemMenu="TRUE" LinkToItem="TRUE" />

<FieldRef Name="Id" />

<FieldRef Name="Color" />

<FieldRef Name="Description" />

<FieldRef Name="Price" />


<RowLimit Paged="TRUE">30</RowLimit>

<Aggregations Value="Off" />





As you can see it’s pretty clean.  It again uses the Type of 600.  In the ContentTypes section, it does define a regular list item, but it doesn’t actually add any of the fields from the external list there.  The Fields element has a field defined for each field in my external content type.  As you can see there is nothing special about the way they are defined.  The only one of note is the BdcIdentity field which I assume is required to keep track of the ID that ties back to the BCS itself.  The View is surprisingly clean as well.  The XslLink and Method elements are new.  I assume we can use XslLink to customize how the view is rendered, but I didn’t actually see a main.xsl file generated in the solution package anywhere.  The Method element I can only assume corresponds to the name of the finder method Read List which we have seen above.  The rest is pretty simple.  It just has a FieldRef for each column in my external content type.

I can pretty much use the Schema.xml file as is.  I did change the Title and Url attributes at the top but that is it.  At this point my new feature to deploy this is ready to go.  Here is what it looks like in Visual Studio.

Deploy your solution and have it activate your feature.  The new list won’t show up automatically in the navigation on the side, but it will be there.  Just go to the URL directly or view the lists on your site to get there.  Here it is on my new site.

As you can see it’s really not that hard to deploy an external list to another site properly using a feature.  Now, you might have noticed there are a few other elements.xml files generated when we did the site export.  One stores specific values in the property bag of the list.  This we did not want because we don’t really want to copy those internal properties.  The other deals with the forms of the list.  It uses the BinarySerializedWebPart which scares me a bit, so I haven’t messed with it much.  If you are just using default forms you don’t need to worry about it.  In a future post, I’ll try seeing if I can deploy some InfoPath forms along with the list, but I figured that deserves its own post.

Also, one other thing to note.  If you are deploying your external content type to another server, you can do that in the same manner as you did in SharePoint 2007.  Just export the application definition and import it on the new server.  You can also use the Export Application Model button in SharePoint designer on the External Content Types list.

I hope this helps when you look to move lists into production.  This technique of exporting and importing will also work with regular lists of course.  Just remember, friends don’t let friends deploy lists without a feature.

read more


My Future of Web Frameworks Presentation

JavaLobby The developer community - 8 hours 4 min ago
Earlier this week, I tweeted about a history of web frameworks timeline I created for my upcoming Future of Web Frameworks talk at TSSJS Vegas 2010. I immediately received a lot of feedback and requests for adding new frameworks and releases. The image below is the result of that Twitter conversation. Thanks to everyone who contributed.   James Sugrue ...

A is for Application, J is for Jacked

Java Developer Journal - 27 February, 2010 - 18:15
Almost every day now, there seems to be a report about some ‘important’ system getting breached or some credit cards/identities being stolen or insecure infrastructures getting exposed with schools, universities, municipalities, states and even entire countries being the latest victims. The recent 7Safe UK Security Breach Investigations Report stated, “86% of all attacks, a weakness in a web interface was exploited” and in his blog last week, Jeremiah Grossman wrote about the discrepancy in security spending verses the types of attacks that occur. He breaks down the numbers to show that most of the security spending goes to perimeter defense like firewalls and says, ‘Organizations spend their IT security dollars protecting themselves from yesterday’s attacks, at the network/infrastructure layer, while overlooking today’s real threats.’

read more


- 26 February, 2010 - 23:15
As part of my efforts to create more concise Unit Tests in Java, Steve McLarnon and I recently added the ability to create a stub and stub one method with only one line.The implementation relies entirely on Mockito, so my example assumes you were already using Mockito to create the stub.The Mockito documentation has the following example for stubbing: James...

- 26 February, 2010 - 23:12
On a few projects that I've worked on one of the things that we've done is create a shared library of objects which can be used across several different projects and while at the time it seemed like a good idea, in hindsight I'm not sure if it's an entirely successful strategy. I'm quite a fan of not recreating effort which is generally the goal when trying to pull out common code and within one...

- 26 February, 2010 - 23:00
Vote for the New Eclipse Logo!A poll that includes 10 concepts for a new Eclipse logo has just opened and votes will be accepted until March 3rd.  The Eclipse Foundation says that it wants an "update or modernization" for their logo, which is nine years old.  After March 3rd, the top three choices will have a second round of voting to decide the next generation logo for...

Google Hack Traced to Chinese Schools: NYT

Java Developer Journal - 26 February, 2010 - 16:30
Forensic specialists have traced the now-famous hack into Google and 30 other companies to computers at Shanghai Jiaotong University, one of China’s top schools, with ties to Western firms such as Microsoft, Intel, Cisco and IBM, and the rather more obscure Lanxiang Vocational School, which has close ties with the Chinese military and perhaps the world’s largest computer lab. The New York Times says the evidence collected so far suggests the attacks started last April. The schools are indignant that they are suspected and at this point no one is absolutely certain that they aren’t intermediate sites, but suspicions are that the attacks originated there. The Wall Street Journal said the trail is hard to follow because some of the computers used in the attack are no longer active.

read more


Intel Heads U.S. Relief Effort

Java Developer Journal - 26 February, 2010 - 15:00
In a speech at the Brookings Institution Tuesday CEO Paul Otellini said that Intel is going to put $200 million in a new “Invest in American Technology Fund.” Twenty-four VCs have earmarked another $3.3 billion of not really new money for infusion into U.S. technology companies over the next two years targeting IT, green technology and biotechnology. It’s meant to boost American competitiveness and create jobs. Intel’s got commitments from Google, Microsoft, Dell, GE, Adobe, Yahoo, Autodesk, Accenture, Broadcom, Cisco and five other companies to create 10,500 new jobs this year and hire new college graduates.

read more


SAS 70 Solutions to Present at Cloud Expo East

Java Developer Journal - 26 February, 2010 - 13:15
Fear the cloud! That is the conventional thinking of the security industry. Their issue is the uncertainty surrounding virtualization because it is “in the cloud,” and, therefore, beyond control. But is that really true? In his session at the 5th International Cloud Expo, Doug Barbin, Director at SAS 70 Solutions, will break the cloud computing models down into their tangible and auditable components (networks, servers, applications, third parties, etc). From there, he will discuss different types of assurance solutions available (including SAS 70, PCI, ISO 27001/2, etc.), what companies are doing today, and could be doing better tomorrow.

read more


Amazon Web Services Named “Bronze Sponsor” of Cloud Expo April 19-21 NYC

Java Developer Journal - 26 February, 2010 - 13:00
SYS-CON Events announced today that Amazon Web Services, a provider of an infrastructure web services platform in the cloud, has been named “Bronze Sponsor” of SYS-CON's 5th International Cloud Expo, which will take place on April 19-21, 2010, at the Jacob Javits Convention Center in New York City. With AWS you can requisition compute power, storage, and other services - gaining access to a suite of elastic IT infrastructure services as your business demands them. With AWS you have the flexibility to choose whichever development platform or programming model makes the most sense for the problems you're trying to solve. You pay only for what you use, with no up-front expenses or long-term commitments, making AWS the most cost-effective way to deliver your application to your customers and clients. And, with AWS, you can take advantage of's global computing infrastructure, that is the backbone of's retail business and transactional enterprise whose scalable, reliable, and secure distributed computing infrastructure has been honed for over 13 years.

read more


Savvis Named "Bronze Sponsor" of Cloud Expo East

Java Developer Journal - 26 February, 2010 - 11:45
SYS-CON Events announced today that Savvis, Inc, a global leader in outsourced Internet infrastructure services for the enterprise, has been named "Bronze Sponsor" of the 5th International Cloud Expo ( ), which will take place April 19-21, 2010, at the Jacob Javits Convention Center in New York City. Cloud Expo is the world's leading Cloud-focused event since 2007, and is held five times a year, in New York City, Silicon Valley, Prague, Tokyo and Hong Kong. Savvis has been working together with Cisco to integrate Cisco's Unified Computing System (UCS) as part of its next-generation cloud services platform, termed Savvis Symphony VPDC.

read more


- 26 February, 2010 - 11:22
This case study is excerpted from the book, Evaluating Project Decisions: Case Studies in Software Engineering, authored by Carol Hoover, Mel Rosso-Llopart and Gil Taran, ISBN 0321544560, published in Oct. 2009 by Addison-Wesley Professional, Copyright 2010 Pearson Education, Inc. For a complete Table of Contents, please visit:

- 26 February, 2010 - 10:45
As a follow-up to an earlier article introducing Infinispan, which was published on DZone some months back, I'm starting a series of “Power User” articles – a series of short, focused articles on specific sub-sections of Infinispan, for those who want to dig deeper into Infinispan internals.  This article aims to pick out specific topics, of interest to power users, and discuss them to...

CEP in the Cloud

Java Developer Journal - 26 February, 2010 - 09:00
I’ve spent the last couple of days, after absorbing the Sybase acquisition of Aleri’s assets, looking at the various CEP players websites for evidence of cloud (grid name du jour) deployment. I haven’t found anything worth mentioning. That’s not to say that I might have missed something. But my guess is that with all the economic woes lately, that the CEP vendors have either chosen to ignore or just simply aren’t aware that the rest of the world is actually solving real problems with cloud deployments. Which is interesting.

read more


Java Developer Journal - 26 February, 2010 - 08:45
Microsoft cloud services mean freedom for businesses. The freedom to access the technology you want, where and when you want it. The freedom to take advantage of the latest technology as a capital expense, or an operational one. The freedom to focus on running your business - not running IT systems. Microsoft cloud services are Microsoft by extension: Giving you the ability to make full use of the same Microsoft technologies you already know and trust, on a pay-as-you-go model. For a single department or an entire global organization. On-premises, offpremises, or a combination of both, depending on your business needs. Microsoft cloud services are Microsoft as a utility, but it is more than plugging into a utility. It's the applications you know, the platforms you know, and a data center infrastructure - all working together in a cohesive whole. It's Microsoft when you need it. Microsoft on your terms.


- 26 February, 2010 - 06:45
Wicket is a component based web framework which allows you to develop web applications in a similar way the desktop applications developed. The framework has very little effect on the HTML markup used. The dynamic elements of the html markup are marked with "wicket:id" attribute only. Eventhough it has very little addition on markup, its connection with the backend is very powerful...

Software Trial: InstallAnywhere for Building Java-Based Installers

Java Developer Journal - 26 February, 2010 - 03:30
Want an easy way to build installers for Linux, Solaris, HP-UX, AIX, UNIX, IBM i, Mac OS X, and more? Try InstallAnywhere! From the makers of InstallShield, InstallAnywhere is the most popular installation tool for Java developers. Create professional, bulletproof installers for any platform in minutes – no expertise needed. Try it now!

read more


26 February, 2010 - 00:21
When I start the mavenization of my projects, I had some doubts - because of my ignorance - about where to put my Maven repositories. I have two scenarios: some projects (most notably BetterBeansBinding) can be synchronized to the Maven Central Repository, others can't because they depend on third parties' products that aren't hosted on the Central Repo. But even in the former case, the way the...

- 26 February, 2010 - 00:19
I am working on the backend of a high performance clustered system involving JGroups, JMS, and other very cool technologies. To achieve best performance, the application is totally event-driven, by using a very cool library i Open-Sourced: Mycila Event. I needed an intra-process Event Dispatching System capable of handling million events in a few second, while having a totally customizable...
  • 1