1. What Is Jboss? (Jboss Interview Questions)
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 (JavaGroups), Web Services (Axis), and IIOP integration (JacORB).
Jboss Interview Questions
2. What does mgmt-user.properties contain?
All admin console users and password (encrypted) are stored in mgmt.-user.properties file.
I hope above give you an idea what type of questions being asked in the Interview and wish you good luck.
3. What are the Logging Services provided by the JBoss server?
The logging server allows the user to log into the server and save its logging details which might 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 I given as log4j.xml and this file defines a set of appending files that also considered as log files. The file follows a specific format that should go with the message and there is also 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 as server log given in the log directory. Logging services are very important to manage as it keeps the defined data on the server of people who are logging in.
4. 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.
5. What Do You Know About Seam?
Built on the standards Java Server Faces and EJB 3.0, JBoss Seam unifies component and programming models and delivers a consistent and powerful framework for rapid creation of web applications with Java EE 5.0. Seam simplifies web application development and enables new functionality that was difficult to implement by hand before, such as stateful conversations, multi-window operation, and handling concurrent fine-grained AJAX requests. Seam also unifies and integrates popular open source technologies like Facelets, Hibernate, iText, and Lucene.
6. What is difference between and?
validate the database connection every time, and if a connection is not valid, it will write a warning in the logs.
Having “validate-on-match” configured may have a little high load on the database as it may create lots of requests.
validate the connection periodically based on what frequency is configured for “background-validation-millis”. The default configuration is set to zero means disabled.
Having “ background-validation” set to true will create fewer database connections and it’s side-effects would be not detecting immediately if dead connections.
7. What are the core services provided by the JBoss server?
The core services are specified in the configuration files that are used by the JBoss. This file lies in the configuration folder. The file is called as service.xml and it is the first file that starts when the server gets started. This file consists of the configuration MBeans for various services including the logging, security, etc. The example of the file is given as:
This way a service can be stopped and modified and this effect when the server gets restarted. It doesn’t list the services that are removed in the service management console.
database connections and it’s side-effects would be not detecting immediately if dead connections.
8. What Do You Think About Bpel And Bpm ? How Do They Compare?
BPEL and BPM are quite different things so they cannot even be compared. The problems boils down to the fact that these years maybe BPEL has been marketed for something which isn’t: that is a Business Process Management framework.
BPEL is made up for service orchestration, that is publishing new services as a function of other services.
while BPM si needed for handling human task management functionalities and subprocess management.
Jboss Interview Questions
9. How to increase Java Heap Memory in JBoss 7?
Heap Memory can be increased in a respective conf file. To increase memory for standalone;
Go to bin folder
Edit the standalone.conf file and look for “JAVA_OPTS=” argument line
The default configuration will have minimum 64 MB and maximum 512 MB. You can increase to the desired value.
Xms – specify the minimum heap size
Xmx – specify the maximum heap size
In a similar way, you can adjust the memory for a domain in domain.conf file
10. Do You Know How You Could Add Support For Web Service Transactions?
JBossTS supports Web Services transactions, including extended transaction models designed specifically for loosely-coupled, long running business processes. J2EE transactions can integrate seamlessly with Web Services transactions using our integrated, bi-directional transaction bridge. Interoperability with many other vendors is provided out-of-the-box and JBoss is an active participant in these standards.
Best 48 Jboss Interview Questions And Answers Pdf
11. What are the Security Services provided by the JBoss server?
Security Service consists of the domain information that is stored in the file in the login config.xml file and it has all the named security domains that specify the number of login modules that are used for authentication purposes in the domain. The security for the application can be used till it specifies the name of the domain to be used in specific JBoss deployment descriptors. The files that are to be considered are jboss.xml and jboss-web.xml. This is used to secure the JMX console application that comes with the JBoss. Every aspect of the server is controlled through the JMX console. The applications are kept password protected and any remote user can completely control the server without having any detailed information.
12. Which Component Is Responsible For Handling Clustering?
JBoss clustering is on top of JGroups toolkit which helps to create, delete, membership detection, notification, etc. in the cluster.
13. How To Install Jboss On Linux Server?
JBoss installation is very straightforward. You need to download the desired version from JBoss official download page in zip or gz format.
Once downloaded, just extract the file to the location you want to install. If you downloaded zip format, then you can use unzip command to extract it.
14. Are EJB 2 still supported in WildFly 10 and EAP 7?
WildFly 10 and EAP 7 still support Session Beans and MDBs written using the 2.X specification. What is not supported anymore are CMP Entity Beans 2.X
15. What’s the difference between Hibernate and EJB 3 ? Don’t 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.
16. What protocol by default uses mod_cluster?
By default, the mod_cluster subsystem’s balancer uses multicast UDP to advertise its availability to the background workers.
Jboss Interview Questions
17. Can I still use mod_cluster even if multicast is not available?
Yes you can. You habe to modify the HTTPD configuration to disable server advertising and to use a proxy list instead. The proxy list is configured on the worker, and contains all of the mod_cluster-enabled HTTPD servers the worker can talk to.
18. Why should I prefer mod_cluster over mod_jk?
In terms of configuration: The httpsd side does not need to know cluster topology in advance, so the configuration is dynamic and not static and as a consequence you need very little configuration on the httpsd side
In terms of load balancing: You have an improved load balancing as main calculations are done on the backend servers, where more information is available and thus a fine grained web application lifecycle control.
19. 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 persistentstore and therefore it doesn’t need to synchronizethe in-memory bean state from the persistent store at the beginning of each transaction.
20. 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.
21. How would you convince my IT department to adopt SOA?
In my opinion one of the biggest obstacle in the movement towards SOA adoption is the organization’s own IT department.Too many people in the IT organization conceive SOA as a technology concept only, and as such think of SOA as just a set of technologies and infrastructure for exposing, securing, running, and managing Services. Put it this way, SOA is nothing more than Web Services and standardized middleware. The critical flaw in thinking is confusing the technology that sits beneath the Services level of abstraction and the mechanism by which Services are accessed with the architectural approach that aims to decouple the implementation from the consumption and focus on sustainable architecture that allows for continuous change.
Successful SOA adoption requires a cultural shift in the way IT is done. The Service-oriented movement to agility and loose coupling demands a shift from traditional, waterfall styles of development (design-build-test-deploy-manage) to iterative approaches to continuous Service modeling
In a Service-oriented environment, governance moves from nice addon to an absolute requirement prior to the developement of the first Service. Security considerations shift from network boundaries to become context-specific, message-driven, and federated. And of course, the modus operandi of IT as a whole moves from focusing on the short-term project management to meeting the long-term sustainable needs of the business as it changes.
22. If you have defined a web service that needs to transfer quite a lot of information, how would you do?
You might consider using an attachment to transfer the information.Jboss JAX-WS Web services provides Attachment support with MTOM (Message Transmission Optimization Mechanism) SOAP.
23. What Is A .war, .ear Or A .jar File?
WAR – web application archive 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 others resources that constitute a web application.
JAR – Java Archive, 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 – Enterprise Archive is used to package one or more moduels into a single archive so the deployment of the various modules into app server happen simultaneiously and coherently.
24. What are the different types of services provided by JBoss server?
The services of the server are based on the type of files that are provided and kept by the server. The server provides the service from basic to advanced and they are classified as:
1. Core services: These are the services that provide scripts to start the server and provide the basic functionality of the start-up scripts.
2. Logging Service: These are the services that are used for logging on the server and using the configuration setting to modify and create it.
3. Security Service: These are the services that all the security domain information to be stored in the file login config.xml files and used to list the named security domain features. It specifies all the separate modules that are used for authentication purpose in the domain.
4. Additional Services: These are the services that are hot-deployable and directly deployed in the directory. They consist of XML descriptor files and other resource files.
Jboss Interview Questions
25. 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.
26. What is an Applet?
An applet is a small server side application that can be loaded and controlled on the browser by the client application. An applet has limited access to resources in order to ensure security.
27. What is JBoss cache?
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.
28. What is the difference 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 doesnt use distributed transactions among multiple application servers. An xa-datasource on the other hand identifies a data source that uses distributed transaction among multiple application servers.
29. What is the role of an appender in logging when used in JBoss?
The file that is created using appender specifies the use of it as logger for the package org.jboss.ejb.plugins.cmp. This makes it easy for the server to look at CMP and compare the two log files. The files are used to produce a new log file everyday and don’t produce any file even there are changes made every time. The service has to be restarted and during the restart there is no server file gets written or done. The older files consist of the dates that are written and added to the name of it. The log directory consists of HTTP request logs that are produced by the web container.
30. Write a program to show the change in level in JBoss server?
If the change in the level has to be set from INFO to DEBUG level then the output from the container-managed persistence engine has to be changed to the DEBUG level. A redirection takes place in separate files and a log is maintained with the name cmp.log to compare the files later on. The code that is written has to be added in log4j.xml file.
31. 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.
32. 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
Jboss Interview Questions
33. 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 descriptor 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)
34. What is wrong with the following plugin configuration?
Although technically correct, not specifying a version for a Maven plugin is a very bad idea. As a matter of fact, plugins can vary completely their behaviour from a version to another, causing your build to break or even cause unwanted results.
35. 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:
36. What are the components that are used in Jboss Cache?
Jboss cache is used as a replicated and transactional cache. It is said like that due to the fact that multiple Jboss cache instances can be distributed in java virtual machine or each virtual machine will have its own copy of it. These cache can reside on the same machine or different machines that is on the network. This keeps the replicated data across the network in case any failure arises. The transactional property is due to the fact that user can create and configure a compliant transaction manager and make their own 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: 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.
37. What are the steps that are involved in deploying Jboss cache using 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.
38. Does Seam run on other application servers besides JBoss?
Seam runs beautifully on other application servers – just like everything else the Hibernate team does, this is not a JBoss-only thing.
39. What’s the difference between servlets and applets?
Servlets executes on Servers while Applets executes on browser, Unlike applets, servlets have no graphical user interface.
40. Describe the use of “instanceof” keyword?
“instanceof” keyword is used to check what is the type of object.
Jboss Interview Questions
41. 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.
42. What is the procedure to access the JBoss Cache MBean service?
To access the MBean service the JBoss sets the server using many header files like Proxy files, Server locater files, cache configuration files etc. The sample code given below explains the procedure.
// These are the header files that are given above. It consists of all the files like server files, MBean service files, cache configuration files, etc.
public init() throws Exception
// This is the start function by which the process starts
// This is the exception handling block to find the errors at runtime
server = MBeanServerLocator.locateJBoss();
cache = (TreeCacheMBean) MBeanProxyExt.create(TreeCacheMBean.class, “jboss.cache:service=TreeCac
catch (Exception ex)
// handle exception
43. 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.
44. 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.
45.I want to be printed all the JVM options when Servers in a Domain start. How can I achieve it nt?
A simple an effective way to do it, is adding the following JVM option, which will output all the JVM options at startup:
JBoss Datasource interview questions
46. Say you have frequent “Connection closed” in your logs. You ping the database but it’s reachable. What would you do?
it’s very likely that you have some infrastructure policy which closes idle connections before when they are still Active for the application server. In order 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:
select 1 from dual
Jboss Interview Questions.
47. If you have JVM Settings at Server Group Level and your Servers are configured to use the Host JVM Settings, which one prevail so?
In a managed domain the JVM settings can be declared at different scopes: For a specific server group, for a host or for a particular server. If not declared, the settings are inherited from the parent scope. In this case you have the following configuration (domain.xml):
While at Host level you have (host.xml):
In this case, the Host configuration (named default) prevails, being more specific to the Server.
48. What is the difference between standalone and domain mode?
Standalone mode is 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 production environment.
While at Host level you have (host.xml):
In this case, the Host configuration (named default) prevails, being more specific to the Server.
49. 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.
50. What happens if the Domain Controller fails?
If the Domain Controller fails, it is not possible to managed 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:
51. 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.
52. Porting one application from Standalone mode to Domain mode: is it guaranteed that you won’t run in any issuee?
One core difference between Standalone mode and Domain mode is that Standalone mode allows 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 LifeRay portal which requires some workarounds to run in Domain mode. So always check the applications requirement before committing to a change from Standalone mode to Domain mode.