June 20, 2006

Unit Test Secured EJBs in Production

nit testing, a critical part of the software development process, involves individually testing each unit of code to make sure that it works correctly on its own. Performed at different layers of an application, unit tests run best when they are done quickly and kept in mutual isolation. If the

How to Bind a GridView Control to XML in ASP.NET

In this example, your XML content is assumed to be ready and well formatted. To be compatible with a GridView, the XML document has to have a database-like format (table and records): ANGOLA241345 amp BENIN204435 amp Drag a GridView component from the Toolbox. Add to your GridView a PreRender event.

Fetching the Last Entered Records in Oracle

There are times that you may need to fetch the last couple of records that you’ve inserted. The exact number can vary. Oracle provides an easy way of retrieving these records. Consider the SQL below: SELECT * FROM (SELECT ROWNUM rownum, column1, column2, upto columnN FROM DATA_TABLE)WHERE rownum > (

Using the Standard Library Algorithms with Arrays

Pointers may be used as iterators when using the standard library algorithms found in . Remember that the start iterator should point to the first element, while the finish iterator should point just beyond the last element. For example, this code sorts an array of integers: ////////// begin codeint numbers[10]

Creating a StAX Filter for XML

This tip creates a StAX filter using the javax.xml.stream.StreamFilter interface. This filter accepts only characters, but you can also set the filter XML to retrieve only elements, attributes, or both: class BasicStreamFilter implements StreamFilter{public BasicStreamFilter(){}//implement the StreamFilter.accept methodpublic boolean accept(XMLStreamReader XMLsrFilter) { if(XMLsrFilter.isCharacters())return true; else return false; }}…public class StAXBasicStreamFilter{

WCF Essentials—A Developer’s Primer

indows Communication Foundation (WCF) provides a runtime environment for your services, enabling you to expose CLR types as services and to consume services as CLR types. Although in theory you can build services without it, in practice, WCF significantly simplifies this task. WCF is Microsoft’s implementation of a set of