1. What Is Jboss?
Answer: 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 the 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 (Jacob).
2. What does mgmt-user?properties contain?
Answer: All admin console users and passwords (encrypted) are stored in mgmt.-user.properties file.
I hope above to give you an idea of 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?
Answer: 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 a server log is 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 bpm?
Answer: 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 the BPM engine. The combination of workflow application 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?
Answer: 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 the 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 the difference between and?
Answer: 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 its side-effects would be not detecting immediately if dead connections.
7. What are the core services provided by the JBoss server?
Answer: 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 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 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 its side-effects would be not detecting immediately if dead connections.
8. What Do You Think About Bpel And Bpm? How Do They Compare?
Answer: BPEL and BPM are quite different things so they cannot even be compared. The problems boil 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 of service orchestration, which is publishing new services as a function of other services.
while BPM is needed for handling human task management functionalities and subprocess management.
9. How to increase Java Heap Memory in JBoss 7?
Answer: Heap Memory can be increased in a respective conf file. To increase memory for standalone;
Go 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.
Xms – specify the minimum heap size
Xmx – specify the maximum heap size
Similarly, you can adjust the memory for a domain in the domain.conf file
10. Do You Know How You Could Add Support For Web Service Transactions?
Answer: 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.
11. What are the Security Services provided by the JBoss server?
Answer: 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?
Answer: JBoss clustering is on top of the JGroups toolkit which helps to create, delete, membership detection, notification, etc. in the cluster.
13. How To Install Jboss On Linux Server?
Answer: JBoss installation is very straightforward. You need to download the desired version from the JBoss official download page in zipping or gz format.
Once downloaded, just extract the file to the location you want to install. If you downloaded the zip format, then you can use unzip command to extract it.
14. Are EJB 2 still supported in WildFly 10 and EAP 7?
Answer: 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?
Answer: The perception of EJB3 as being a simple clone of Hibernate is primarily based on developer familiarity with Hibernate and SVR 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 to allow 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, etcetera.
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 certainly no security.
16. What protocol by default uses mod_cluster?
Answer: By default, the mod_cluster subsystem’s balancer uses multicast UDP to advertise its availability to the background workers.
17. Can I still use mod_cluster even if multicast is not available?
Answer: Yes, you can. You have 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?
Answer: In terms of configuration: The https site 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 https 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?
Answer: 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 and therefore it doesn’t need to synchronize in-memory bean state from the persistent store at the beginning of each transaction.
20. Which component handles cluster communication in JBoss?
Answer: The JGroups framework provides services to enable peer-to-peer communications between nodes in a cluster. It is built on top of 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?
Answer: In my opinion, one of the biggest obstacles 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 lose 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 before the redevelopment 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 move 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?
Answer: You might consider using an attachment to transfer the information.JBoss JAX-WS Web services provide Attachment support with MTOM (Message Transmission Optimization Mechanism) SOAP.
23. What Is A .war, .ear Or A .jar File?
Answer: 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 models into a single archive so the deployment of the various modules into the app server happens simultaneously and coherently.
24. What are the different types of services provided by the JBoss server?
Answer: 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 purposes 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.
25. What if you need to span your transaction across multiple Servlet invocations?
Answer: 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 an 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?
Answer: 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 to ensure security.
27. What is the JBoss cache?
Answer: JBoss Cache is a product. Frequently accessed Java objects are cached by utilizing 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 access. 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-data source and a xa-data source? can you use transactions in both?
Answer: A local-tx-data source 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. A xa-data source, on the other hand, identifies a data source that uses distributed transactions among multiple application servers.
29. What is the role of an appender in logging when used in JBoss?
Answer: The file that is created using the appender specifies the use of it as a 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 every day 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 the JBoss server?
Answer: 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 the log4j.xml file.
31. How can you deploy an application?
Answer: 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.
32. What are the important types available for marker file deployment?
Answer: .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
33. What are the additional services that are provided with the JBoss server?
Answer: 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)
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. Plugins can vary completely their behavior 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?
Answer: 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?
Answer: 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.
37. What are the steps that are involved in deploying the Jboss cache using the Mbean service?
Answer: 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?
Answer: The 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?
Answer: Servlets executes on Servers while Applets executes on the browser, Unlike applets, servlets have no graphical user interface.
40. Describe the use of the “instanceof” keyword?
Answer: “instanceof” keyword is used to check what is the type of object.
41. What is the difference between validate-on-match and background-validation? can you use both of them?
Answer: 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?
Answer: 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.
43. Can I Unit Test Seam Applications Without Starting The Application Server?
Answer: 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.
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?
Answer: A simple and effective way to do it, is adding the following JVM option, which will output all the JVM options at startup:
46. Say you have frequent “Connection closed” in your logs. You ping the database but it’s reachable. What would you do?
Answer: 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
47. If you have JVM Settings at Server Group Level and your Servers are configured to use the Host JVM Settings, which one prevails so?
Answer: 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.
48. What is the difference between standalone and domain mode?
Answer: 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.
49. How Do You Monitor Jboss And Detect The Bottleneck Of An Application?
Answer: 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?
Answer: 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:
51. Is It Possible To Put A Jboss Server Instance Into Multiple Cluster At The Same Time?
Answer: 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 issues?
Answer: 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.