1). What is JBOSS?

JBoss is a popular open source application server based on JEE technology. Being JEE based, the JBoss supports cross-platform java applications. It was embedded with Apache Tomcat web server. It runs under any JVM of 1.3 or later versions. JBoss supports JNDI, Servlet/JSP (Tomcat or Jetty), EJB, JTS/JTA, JCA, JMS, Clustering (Java Groups), Web Services (Axis), and IIOP integration (JacORB).

2 ). What is JBoss cache in short?

JBoss cache is a product. Frequently accessed Java objects are cached by utilzing JBoss cache to improve the performance of e-business applications. JBoss decreases the network traffic and increases the scalability of applications by eliminating unnecessary database acces.Fully transactional features and highly configurable set of options which are to deal with concurrent data access, are provided by JBoss cache in an efficient manner possible for the applications.

3 ). What is JBoss JBPM?

JBoss JBPM is a workflow and BPM engine. Enabling the creation of business processes that coordinates between people, applications and services is the functionality of BPM engine. The combination of workflow applications development with process design is a feature of JBoss jBPM. The business process is graphically represented to facilitate a strong link between the business analyst and technical developer. This feature is provided by the JBoss jBPM process designer.

4 ). How do you monitor JBoss and detect the bottleneck of an application?

Different components of the application are to be measured. This step is to find where the degradation is, whether it is external or internal and where is the appliciation spending all the time. Using Joss JMX agents and monitoring the deployed components to the application server involves in the first step.

 

After finding the most of the time spent by specific components or libraries or most of the resources, one can use Jprobe a specialized tool for examining the single object or the objects loaded in the memory.

5). What is JTA?

► Java Transaction API (JTA) specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system: the resource manager, the application server, and the transactional applications.

► The Java™ Transaction API (JTA) allows applications to perform distributed transactions, that is, transactions that access and update data on two or more networked computer resources.

► The Java Transaction API consists of three elements: a high-level application transaction demarcation interface, a high-level transaction manager interface intended for an application server, and a standard Java mapping of the X/Open XA protocol intended for a transactional resource manager.

 

6). What is the difference between Hibernate and EJB 3? Do not you think EJB 3 is just a clone of Hibernate?

The perception of EJB3 as being a simple clone of Hibernate is primarily based on developer familiarity with Hibernate and a similarity of naming, as well as common purpose, and that Hibernate is morphing itself into an EJB3 implementation based on the work going into the specification, not the other way around.

 

EJBs are supposed to be components, in the sense that they’re not just one class, but a set of classes, descriptors and usage and management contracts. All of this in order to allow a container (JBoss,

Weblogic, etc.) to provide services to those components, and to be able to reuse and distribute this components. This services are, among others, transactions, concurrent access control, security, instance pooling, etcetera.

Hibernat is “just” an ORM (Object/Relational Mapping) tool. Quick and dirty, this means you can store an object tree belonging to an class hierarchy in a relational DB without writing a single SQL query. Quite cool, IMO. But no transaction control, no instance pooling, no concurrency control, and certainly no security.

7). Which Hibernate object wraps the JDBC Connection?

The Session interface wraps a JDBC Connection. This interface is a single threaded object which represents a single unit of work with application and persistent database. It’s retrieved by the SessionFactory’s openSession() method

8). Is the Session Factory Thread safe?

Yes: that is many threads can access it cuncurrentely and request for sessions. It holds cached data that has been read in one unit of work and may be reused in a future unit of work. Good practice is to create it when the application is initialized.

9). How can you start a JTA transaction from a Servlet deployed on JBoss?

JBoss registers in the JNDI tree a JTA UserTransaction Object which can be user to manage a distributed transaction.

10). What if you need to span your transaction across multiple Servlet invocations?

You can’t with a Servlet. A JTA transaction must start and finish within a single invocation (of the service() method). You should consider using a Stateful SB. In a SFSB with a JTA transaction, the association between the bean instance and the transaction is retained across multiple client calls.

 

11). What are the differences between EJB 3.0 and EJB 2.0?

EJBs are now plain old Java objects (POJO) that expose regular business interfaces (POJI), and there is no requirement for home interfaces.

 

► Use of metadata annotations, an extensible, metadata-driven, attribute-oriented framework that is used to generate Java code or XML deployment descriptors.

► Removal of the requirement for specific interfaces and deployment descriptors (deployment descriptor information can be replaced by annotations).

► Interceptor facility to invoke user methods at the invocation of business methods or at life cycle events.

► Default values are used whenever possible (“configuration by exception” approach).

► Reduction in the requirements for usage of checked exception.

► A complete new persistence model (based on the JPA standard), that supersedes EJB 2.x entity beans

12). What is the diffrence between a local-tx-datasource and a xa-datasource? can you use transactions in both?

A local-tx-datasource identifies a data source that uses transactions, even distributed trans actions within the local application server, but doesn’t use distributed transactions among multiple application servers. An xa-datasource on the other hand identifies a data source that uses distributed transaction among multi-ple application servers.

13). What do you need to set-up a cluster with JBoss?

Basically starting JBoss with the “all” configuration contains everything needed for clustering:

It has all the libraries for clustering:

 

► JGroups.jar, jboss-cache.jar

► Clustered beans (cluster-service.xml)

► HA-JNDI

► HTTP session replications (tc5-cluster-service.xml)

► Farming

► HA-JMS

14). What optimization could I use if the EJB container is the only point of write access to the database?

You could activate the “Commit Option A” that is the container caches entity bean state between transactions. This option assumesthat the container has exclusive access to the persistentstore and therefore it doesn’t need to synchronizethe in-memory bean state from the persistent store at the beginning of each transaction.

15). Which component handles cluster communication in JBoss?

The JGroups framework provides services to enable peer-to-peer communications between nodes in a cluster. It is built on top a stack of network communication protocols that provide transport, discovery, reliability and failure detection, and cluster membership management services.