Home » Java » Enterprise Java (page 337)

Enterprise Java

Heroku runs Java

If you are a Java fan boy, like me, then you have a good news to cheer about. Heroku runs Java now! Well, unlike other popular ‘web’ languages like PHP/RoR, Java has the legacy of being cumbersome to deploy and maintain in an web server. All this time, only enterprises had the effort to use the Java stack on their web tier. ...

Read More »

Web Services in Ruby, Python and Java

Today I’ve had to prepare some examples to show that web services are interoperable. So I’ve created a simple web service in Java using Metro and launched it on Tomcat. Then tried to consume them using Python and Ruby. Here’s how it all finished… Web service in Java I’ve started with a simple web service in Java: package com.wordpress.jdevel.ws; import ...

Read More »

Java Persistence API: a quick intro…

java-interview-questions-answers

Hello Readers! After numerous requests from some of my friends I’ve decided to write a short article about the Java Persistence API. Object Oriented programming paradigm is the most popular and widely used model nowadays and it outclasses and outshines most other paradigms because of its ability to model real life entities seamlessly. But when it comes to developing medium-sized ...

Read More »

EJB 3.1 Global JNDI Access

java-interview-questions-answers

As outlined in the previous parts of this series, the major drawback of the EJB v. 3.0 Specification was the lack of portable global JNDI names. This implies that there’s no portable way to link EJB references to a bean outside your application. The EJB v. 3.1 Specification fills this gap defining, in its own words: “a standardized global JNDI ...

Read More »

EJB Programmatic Lookup

java-interview-questions-answers

In our previous post we learnt about EJB references and EJB injection. Even though EJB injection is a powerful container facility that eases modular application development, sometimes performing a programmatic EJB lookup is instead desirable. Let’s suppose, for example, that a set of distinct EJBs implement a common strategy, defined by a common business interface. Depending on the result of ...

Read More »

Basic EJB References, Injection and Lookup

java-interview-questions-answers

In the first part of this series we’ve introduced the mechanisms provided by the Enterprise JavaBeans v. 3.0 Specification to define EJB components, declare a reference to an EJB and wiring them up both by dependency injection or programmatic JNDI lookup. In this blog post we’ll examine some basic examples to understand how to use the EJB API. A Basic ...

Read More »

An Introduction to EJB 3.0 Injection and Lookup

java-interview-questions-answers

Introduction The Enterprise JavaBeans Specification v. 3.0 introduces a simplified, annotation based API for EJB injection and lookup. EJB 3.0 are now POJOs and can be injected in other components (such as EJBs and Servlets) using simple annotations. EJB 3.0 is one of many other POJO-based specifications that made it to Java EE 6, such as JSR-229 “Contexts and Dependency ...

Read More »

Hibernate Gotchas to Watch out

I’ve been using Hibernate for some time now and when I don’t work on a hibernate project for a while I find myself doing the same mistakes I did the previous times. So here is a sort of watch list for my self hopefully will be useful to someone else as well. Implement hashCode and equals You should always implement ...

Read More »