2 avg. rating (40% score) - 4 votes
The Java J2ee Technical Support Engineer job will be responsible for designing and developing java plugins to support business requirements. Also responsible for many duties throughout the development lifecycle of applications, starting from conceptual and design part right through to testing phase. Here are some other responsibilities they may have: Design, Develop, test, implement and maintain application software. Getting certified in Java programming language will create more opportunities in the competitive world. Strong Communication Skills - Should be interacting with client stakeholders to probe a technical problem. Wisdomjobs has interview questions which are exclusively designed for job seekers to assist them in clearing job interviews. Java J2ee Technical Support Engineer interview questions are useful to attend job interviews and get shortlisted for job position.
You can check by using "ps" command and "grep" command e.g. ps -ef | grep "myprocess". The keyword which you use with grep for search can be anything unique to your process, something which appears in its command line e.g. name of the class which implements the main method. You can also do "ps -ef | grep java" to list all Java process.
First, you need to find the PID of your process, which you can find by using the "ps" command as shown in the previous question. Once you find the PID you can use the "top" command to find the CPU and memory usage. Alternatively, you can also use the prstat command as shown here.
These are parameters to specify heap size in Java. The -Xms defines the size of the heap when JVM starts up and -Xmx is used to specify the maximum heap size for Java application i.e. your heap cannot grow beyond that and JVM will die by throwing OutOfMemoryError if your heap doesn't have enough space to create new objects. See here to learn more about heap memory in Java.
The JRE stands for Java Runtime Environment and JVM stands for Java Virtual Machine. You install JRE to run Java application e.g. Applet or Core Java application or Web server like Tomcat. The JVM is part of JRE. See here to learn more differences between JVM and JRE.
The JVM stands for Java Virtual machine while JIT stands for Just in time Compiler. The JIT is part of JVM and used to convert the Java bytecode into native machine code which runs faster. There is some threshold set if a code runs more than the threshold it becomes the candidate of just in time compilation by JIT.
There are many ways to take the heap dump of a Java process e.g. Tomcat, but most common is by using tools available in JDK e.g. jVisualVM, jCmd, and jmap. Here is the command you can use to take the heap dump of Java process:
$ jmap -dump:live, file=/location/of/heap_dump.hprof PID
The heap dump will contain all live objects and they are stored in heap_dump.hprof file. Remember, you also need PID of Java process which you can find by using "ps" and "grep" command as discussed in the first question. You can see Java Performance Companion by Charlie Hunt to learn more about taking and analyzing heap dump in Java to find memory leak and other memory related errors.
Taking thread dump is easier than taking heap dump because you don't need to remember tool. In Linux, you can just use the kill command to take the thread dump e.g.
$ kill -3 PID
will print the thread dump in the log file or where System.out is redirected. Similarly, in Windows, you can use Ctrl + Break from the command prompt. Alternatively, you can also use jConsole and VisualVM to take the thread dump of Java application in both Windows and Linux. You can also read Java Performance The Definitive Guide By Scott Oaks to learn more about thread dump and heap dump.
The Java virtual machine throws java.lang.OutOfMemoryError when there is not enough memory to run the application e.g. no more memory to create new objects, no more memory to create new threads etc. The most common OutOfMemoryError is the java.lang.OutOfMemoryError: java heap space, which comes when there is no more memory left to create a new object.
The main differences between 32-bit and 64-bit JVM are that later is designed for 64-bit operating system e.g. Windows 8 or later versions of Linux. From Java developer's perspective, the main difference between them comes from heap size. A 64-bit JVM virtually has unlimited heap memory as compared to 4GB of the theoretical limit of 32-bit JVM. If your program needs more memory, better run it on 64-bit JVM with large heap space. See here to learn more about 32-bit and 64-bit JVM.
The garbage collector is a component of Java virtual machine which is responsible for reclaiming memory from dead objects. It's one of the key components and allows an application developer to focus on application development rather than doing memory management. Some of the popular garbage collectors are a Concurrent Mark-Sweep garbage collector and G1 garbage collector in recent times.
There are many tools to analyze heap dump in Java e.g. you can use the jhat tool which comes along with JDK. You can also use Eclipse Memory Analyzer to analyze heap dump to find out any memory leak in Java while dealing with OutOfMemoryError in Java. See Java Performance The Definitive Guide By Scott Oaks to learn more about analyzing Java Heap dump.
The main difference between Web and Application Server comes from the fact that you cannot run EJB on the Web server like Tomcat or Jetty. The application server like WebLogic and WebSphere provides the runtime environment for EJB and other advanced services required by Java EE or J2EE specification.
Though both httpd and Tomcat are products of Apache software foundation, the httpd is more popular and used across the web and not just in Java world. The httpd is a web server which can serve static HTML files and dynamic content using PHP, Perl or Python, while Tomcat is a Servlet container which provides the runtime environment for Servlet and JSP. You can also use both Apache httpd and Tomcat together in Java world.
Yes, you can use Apache and Tomcat together. There are many Java web application which is fronted by Apache web server to deliver static resources e.g. HTML files, images, configuration files etc. You can then configure Apache to forward the request to Tomcat.
When you install Tomcat in Linux by unzipping the downloaded package, you can see that there is a startup.sh and shutdown.sh file in the tomcat/bin directory. These scripts are used to start and stop Tomcat in Linux. These scripts internally call Catalina.sh, the main script to start Tomcat engine.
The Apache server runs as httpd daemon in Linux and you can either use kill command after finding the PID of httpd process as shown here or you can use the apachectl script as shown below to start and stop Apache web server in Linux
Starting Apache web server in Linux
$ apachectl start
Stopping Apache web server in Linux
$ apachectl stop
Restarting Apache web server in Linux
$ apachectl restart
/sbin/service httpd restart
You might need root access to do if Apache web server is not running on your application account.
As I said in the previous answer, the JDBC stands for Java Database Connectivity and provides APIs and guidelines to connect a database from Java, while JNDI stands for Java Naming and Directory Interface and provides a logical structure for retrieving resources e.g. database, messaging queues, enterprise Java beans without knowing their physical place e.g. host or port. You can register a resource with JNDI and then rest of your application component can access them using JNDI name. The database connection pool is the most common resource accessed via JNDI in web servers like Tomcat or WebLogic.
As it name suggests, it just a pool of database connections. Since creating a new database connection in real-time is an expensive process and can potentially slow down the response time, many application maintains a pool of active database connection. When a request comes in they retrieve a connection from the pool, get the data from the database and then return the connection back to pool so that it can be reused. This way, response time is improved in most of the Java web application. See here to setup a database connection pool in Tomcat using Spring framework.
Question 19. Your Java Application Is Connected To A Database Via A Connection Pool. Suddenly Your Database Goes Down? Is That An Issue With Your Java Application? Do You Need To Restart Your Java Application?
hint: Since your Java application is using a connection pool, it has active connections to database which will get disconnected once DB goes down. If you try to execute a query, you will receive Socket errors.
There are some commands available in Linux e.g. curl and wget which allows you to send HTTP commands, which you can use to call and test your web services from Linux. Particular, Curl is used extensively to test RESTful Web Services because it can send POST request, GET request, request with headers and also authenticate using both basic and digest authentication.
If you are working with REST API, I suggest learning curl, it's very convenient to check if your API is working properly using curl from the command line. You can even write a script to automate those stuff.
This is one of the common and easy questions. Of course, you know the difference between HTTP and HTTPS right? well, HTTP is insecure but HTTPS is secure, the extra "s" is for security, which means it not only encode and encrypt the message before sending but also verify the identity of the server by using SSL certificates provided by global certificate authorities e.g. GoDaddy, Thawte, VeriSign, Digicert, GeoTrust, and Comodo. See here to learn more how SSL and Certifications work in Java web application.
Another simple but frequently asked question on Java support interviews. The main difference between the GET and POST is that GET is both idempotent and safe but POST is not. You can fire GET request multiple time and it will give the same result but multiple POST submission should always be avoided. GET is also used to read data from server and POST is used to send data to the server.
This is another interesting Java JEE support Interview Question. Even though both Servlet and JSP is used to create dynamic HTML the key difference between them is their purpose. Servlet is meant for Java developers and you write more Java than HTML and that's why it serves as Controller in many popular MVC framework e.g. DispatcherServlet in Spring MVC.
On the other hand, JSP is designed for HTML developers and it's more HTML than Java and that's why it is used as "view" in MVC frameworks like Spring and Struts. See the link in the answer for more detailed comparison.
This is again a popular and frequently asked question on Java JEE Interviews. Even though both are popular web MVC framework for Java applications, the key difference is that Spring brings dependency injection first and Struts brings it later using Struts 2.0.
Spring is also a suite of libraries e.g. you get Spring Security to implement security in your application, then there is Spring Boot, Spring Data, Spring Cloud and many more useful libraries under Spring umbrella.
There are many differences between JDBC and Hibernate but the most important one is that JDBC provides an API to connect to the database and execute the query but Hibernate is an ORM (Object Relational modeling) framework, which means it allows you to work with objects while it takes care of saving and retrieving object from database.
In short, in JDBC you need to write SQL queries to get and store data from database but in Hibernate you just deal with objects, Hibernate takes care of issuing SQL queries to the database.
These are just two different memory areas used to store different kinds of variables. The stack is local to every thread while heap memory is shared among all threads. Since Stack is closer to thread and usually implemented using CPU registers they are faster than heap memory. The stack is used to store local variables as well method call frames while heap is used to store objects and class metadata. See the detailed answer for more points.
Question 27. Your Java Application Is Connecting To Another Java Application (server) Running On The Remote Host And Listening On Port 17865. Now, You Don't Have Access To That Remote Host To Go And See If The Process Is Running. How Do Find If The Server Is Up And Running?
you can use the telnet command.
Question 28. You Are Supporting A Java Web Application Which Connects To Many Core Java Process And Gets Data From Them To The Distribution To Clients? One Client Complains That The Request For Data Is Taking Too Long And It's Almost Like Hung? How Do You Troubleshoot This Problem?
check the log, check database, check the file system
Question 29. The Java Application You Support Connects To A Database Via A Dns, Which Automatically Switches To The Secondary Database Server When The Primary Goes Down. You Find That In The Event Of A Failover, Your Java Application Is Not Connecting To Secondary Db Server? How Do You Troubleshoot This Problem?
check which version your Java application is running. Some JRE caches the DNS e.g. JRE 1.6
The deadlock is a condition which can occur between two or multiple threads. In this case, each of the thread waits for each other and cannot progress. In Java, this usually happens when thread 1 holds the lock required by thread 2 and thread 2 holds the lock required by thread 1. If your Java program is hung then it could be a deadlock. You can take a thread dump and find out if any thread is waiting for the lock hold by other and vice-versa. You can also use jConsole tool to find deadlock.
The race condition is another multithreading and concurrency bug which happens due to racing between two threads, for example, if one thread is updating a variable and second thread tries to read the value before it finished. You can avoid race conditions by properly synchronizing your code.
Both are key environment variable used by Java platform, but the key difference between them is that PATH points to the JDK binaries or native libraries e.g. java.exe, while CLASSPATH points to Java binaries e.g. JAR files, which contains bytecode. PATH is also system level concept independent of Java but CLASSPATH is purely Java concept and used by JVM to load classes required by Java application you are running.
You can run the java -version command in the command prompt to find out the version of Java used by your application. If you have multiple JDK or JRE installed then make sure you use the one which is used by your application.
Java J2EE Technical Support Engineer Related Tutorials
|Java Script Tutorial||Adv Java Tutorial|
|Core Java Tutorial||Hibernate Tutorial|
|JavaServer Faces (JSF) Tutorial||Java 8 Tutorial|
|JavaFX Tutorial||NHibernate Tutorial|
|Spring MVC Framework Tutorial||The Java Debugger (JDB) Tutorial|
|Java.math Package Tutorial|
Java J2EE Technical Support Engineer Related Interview Questions
|Java Script Interview Questions||Adv Java Interview Questions|
|J2SE Interview Questions||Core Java Interview Questions|
|Java Struts Interview Questions||Hibernate Interview Questions|
|JavaServer Faces (JSF) Interview Questions||Java 8 Interview Questions|
|JavaFX Interview Questions||NHibernate Interview Questions|
|Spring MVC Framework Interview Questions||The Java Debugger (JDB) Interview Questions|
|Java J2ee Architect Interview Questions|
Java J2EE Technical Support Engineer Related Practice Tests
|Java Script Practice Tests||Adv Java Practice Tests|
|J2SE Practice Tests||Core Java Practice Tests|
|Java Struts Practice Tests||Hibernate Practice Tests|
|JavaServer Faces (JSF) Practice Tests||Java 8 Practice Tests|
|Spring MVC Framework Practice Tests|
Presentation Tier Design Considerations And Bad Practices
Business Tier Design Considerations And Bad Practices
J2ee Patterns Overview
Presentation Tier Patterns
Business Tier Patterns
Epilogue J2ee Patterns Applied
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.