Table of Contents

Can I Use Ajax With Seam?

Yes, Seam provides excellent support for AJAX. First, Seam supports the ICEfaces and Ajax4JSF Ajax component libraries for JSF. If you prefer a more “old fashioned” approach, Seam provides a complete JavaScript remoting framework which lets you call Seam components and subscribe to JMS topics directly from the client. Please refer to the Seam remoting example application on using AJAX remoting to implement a chat room.

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 assumes that the container has exclusive access to the persistent store. Therefore it doesn’t need to synchronize the in-memory bean state from the persistent store at the beginning of each transaction.

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

Starting JBoss with the 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

What are the essential types available for marker file deployment?

The following are the important types available for the marker file deployment.

.dodeploy – instruct to deploy
.deployed – indicate the file is deployed
.pending – deployment is still pending
.undeployed – confirmation that application is undeployed
.failed – deployment is failed for some reason
.skipdeploy – instruct JBoss to ignore the files for auto-deployment

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 is the process of deploying an application?

There are three possible ways to deploy an application in the 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.

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.

Is it possible for you to create a cluster in standalone mode?

Yes, clustering is possible in standalone mode. However, an application must be deployed on each server/JVM in standalone mode.

How to start JBoss in standalone mode?

Go to the bin folder where JBoss is installed and start with the following command.

./standalone.sh

What do you understand by the tern JBPM?

JBPM: JBoss JBPM is referred to as a workflow or BPM engine. It is the aspect that enables the creation of the business processes, which helps in coordinating the people, services, applications, which is one of the primary functionality of the BPM engine. The most important feature is the combination of the workflow application development with the process design. The JBoss JBPM designer is flexible to facilitate a strong link between the business analyst and technical developer.

What’s the default port to access the Administration Console in JBoss 7?

9990 is the default port. If it’s installed on server1, then you need to access like:

http://server1:9990/admin-console

Where Can I Find Seam Examples And Documentation?

The source code and build script of all Seam example applications are included in the examples directory of the Seam distribution.

Can I Run Seam With Jdk 1.4 And Earlier?

No, Seam only works on JDK 5.0 and above. It uses annotations and other JDK 5.0 features.

Can I Run Seam In A J2ee Environment?

Yes, as of Seam 1.1, you can use Seam in any J2EE application server, with one caveat: you will not be able to use EJB 3.0 session beans. However, you can use either Hibernate or JPA for persistence, and you can use Seam JavaBean components instead of session beans.

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

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 A .war, .ear Or A .jar File?

WAR – WAR refers to a web application archive. WAR is a jar file used to distribute a collection of JavaServer Pages, Java Servlets, Java classes, xml files, tag libraries, static web pages (Html & others), and other resources that constitute a web application.

JAR – JAR refers to Java Archive. JAR is an archive file format typically used to aggregate many Java class files and associated metadata and resources into one file to distribute application software, libs on the Java platform.

EAR – EAR refers to Enterprise Archive. EAR is used for packaging one or more models into a single archive so that the deployment of the various modules into the app server happens simultaneously and coherently.

What protocol by default uses mod_cluster?

By default, the mod_cluster subsystem’s balancer makes use of the multicast UDP to advertise its availability to the background workers.

How To Install Jboss On Linux Server?

Installation of JBoss is effortless and straightforward. All you need to do is download the desired version from the JBoss official download page in zipping or gz format.

Once the desired version is downloaded, extract the file to the location you want to install. If you downloaded the zip format, then you can use the unzip command to remove it.

What is the difference between validate-on-match and background-validation? can you use both of them?

When the validate-on-match option is set to true, the database connection is validated every time it is checked out from the connection pool using the validation mechanism specified in the next step.

On the other hand, background-validation fires a background validation as dictated by the background-validation-millis.

You cannot apply both of them, they are mutually exclusive.

Describe the use of the “instanceof” keyword?

“instanceof” keyword is used to check what is the type of object.

How is it possible to increase Java Heap Memory in JBoss 7?

It is possible to increase Java heap memory in a separate conf file. To improve memory for standalone;

<> Navigate to the bin folder
<> Edit the standalone.conf file and look for “JAVA_OPTS=” argument line
<> The default configuration will have a minimum of 64 MB and a maximum of 512 MB. You can increase to the desired value.

What are the different logging services that are offered by the JBoss server?

The logging server helps the user log into the server and save its logging details, which are likely to be used again. The package that is used for logging is log4j. The logging onto a server is controlled from a central file that resides in the configuration file that is managed separately. The file name is given as log4j.xml, and this file defines a set of appending files that are also considered log files. The file follows a specific format that should go with the message, and it also includes a filtering option that is used to filter out the details that are not required. The output of this file gets to both the console, and a log file that is also called a server log is given in the log directory. Logging services are crucial as it helps in the management and keeps the defined data on the server of people who are logging in.

Briefly list out the differences between validate-on-match and background-validation? Can you use both of them?

The Validate-on-match option is used for the validation of the database connection every time. If the validate-on-match option is set to true, it is validated and checked out from the connection pool by utilizing the validation mechanisms specified in the next step.

The background-validation option fires a background validation as dictated by the background-validation-millis. It is not possible to apply both of them. They are found to be mutually exclusive.

Does Seam run on other application servers besides JBoss?

The seam runs beautifully on other application servers – just like everything else the Hibernate team does, this is not a JBoss-only thing.

What are the steps that are involved in deploying the Jboss cache using the Mbean service?

JBoss cache provides MBean service that can be registered with the environment to allow the cache access using JMX. The steps that are involved in deploying JBoss cache that is using Mbean service is that:

  1. First, copy the configuration xml file and deploy it in the directory that is given by the JBoss cache. The configuration files from all other sections are present there only.
  2. Check the etc/META-INF directory for the configuration files that are for different cache modes and that can be used to deploy the JBoss cache.
  3. Get the command to invoke the right service like create, start, stop, and destroy operations t be performed on the files given in the directory.
  4. Look for the details of the cache’s current state to see the process which can be executed or contained before any other.
  5. Cache configuration files are checked and necessary changes are made when the cache is already running.

What are the components that are used in JBoss Cache?

JBoss cache is used as a replicated and transactional cache. It is said that because multiple Jboss cache instances can be distributed in java virtual machine or each virtual machine will have its copy of it. This cache can reside on the same machine or different machines that are on the network. This keeps the replicated data across the network in case any failure arises. The transactional property is because the user can create and configure a compliant transaction manager and make their cache operations. If the cache is not replicated then it is running in a local mode and it has two components that are involved:

  1. Generic cache: It has internal implementation and the method can be used as org.jboss.cache.TreeCache
  2. POJO cache: It is also implemented internally by using the method as org.jboss.cache.aop.PojoCache. It extends the functionality of Tree.
  3. TreeCache: Is used to represent a tree-like cache that provides easy replication and transaction properties to extend the functionality of the object cache. It provides a transparent mapping tool to map it to the internal cache.

What do you understand by the term JTA? What is the process of starting a JTA transaction from a Servlet deployed on JBoss?

JTA stands for Java Transaction API. The JTA is mainly used to specify the standard Java interfaces between the Transaction Manager and the other parties involved in the distribution management system. JTA allows the applications to perform the distributed transactions, which usually refers to the transactions that access and update the data on two or more networked computer resources. JTA API has come up with three elements: a high-level transaction manager interface specifically for an application server, a high-level application transaction demarcation interface, standard Java mapping of the X/Open XA protocol intended for a transactional resource manager. A JTA transaction starts by allowing JBoss to register in the JNDI tree, a JTA User Transaction object, which manages a distributed transaction.

In your pom.xml file, what is the difference between the and section?

Artifacts specified in the section will always be included as a dependency of the child modules.
Artifacts specified in the section will only be included in the child module if they were also specified in the section of the child module itself. Here’s an example of it:
org.wildfly.bom
wildfly-javaee7-with-tools
10.0.0.Final
pom
import

In your pom.xml file, what is the difference between the and section?

Artifacts specified in the section will always be included as a dependency of the child modules.
Artifacts specified in the section will only be included in the child module if they were also specified in the section of the child module itself. Here’s an example of it:
org.wildfly.bom
wildfly-javaee7-with-tools
10.0.0.Final
pom
import

What is wrong with the following plugin configuration?

org.apache.maven.plugins
maven-surefire-plugin
Although technically correct, not specifying a version for a Maven plugin is a very bad idea. Plugins can vary completely their behavior from a version to another, causing your build to break or even cause unwanted results.

What are the additional services that are provided with the JBoss server?

Additional services are used as non-core, hot-deployable services that are added to the deploy directory and it consists of XML descriptor files. It is consisting of the following properties and files that are used as:
Service.xml or the SAR (JBoss Service archive) file that consists of both XML descriptors and additional resources that are required by the service provider all in a single archive file. There is given the detailed information on all these services that can be found in JBoss that provides the information on server internals and use implementation services like JTA and uses the JCA (J2EE connector architecture)

What are the important types available for marker file deployment?

dodeploy – instruct to deploy
.deployed – indicate the file is deployed
.pending – deployment is still pending
.undeployed – confirmation that application is undeployed
.failed – deployment is failed for some reason
.skipdeploy – instruct JBoss to ignore the files for auto-deployment

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

[social_share_button themes='theme1']

Leave a Comment