Log on:
Powered by Elgg

Feed detail

September 25, 2009

Yahoo! and USA TODAY Have Openings at the ONA09 Career Summit & Job Fair

Yahoo! and Gannett are hiring! Join them and recruiters from other top media companies and universities at the ONA09 Career Summit & Job Fair, Thursday, Oct. 1, at the Hilton San Francisco to hear about current openings.

read more


September 23, 2009

Is Your JIT Telling You Lies?

Writing meaningful Java benchmarks is a tricky business. It's well known that the Java Virtual Machine's just in time (JIT) compilation process means that running an application for a few seconds won't let you predict the performance of the application over hours or days of uptime. In spite of this, developers often rely on micro-benchmarks to set performance SLAs for their applications.

read more


Reporting Solutions Using Crystal Reports for Eclipse

SAP (Business Objects) has recently released Crystal Reports for Eclipse version 2.0 to provide reporting solutions for Java-based applications. This is available as free to use (within an organization) and has the advantage that it is built on the most tested and reliable component (Java Reporting Component in Crystal Reports) that has been in market for quite a few years now. This article discusses the features of CR4Ev2.0, usability of its designer and API, and starting off with an overview of Crystal Reports product architecture.

read more


Dell News on Ulitzer - Dell Virtualization with Intel and Citrix

Dell demonstrated the industry’s first Single Root I/O Virtualization (SR-IOV) solution based on industry standards using technologies from Intel and Citrix to help improve virtualization performance across networked servers and storage. The companies collaborated to develop technology based on PCI-SIG I/O Virtualization specifications and Intel Virtualization Technology for Directed I/O (Intel® VT-d) to allow multiple operating systems to share a physical interconnect

read more


September 21, 2009

1st Annual Government IT Conference & Expo: Themes & Topics

A round-up of the problems, opportunities and issues being discussed October 6, 2009 in Washington, DC, at SYS-CON's 1st Annual Government IT Conference & Expo (www.GovITExpo.com), a 1-day deep dive into the new wave of Internet-based technologies that are changing the way that Federal agencies leverage, procure and utilize IT.

read more


September 19, 2009

My Thoughts on Ulitzer

Ok, so, here are my thoughts on Ulitzer... As a blogger, I focus on traffic and I spend quite a lot of time optimizing my SEO. Since the target audience of my articles is much greater than the reach of my blog, Ulitzer is actually helping me increase my content reach. Moreover, Ulitzer does it in a very fair way since links back to my posts or other locations are without the evil "nofollow" providing a nice SEO boost. It also gives me some good metrics that are very useful data point on the effectiveness of my blog article. And last but not least, it allows my article to appears in news.google.com, which is a very nice channel extension. So, all of these to say that while Utilizer might be seen as a competing channel to bloggers, I think that bloggers should realize the tremendous value it could bring to their blog. I think to materialize this value to bloggers, some sort of WordPress plugin would be very useful. I think that allowing bloggers to show and combined Ulitzer/SYS-CON stats, comments, Tweets/ReTweets with their blog posts would be a killer feature. Another approach would be to expose a simple REST API (just HTTP JSON gets) and do a sample Wordpress plugin showing developers how to integrate Wordpress with Ulitzer. Anyway, just some random thoughts.

read more


September 18, 2009

Build Reliability into Cloud Computing for SMBs

With IP networks taking on many new challenges from VoIP, rich multimedia and other high-bandwidth consuming and high-priority applications, SMBs need to be sure the network connectivity between their business and Cloud Computing provider is protected with controls for reliable Internet circuit availability, and for optimizing delivery of traffic to critical applications.

read more


If Load Balancers Are Dead Why Do We Keep Talking About Them?

Commoditized from solution to feature, from feature to function, load balancing is no longer a solution but rather a function of more advanced solutions that’s still an integral component for highly-available, fault-tolerant applications.

Link goes to YouTube clip of Monty Python sketch

Unashamed Parody of Monty Python and the Holy Grail

Load balancers: I'm not dead.
The Market: 'Ere, it says it’s not dead.
Analysts: Yes it is.
Load balancers: I'm not.
The Market: It isn't.
Analysts: Well, it will be soon, it’s very ill.
Load balancers: I'm getting better.
Analysts: No you're not, you'll be stone dead in a moment.

Earlier this year, amidst all the other (perhaps exaggerated) technology deaths, Gartner declared that Load Balancers are Dead. It may come as surprise, then,  that application delivery network folks keep talking about them. As do users, customers, partners, and everyone else under the sun. In fact, with the increased interest in cloud computing it seems that load balancers are enjoying a short reprieve from death.


LOAD BALANCERS REALLY ARE SO LAST CENTURY

They aren’t. Trust me, load balancers aren’t enjoying anything. Load balancing on the other hand, is very much in the spotlight as scalability and infrastructure 2.0 and availability in the cloud are highlighted as issues today’s IT staff must deal with. And if it seems that we keep mentioning load balancers despite their apparent demise, it’s only because the understanding of what a load balancer does is useful to slowly moving people toward what is taking its place: application delivery.

Load balancing is an integral component to any high-availability and/or on-demand architecture. The ability to direct application requests across a (cluster|pool|farm|bank) of servers (physical or virtual) is an inherent property of cloud computing and on-demand architectures in general. But it is not the be-all and end-all of application delivery, it’s just the point at which application delivery begins and an integral function of application delivery controllers.

Load balancers, back in their day, were “teh bomb.” These simple but powerful pieces of software (which later grew into appliances and later into full-fledged application switches) offered a way for companies to address the growing demand for Web-based access to everything from their news stories to their products to their services to their kids’ pictures. But as traffic demands grew so did the load on servers and eventually new functionality began to be added to load tombstonebalancers – caching, SSL offload and acceleration, and even security-focused functionality. From the core that was load balancing grew an entire catalog of application-rich features that focused on keeping applications available while delivering them fast and securely. At that point we were no longer simply load balancing applications, we were delivering them. Optimizing them. Accelerating them. Securing them.


LET THEM REST IN PEACE…

So it made sense that in order to encapsulate the concept of application delivery and move people away from focusing on load balancing that we’d give the product and market a new name. Thus arose the term “application delivery network” and “application delivery controller.” But at the core of both is still load balancing. Not load balancers, but load balancing. A function, if you will, of application delivery. But not the whole enchilada; not by a long shot.

If we’re still mentioning load balancing (and even load balancers, as incorrect as that term may be today) it’s because the function is very, very, very important (I could add a few more “verys” but I think you get the point) to so many different architectures and to meeting business goals around availability and performance and security that it should be mentioned, if not centrally then at least peripherally.

So yes. Load balancers are very much outdated and no longer able to provide the biggest bang for your buck. But load balancing, particularly when leveraged as a core component in an application delivery network, is very much in vogue (it’s trendy, like iPhones) and very much a necessary part of a successfully implemented high-availability or on-demand architecture.

Long live load balancing.

Follow me on Twitter View Lori's profile on SlideShare friendfeedicon_facebook AddThis Feed Button Bookmark and Share

Related blogs & articles:

read more


Perhaps SOA is More Strategy Than Architecture

On Thursday, September 10th, 2009, I moderated a panel at the 1105 Group’s Enterprise Architecture Conference in Washington, DC entitled, “SOA Goes Mainstream – An Industry and Government Roadmap.” On the panel we had two Federal government agency representatives and two industry representatives, with one of the industry representatives providing a FedEx case study as the basis for their SOA experiences.

read more


September 15, 2009

From Technorati to WordPress Tag namespace

The excessively sharp-eyed of you may have noticed that I have recently switch from listing tags at the end of posts to using WordPress tags at the end of posts. Here's why. Not that you should care. When tagging first took off, there weren't a lot of good places to link ...

read more


Hardware Scaling in the Cloud - Part 3 of 5

The main topic of this week and the most fundamental component of the cloud is infrastructure as a service (IaaS). This component refers to all the elements of delivering a Web-based service including servers, Internet connectivity, transport routing and sometimes higher-level functions for enhanced performance and scalability.

read more


September 14, 2009

The Curious Case of Build Release Management eBook

Build Release Management (BRM) is truly the next generation of IT Change Management. With BRM, you can get compliant and implement total process automation while continuing to work with whatever version control tool, testing application or IDE you are currently using. Download this essential eBook "The Curious Case of Build Release Management" and learn the basics of what BRM is, why users love it and why every application development team should consider it.

read more


Hosted Solutions Expands Application Hosting Business

Hosted Solutions, a provider of IT infrastructure as a service (IaaS), announced today that the company has significantly expanded its suite of application hosting and management capabilities to include support for a full range of leading business applications, including Microsoft SQL Server, Oracle, WebSphere, WebLogic and JBOSS.

read more


Performance Tuning Essentials for Java

In light of today’s compressed development cycles, multi-tiered application architectures and complex technologies, many organizations are challenged to get reliable yet scalable enterprise Java applications out the door in a timely manner. Devoting a small amount of energy throughout the development process to identify, address, and correct performance obstacles can lower the risks and costs associated with poorly performing applications over the life of the code.

read more


September 13, 2009

Oracle Takes Out Ad to Sun Customers

Oracle bought a hard-to-miss piece of the front page of the Wall Street Journal Thursday to run an ad apparently in hopes of arresting the increasing erosion in Sun’s server business. The bulleted ad is addressed to Sun customers and says Oracle “plans to spend more money developing Sparc than Sun does now; spend more money developing Solaris than Sun does now; have more than twice as many hardware specialists selling and servicing Sparc/Solaris systems than Sun does now; [and] dramatically improve Sun’s hardware performance by tightly integrating Oracle software with Sun hardware.”

read more


September 11, 2009

Twenty Lines or Less #29

What could you do with your code in 20 Lines or Less? That's the question I ask (almost) every week for the devcentral community, and every week I go looking to find cool new examples that show just how flexible and powerful iRules can be without getting in over your head.

29 editions later and still going strong. The 20LoL is a testament to just how many different things can be done with iRules in just a few lines of code.  Just imagine the possibilities if this were the 30LoL.

This week I’ve got three more examples, all from the forums. Today we’ll cover dealing with port numbers in HTTP requests, checking pool status from within an iRule, and more fun with nested switching.  The community keeps putting out fantastic examples so I just keep on writing about them.  Keep it up.

 

Removing HTTP request port numbers

http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&postid=62227&view=topic

Hoolio came up with a trio if examples of how to deal with port numbers in your HTTP requests. All of them are good, depending on your situation, but I’m only going to highlight one here.  Go check out the forum post above to see the other two and get the context of the thread.

when HTTP_REQUEST {
  # Check if Host contains a colon
  if {[HTTP::host] contains ":"}{
    # Redirect client to requested host minus the port and preserve the original URI
    HTTP::redirect "
https://[getfield [HTTP::host] ":" 1][HTTP::uri]"
  }
}

 

Checking pool member status

http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&postid=62093&view=topic

User cmbhatt, another one of our power-users, came up with a very cool example of using the LB::select command and HTTP::respond to show the status of a selected pool member.  It even has a built in meta-refresh so you can continually monitor the status. Pretty neat stuff.

when HTTP_REQUEST {
     if {[HTTP::uri] eq "/status" } {
         scan [LB::select] %s%s%s%s%d command current_pool command2 current_member current_port
         eval [LB::select]
         set response "<html><head><title>$current_pool Pool Status - [clock format [clock seconds]]</title><meta http-equiv='refresh' content='10; url=
http://[HTTP::host]/status'></head>"
         if { [active_members $current_pool] < 1 } {
             append response "POOL NAME:$current_pool<br/> CURRENT MEMBER:$current_member:$current_port<br/> STATUS: DOWN <br/></body></html>"
         } else {
             append response "POOL NAME:$current_pool<br/> CURRENT MEMBER:$current_member:$current_port<br/> STATUS: UP <br/></body></html>"
         }
     }
     HTTP::respond 200 content $response "Content-Type" "text/html"
}

 

More nested switching and pool selection vs. redirection

http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&view=topic&postid=62162

This rule stemmed from cmbhatt, once again, then I went in and made some tweaks where I think it made sense, as you can see in the thread.  The idea is that the user is looking to do some inspection of first the host, then in some cases, depending on what the host is, the URI as well.  Based on what’s found either a load balancing decision is made or a redirect is issued.  This is yet another awesome example of how iRules can turn something that would be ridiculously tricky or even impossible elsewhere into something pretty straight-forward.

when HTTP_REQUEST {
  switch [HTTP::host] { 
    "www.mydomain.eu" {
      switch [HTTP::uri] {
        "/" {  HTTP::respond 301 Location "
http://www.mydomain.eu/zz/index.html" }
        default { pool mydomain_eu_pool    }
      }
    }
    "www.mydomain.be" {
      switch [HTTP::uri] {
        "/" { HTTP::respond 301 Location "
http://www.mydomain.eu/be/zz/index.jsp" }
         default { pool mydomain_be_pool }
      }
    }
    "www.mydomain.nl" { HTTP::respond 301 Location "
http://www.mydomain.eu/nl/zz/index.jsp" }
    "www.mydomain.fr" -
    "mydomain.fr" { HTTP::respond 301 Location "
http://www.mydomain.eu/fr/zz/index.jsp }
    "www.mydomain.lu" { HTTP::respond 301 Location "
http://www.mydomain.eu/lu/zz" }
  }
}

 

There you have it, three more iRules to get you on your way in less than 21 lines of code.  Feel free to submit ideas, suggestions of feedback, as always.

#Colin

read more


September 09, 2009

iCIMS Adopts SpringSource Hyperic HQ

SpringSource, a provider of Java application infrastructure and management, has announced that iCIMS, a provider of Software-as-a-Service (SaaS) talent acquisition solutions, has deployed SpringSource Hyperic HQ, a key part of SpringSource’s full solution set, which covers the entire build, run, manage lifecycle for Java application development.

read more


Sun Tinkers with MySQL

Sun said Wednesday that it’s got an update to its MySQL Enterprise subscription called MySQL Enterprise Fall 2009 that will let DBAs graphically drill down into database bottlenecks to improve application performance. The widgetry can be had for the moment on a free 30-day trial subscription. Sometime in the next month it’ll go commercial.

read more


Ajax in RichFaces 3.3, JSF 2 and RichFaces 4

During my RichFaces session at JBoss World 2009, I showed three small examples of using Ajax with RichFaces 3.3, JSF 2, and RichFaces 4. I thougth it would be a good idea to show you the difference or more correct the similarities between the three. I will be blogging more about RichFaces 4 [...]

read more


September 02, 2009

JDev 11gR1 - af:tree mashup – Using Hierarchical Tables and Drag-n-Drop

This blog post demonstrates creating an ADF Faces RC af:tree component that sources its data from a hierarchical database table, and supports drag n drop of the nodes.

Both these topics have been discussed and demonstrated by other excellent bloggers, the core of this post is to bring both concepts together, with my usual own proof of concept documentation that may be useful to readers.

The ADF Faces RC support for hierarchical data sources was defined by Chandu Bhavsar.

The drag and drop support for af:trees was documented by Luc Bors.

(Definitely the kudos for this post must go to both Chandu and Luc for their posts that sparked the inspiration for mine)

Data model

In this example we'll use the following table:

CREATE TABLE organisations
(org_id NUMBER(4,0) NOT NULL
,parent_org_id NUMBER(4,0)
,name VARCHAR2(35) NOT NULL
,CONSTRAINT org_pk PRIMARY KEY (org_id)
,CONSTRAINT org_parent_fk
FOREIGN KEY (parent_org_id)
REFERENCES organisations (org_id));
Note the FK between the table and itself, essentially modelling that an organisation has sub-organisations (or agencies).

The data:
ORG_ID  PARENT_ORG_ID  NAME
------ ------------- -------------------------------
1000 (null) Sage Computing Services
1010 1000 Training Division
1030 1010 Self Study Program
1040 1010 Classroom Training
2264 (null) Australian Medical Systems
3210 (null) Conservation Society
3214 3210 Forests Division
3216 3210 Rivers Division
4394 (null) Newface cosmetics
3842 (null) Institute of Business Services
3843 3842 Marketing Services
3844 3842 Financial Services
Hierarchical af:tree

This details the steps to setup an ADF BC layer and ADF Faces RC bindings to support the af:tree with hierachical data from the organisations table, as previously described in Chandu Bhavsar post.

Note the following steps are well documented on Chandu's post, though you will find slightly more detail on creating the correct bindings below:

1) Create a Fusion Web App with an ADF BC Model project and ADF Faces RC ViewController.

Model project

2) In the Model project create an empty Application Module (AM)

3) Create an Entity Object (EO) based on your organisations table in the database.

4) Create two View Objects (VO) based off the same EM. Name the first ParentOrgView and the second LeafOrgView.

5) Modify the ParentOrgView query as follows:
SELECT Organisations.ORG_ID, 
Organisations.PARENT_ORG_ID,
Organisations.NAME
FROM ORGANISATIONS Organisations
WHERE Organisations.PARENT_ORG_ID IS NULL
6) You don't need to modify the LeafOrgView query. For completeness it's described as follows:
SELECT Organisations.ORG_ID, 
Organisations.PARENT_ORG_ID,
Organisations.NAME
FROM ORGANISATIONS Organisations
7) Create a VO Link between the ParentOrgView and LeafOrgView as follows:

Essentially:

ParentOrgView.OrgId = LeafOrgView.ParentOrgId

8) Create a second VO Link between the LeafOrgView to itself as follows:

Essentially:

LeafOrgView (source).OrgId = LeafOrgView (dest).ParentOrgId

9) Externalize the VOs through the AM using the following model:

Essentially:

ParentOrgView1
- LeafOrgView1
- - LeafOrgView2

ViewController project

10) In your ViewController project create a new blank JSF page called treeMashupDemo.jspx.

11) From the Data Control Palette drag the ParentOrgView onto the page as a tree. In the Edit Tree Binding you should see the following:

Note the first level of the tree has been defined as model.ParentOrgView.

12) For clarity when testing later, ensure both the OrgId and Name are included in the Display Attributes.

13) With the model.ParentOrgView node selected in the Tree Level Rules, select the green plus (+) button and select LeafOrgView:


14) With the LeafOrgView node selected in the Tree Level Rules, ensure both the OrgId and Name are included in the Display Attributes.

15) Again with the LeafOrgView node selected in the Tree Level Rules, again select the green plus (+) button, and select LeafOrgView__2:

Note how the Tree Level Rules only has 2 nodes, but to the right of each node is the child of the current node. Of specific interest in the hierarchical relationship between LeafOrgView and LeafOrgView__2.

16) For reference the JSF af:tree code is as follows:
         var="node"
selectionListener="#{bindings.ParentOrgView1.treeModel.makeCurrent}"
rowSelection="single"
id="t1">



...the bindings look as follows:

..and the page def XML file as follows:

Package="view.pageDefs">




























Testing

On running our web page we see the following:

Note that the tree is happily showing the hierarchical data based on our tree bindings.

Adding drag n drop to the tree

The next set of functionality we wish to add is the ability to drag and drop nodes, or in our case organisations, in the tree. This involves adding support for drag n drop to the tree, as well as behind the scenes updating the dropped organisation's parent_org_id to that of the org_id of the organisation the original was dropped on.

The inspiration of this section comes from Luc Bors blog post, with slight difference in mine some of the supporting code is further spelt out:

1) As a reminder at the moment our af:tree code looks as follows:
         var="node"
selectionListener="#{bindings.ParentOrgView1.treeModel.makeCurrent}"
rowSelection="single"
id="t1">



2) We then introduce a collectionDragSource and a collectionDropTarget to support the drag and drop within the tree:
         var="node"
selectionListener="#{bindings.ParentOrgView1.treeModel.makeCurrent}"
rowSelection="single"
id="t1">
modelName="DnDOrganisations"/>
modelName="DnDOrganisations"
dropListener="#{treeBean.dragAndDrop}"/>



Note both support the MOVE action, they both specify a matching modelName DnDOrganisations, and finally the dropListener maps to a backing bean method we'll define in a moment. It's essential the modelName's match including the case of the name, and we'll be referring to this in the dragAndDrop backing bean treeBean method in a moment.

3) In your adfc-config.xml file declare a bean treeBean of class view.TreeBean:


4) And create a Java class TreeBean in your view package within the ViewController project.
package view;

public class TreeBean {

}
The real work for drag and drop is done in the backing bean method. However in order for the code to work there are a couple of items we need to configure in the Model project:

5) Create an AppModuleImpl for the AM

6) Create a LeafOrgViewImpl for the VO

7) Create a LeafOrgViewRowImpl for the VO and ensure to include the accessors

8) In the AM expose the LeafOrgView VO one more time as its own node (not a child), and call the usage LeafOrgViewAll as follows:


9) Finally the dragAndDrop code is as follows. Note the code includes inline documentation comments that explains what is occurring:
package view;

import model.AppModuleImpl;
import model.LeafOrgViewImpl;
import model.LeafOrgViewRowImpl;
import model.ParentOrgViewRowImpl;
import oracle.adf.model.BindingContext;
import oracle.adf.view.rich.component.rich.data.RichTree;
import oracle.adf.view.rich.datatransfer.DataFlavor;
import oracle.adf.view.rich.datatransfer.Transferable;
import oracle.adf.view.rich.dnd.DnDAction;
import oracle.adf.view.rich.event.DropEvent;
import oracle.adfinternal.view.faces.model.binding.FacesCtrlHierNodeBinding;
import oracle.jbo.Key;
import oracle.jbo.uicli.binding.JUCtrlHierNodeBinding;
import org.apache.myfaces.trinidad.model.CollectionModel;
import org.apache.myfaces.trinidad.model.RowKeySet;

public class TreeBean {

public DnDAction dragAndDrop(DropEvent dropEvent) {
// The default action - do nothing
DnDAction result = DnDAction.NONE;

// Represents the object that was dropped
Transferable draggedTransferObject = dropEvent.getTransferable();

// The data in the draggedTransferObject "Transferrable" object is the row key for the dragged component.
// Note how the DnDOrganisations value in the call to getDataFlavor() matches the collectionDragSource
// and collectionDropTarget tags model attributes in our page. It's essential the strings exactly match.
DataFlavor draggedRowKeySetFlavor = DataFlavor.getDataFlavor(RowKeySet.class, "DnDOrganisations");
RowKeySet draggedRowKeySet = draggedTransferObject.getData(draggedRowKeySetFlavor);

if (draggedRowKeySet != null) {
// We grab the tree's data model, essentially the CollectionModel that stores the complete tree of nodes
CollectionModel treeModel = draggedTransferObject.getData(CollectionModel.class);

// Ask the collection model to set the current row/node to that of the transferrable object that was dropped
Object draggedKey = draggedRowKeySet.iterator().next();
treeModel.setRowKey(draggedKey);

// Grab that current row (thanks to the last statements work) and get the row's OrgId. It's essential the
// OrgId is one of the displayed attributes in the tree binding.
FacesCtrlHierNodeBinding draggedTreeNode = (FacesCtrlHierNodeBinding)treeModel.getRowData();
oracle.jbo.domain.Number draggedTreeNodeId = (oracle.jbo.domain.Number)draggedTreeNode.getAttribute("OrgId");

// The dropEvent carries the target/location's row key where the dropped organisations was dropped
Object serverRowKey = dropEvent.getDropSite();
RichTree richTree = (RichTree)dropEvent.getDropComponent();
// This time we use the tree itself to make it's current row that of the server row key (ie. the destination)
richTree.setRowKey(serverRowKey);
// And we retrieve that row's index
int rowIndex = richTree.getRowIndex();

// The rich tree based on the index allows us to retrieve that current row/organisation's OrgId
oracle.jbo.domain.Number targetNodeId = (oracle.jbo.domain.Number)((JUCtrlHierNodeBinding)richTree.getRowData(rowIndex)).getAttribute("OrgId");

// At this point we now have the OrgId of the dropped organisation (draggedTreeNodeId) and the OrgId of the
// organisation that is the target. From here we simply want to update the dropped organisations' ParentOrgId
// to the OrgId of the target. This is best done through the model layer.
//
// Normally this would be best done by fetching the appropriate iterator bindings and making the changes through
// the bindings. However in this case the tree doesn't expose any iterator for the leaf nodes, so we need to
// resort to retrieve the Model project's objects and do the work ourself.

// Retrieve the AM and then a handle on the LeafOrgViewAll - this gives us access to all rows regardless of
// where they exist in the hierarchy
AppModuleImpl am = (AppModuleImpl)BindingContext.getCurrent().getDefaultDataControl().getApplicationModule();
LeafOrgViewImpl leafOrgView = (LeafOrgViewImpl)am.getLeafOrgViewAll();

// Given the dragged organisation's OrgId, construct a key object, and then retrieve that row from the VO using
// the key
Object[] nodeObjectKey = new Object[] {draggedTreeNodeId};
Key nodeKey = new Key(nodeObjectKey);
LeafOrgViewRowImpl nodeRow = (LeafOrgViewRowImpl)leafOrgView.getRow(nodeKey);

// See below
boolean parentNode = nodeRow.getParentOrgId() == null;

// Finally update that organisaiton's ParentOrgId to that of the target organisation's OrgId
nodeRow.setParentOrgId(targetNodeId);

// And commit the changes – obviously this has side effects on any other uncommitted data, be careful
am.getDBTransaction().commit();

// If we've moved a parent node to become a leaf, we need to force the parent VO to requery itself to correctly
// reflect the data change. This is destructive on the current expand/collapsed state of the tree.
// I'm not overly sure of a solution for this; maybe a reader can suggest one.
if (parentNode) {
am.getParentOrgView1().clearCache();
am.getParentOrgView1().executeQuery();
}

// Indicate to the dragEvent that the operation was succesful and visually the move should occur in the tree
result = DnDAction.MOVE;
}
return result;
}
}
You'll note in the code I take pains to mention it's essential the OrgId is one of the displayed attributes for the tree. If you fail to supply this the routine has no OrgId attribute to fetch the OrgId value from.

This does pose a problem, because while during testing it's fine to show the OrgId and Name of the organisations in the tree, for production we might not want to show these meaningless internal ID numbers to the user. The simple fix for this is to return to the af:tree and update the af:outputText component who is responsible for what values to show for each node in the tree, changing the EL expression from #{code} to #{code.Name}:
         var="node"
selectionListener="#{bindings.ParentOrgView1.treeModel.makeCurrent}"
rowSelection="single"
id="t1">
modelName="DnDOrganisations"/>
modelName="DnDOrganisations"
dropListener="#{treeBean.dragAndDrop}"/>



This ensures only the name attribute is displayed:

read more


September 01, 2009

Intalio Acquires Webtide, Developer of the Jetty Application Server

Intalio, The Enterprise Cloud Company, has announced the acquisition of Webtide, the team behind the Jetty open source Java application server. Jetty is currently used on millions of web servers, and powers products such as Cisco SESM, Google AppEngine, Google GWT, HP OpenView, IBM Tivoli NetView, Oracle WebLogic Business Connect, Sybase EAServer, and Yahoo! Zimbra. Jetty has become the most popular application server for embedding into other open source projects, including ActiveMQ, Alfresco, Eclipse, Felix, FUSE, Geronimo, GigaSpaces, JBoss, JRuby, Liferay, Maven, Nuxeo, OFBiz, Tungsten, and Ubuntu. Jetty is also used as a standard Java application server by many open source projects for cloud computing, including Eucalyptus and Hadoop.

read more


JSR Watch: Summer Housekeeping

It's summer. JavaOne is behind us, and much of Europe is on holiday :) At this time of year life in the JCP slows down somewhat. Nevertheless JSRs continue to move through the process, and this month I'll discuss several of these, and demonstrate how their progress has been facilitated by some of the housekeeping changes we've recently made in our processes.

read more


KonaKart v4.1.0.0 Released

DS Data Systems UK Ltd. is pleased to announce the release of KonaKart v4.1.0.0, a Java-based eCommerce shopping cart application that provides an extensive set of features to enable retailers to successfully sell their products over the Internet. KonaKart is a Java / JSP / XML based solution with easy-to-use Java APIs and a SOAP Web Service interface that allow you to quickly integrate eCommerce functionality into your existing systems.

read more


August 31, 2009

Sun Loses Another $147M

Sun tiptoed out its June results. No press release and certainly no conference call, only a SEC filing and a posting on its web site last Friday, covering what will probably be its last quarter as an independent company before it collapses into Oracle’s waiting arms – that is unless the European regulators screw it over. The erstwhile high flyer lost another $147 million, 20 cents a share, with sales down 31% to $2.63 billion, more than the $2.37 billion financial analysts expected and towards the high end of Sun’s guidance.

read more


A Simple Java Class for Amazon SimpleSQS

A very simple POJO Java class for accessing all of the features of Amazon's SQS web service. Full API support. No dependencies. Just use it.

read more


<< Back Next >>