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

Yes, Seam provides its integration test framework based on TestNG. You can easily mock all Seam services using those facilities without ever loading an application server or a database.

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 similarity of naming, as well as a 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 categories, descriptors, and usage and management contracts. All of this allows a container (JBoss, Weblogic, etc.) to provide services to those components and to be able to reuse and distribute this component. These services are, among others, transactions, concurrent access control, security, instance pooling, etc.

Hibernate is “just” an ORM (Object/Relational Mapping) tool. Quick and dirty, this means you can store an object tree belonging to a 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 indeed no security.

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

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

I want to be printed all the JVM options when Servers in a Domain start. How can I achieve it nt?

A simple and effective way to do it, is adding the following JVM option, which will output all the JVM options at startup:

How Do You Perform A Hot Deployment?

JBoss has a built-in hot deployer which can:

Detect new applications in the deploy folder and trigger an application deployment
Detect an application which was removed from the deploy folder and trigger an application undeployment
Detect that the deployment descriptor of an application (for example, the web.xml of .war or application.xml of .ear) has changed and trigger an application redeployment.

Can I Unit Test Seam Applications Without Starting The Application Server?

Yes, Seam provides its own integration test framework based on TestNG. You can easily mock all Seam services using those facilities without ever loading an application server or a database.

How can you deploy an application?

There are three possible ways to deploy an application in JBoss application server.
Admin Console – you can deploy the necessary application files through the administration console.
Auto-deploy – leverage file system deployment scanner to auto-deploy files from the deployments folder.
Automation – use automation tool/ant/scripting to deploy an application.

How Do You Enable/disable A Hot Deployment?

<> To enable, put file hdscanner-jboss-beans.xml in JBOSS_HOME/server//deploy.
<> To disable hot deployment, remove the hdscanner-jboss-beans. xml from the deploy folder or rename it to hdscanner-jbossbeans. xml.bak (.bak files are ignored).

Porting one application from Standalone mode to Domain mode: is it guaranteed that you won’t run in any issues?

One core difference between Standalone mode and Domain mode is that Standalone mode allows the manual deployment of applications by copying archives into the deployment folder. On the other hand, in Domain mode applications are managed and copied through the CLI or the Admin Console into the data folder of the single nodes. That being said, some applications might require to know the physical path where the application has been deployed: one good example is the LifeRay portal which requires some workarounds to run in Domain mode. So always check the requirement of the application before committing to a change from Standalone mode to Domain mode.

Is It Possible To Put A Jboss Server Instance Into Multiple Cluster At The Same Time?

It is technically possible to put a JBoss server instance into multiple clusters at the same time, this practice is generally not recommended, as it increases the management complexity.

What happens if the Domain Controller fails?

If the Domain Controller fails, it is not possible to manage the Domain configuration anymore but applications running on the single nodes are preserved. It is, however, possible to choose a backup Domain Controller server as in the following configuration snippet.

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 application spending all the time. Using Jboss 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.

What is the difference between standalone and domain mode?

Standalone mode is a single JVM process where every JBoss server has its configuration. If you just need one JVM or development environment, then standalone would be perfect.
Domain mode may have multiple servers where all configuration is managed centralized and often used in a production environment.
In this case, the Host configuration (named default) prevails, being more specific to the Server.

If you have JVM Settings at Server Group Level and your Servers are configured to use the Host JVM Settings, which one prevails so?

In a managed domain the JVM settings can be declared at different scopes: For a specific server group, for a host or a particular server. If not declared, the settings are inherited from the parent scope. In this case, you have the following configuration (domain.xml):
In this case, the Host configuration (named default) prevails, being more specific to the Server.

Say you have frequent “Connection closed” in your logs. You ping the database but it’s reachable. What would you do?

you likely have some infrastructure policy that closes idle connections before when they are still active for the application server. To cope with it, you have to include a Validation configuration in your Datasource which will prevent your application to use dead Connections. Example for Oracle

What Module Needed To Integrate Apache With Jboss?

There are two modules you can use to connect JBoss with Apache.

  • mod_proxy.
  • mod_jk.

How Can You Deploy An Application?

There are three possible ways to deploy an application in JBoss application server.

Admin Console – you can deploy the necessary application files through the administration console.
Auto-deploy – leverage file system deployment scanner to auto deploy files from deployments folder.
Automation – use automation tool/ant/scripting to deploy an application.

What Marker File Type Is Required To Instruct Jboss To Deploy?

.dodeploy file suffix is needed for JBoss to deploy or redeploy an application.
For ex: myfirstapplication.war.dpdeploy

Related Topic :

To Play Quiz Online

What is LibreOffice? LibreOffice Impress Features ?

LibreOffice Impress CCC Questions and Answer in Hindi 2022

CCC LibreOffice Calc Paper Questions with Answers

Leave a Comment