Multiple VM’s in Java

Filed under: java, software, technology — Harshal at 5:05 am on Tuesday, May 15, 2007

The Java 2 SDK, Standard Edition, contains two implementations of the Java virtual machine (VM).

  • Java HotSpot Client VM
  • The Java HotSpot Client VM is the default virtual machine of the Java 2 SDK and Java 2 Runtime Environment. As its name implies, it is tuned for best performance when running applications in a client environment by reducing application start-up time and memory footprint.
  • Java HotSpot Server VM
  • The Java HotSpot Server VM is designed for maximum program execution speed for applications running in a server environment. The Java HotSpot Server VM is invoked by using the -server command-line option when launching an application, as in
  • java -server MyApp

 

XML Namespace and QName Explained

Filed under: java, software, technology — Harshal at 7:26 am on Thursday, May 10, 2007

The XML Namespaces specification defines a way to group element and attribute names so that schemas created by one organization will not conflict with those created by another. Just as two Java classes can have the same name as long as they are defined in separate packages, two XML elements can have the same name as long as they belong to different namespaces.

Each namespace defined in an XML document must be associated with a distinct uniform resource identifier (URI), which is usually a URL. These URIs have no semantic meaning and do not refer to actual web resources. You should define namespace URIs using domains that you control to prevent naming conflicts for the same reason that you should follow the URL naming convention for Java packages.

Two URIs are considered distinct if they are distinct character strings, regardless of whether they would resolve to the same physical resource (i.e. http://localhost and http://george are distinct URIs in the context of XML namespaces even on the host george).

Namespaces are associated with a prefix when they are declared and this prefix is used along with a local name to represent an element in an XML document. A namespace declaration looks like this:

The namespace http://url1 is bound to the prefix “a” and the namespace http://url2 is bound to the prefix “b” in this example. Three child elements of

: , , and , would have no namespace, a namespace of “http://url1″, and a namespace of “http://url2″, respectively, and all would have the local name “child”.

Namespaces have a scope associated with them. A namespace declared in a parent element is bound to a given prefix for that element as well as for all of its child elements, unless that prefix is “overridden” in a child element by being assigned to a different namespace. The association between the namespace and prefix declared in an element do not apply to the siblings of that element. This is equivalent to the scope of variable names within the Java programming language.

A default namespace can be defined by omitting the prefix mapping in the declaration as in “xmlns=’http://url3′”. At most one default namespace is in effect at any given point in an XML document. The default namespace is scoped just as the prefix mappings are. If a default namespace is in scope and an element appears with no prefix then it is associated with that default namespace.

Attribute names never inherit the default namespace and must be explicitly mapped to a namespace.

The “qName”, or qualified name, argument contains the element name exactly as it appears in the XML document, including the prefix and colon, if appropriate

CIOS AS TEACHERS

Filed under: self-help, philisophy — Harshal at 5:31 am on Thursday, May 10, 2007

Extracts from one of the internet literature

CIOs like to grouse about the paltry pickings of job candidates. But experts say instead of grumbling about it, CIOs should go back to school and help beef up the labor pool.

“While CIOs like to complain about the quality of candidates they’ve been getting, they’re not actually involved in shaping the candidates,” said Samuel Bright, an analyst at Cambridge, Mass.-based Forrester Research Inc.

Enrollment in computer science programs is waning — down as much as 70% in recent years, according to reports. At the same time, colleges and universities struggle to keep their curricula on par with changes in business.

“CIOs have expressed optimism about the future of the IT career, but they don’t necessarily hire at the entry level,” Bright said. “And those that do complain about the quality of the candidates they’ve been getting.”

Bright said computer science programs often struggle to align with the needs of IT organizations because they focus too much on programming. They also teach students about tools that are obsolete by the time they graduate. Bright said schools need to teach students how to work with multi-platform environments. Often they don’t teach key business skills that IT organizations are seeking, such as project management and negotiation.

In a research survey of 281 IT decision makers, Forrester found that most IT leaders do very little to reach out to local universities. Job fairs were the most common form of engagement between schools and IT organizations, with 57% of large IT organizations (500 or more IT employees) and 36% of small IT organizations participating. Job fairs are an effective recruiting tool, but if quality candidates aren’t graduating from the programs, these fairs do CIOs little good.

The next most common type of engagement between schools and IT organizations was service on a university advisory board, with 28% of large companies and 19% of smaller companies participating. Lecturing in the classroom, sponsoring scholarships, serving on curriculum review committees and donations of technology were all relatively rare.

Real world experience

“One of the CIOs I spoke with actually comes into a local university to lecture,” Bright said. “After he was done lecturing a professor said, ‘We don’t have to do two chapters because of what you just said about the challenges of service-oriented architecture. You covered what I would cover in two chapters with what you provided in real world examples.’

« Previous Page