Sun River
Topics about Java SE, Servlet/JSP, JDBC, MultiThread, UML, Design Pattern, CSS, JavaScript, Maven, JBoss, Tomcat, ...
posts - 78,comments - 0,trackbacks - 0

Architect (Java) Interview Questions

General and general terms questions

Architect interview is slightly different from all other interview types. Interviewer is looking for ability of the candidate to think independently on top of pure technical knowledge. Most of the questions are open-ended, prompting the interviewee to discussion about different aspects of Java development. Other side of the interview is general questions about position of the architect within the organization. Some questions do not have clear, direct or single answer and require discussion with the interviewer. On top of questions mentioned here you may be asked generic OO questions (what is class, what is polymorphism etc.)
  1. What distinguishes "good architecture" from "bad architecture"?
    This is an open-ended question. There are few aspects of "good" architecture:
    1. Shall address functional product requirements
    2. Shall address non-functional product requirements, such as performance, scalability, reliability, fault tolerance, availability, maintainability, extensibility
    3. Shall be simple and comprehendible (to support maintainability and extensibility)
    4. Shall be well structured (support multiple tiers, parallel development etc.)
    5. Shall be detailed enough to share with different levels of organizational structure (marketing, sales, development, management)
    "Bad" architecture is basically opposite to "good" architecture.
  2. How much experience do you have with Enterprise applications? Another variant of this questions is: "Tell me about projects where you worked with J2EE?" Yet another version: "What, when and how made using EJB?"
    Interviewer is looking for your experience with designing J2EE applications and your experience with J2EE technologies and general terms. This is often start of the discussion and bridge to the technical section of the questions.
  3. What is scalability?
  4. What is high-availability? How is it different from scalability?
  5. What is the fault tolerance?
  6. What resources are used to keep up to date with J2EE technology?
    You may mention design pattern books, such as "Core EJB Patterns" and web sites, such as http://www.theserverside.com

Specific technical questions

  1. What modeling tools you are familiar with? What version of TogetherJ (Rational Rose etc.) have you used?
  2. If stateless session bean more scalable than stateful session beans?
    This is very popular questions that leads to some confusion. According to the second edition of "Core J2EE Patterns" and contrary to popular belief, stateful session beans are not less scalable than stateless session bean. The reason for that is life cycle of either type is controlled by Application Server and control of life cycle is what defines the scalability of the application
  3. What's the difference between EJB 1.1 and EJB 2.0?
    There are many differences. Some key points you want to mention are:
    1. New CMP model
    2. EJB Query Language
    3. Local interfaces
    4. EJBHome methods
    5. Message Driven Beans (MDB) support
  4. What transaction isolation levels do you know?
    none, repeatable read, read committed, read uncommitted, serializable
  5. What transaction attributes do you know?
    requires new, required, supports, not supported, mandatory, never
  6. What is the difference between optimistic lock and pessimistic lock?
    Optimistic lock is an implicit lock that tries to make best assumption about locking strategy and minimize time spent in lock of resource. Optimistic lock is usually implemented with some kind of timestamp strategy. Pessimistic lock is an explicit lock that set by client.
  7. What are entity beans. Are there any issues with them?
    Typical reaction to this question is very expressive answer that entity beans should not be used. There are many performancy implications with entity beans if used incorrectly. One of the famous problems are "n+1 call problem" Inter-entity bean call is very expensive operation and should be avoided.
  8. What core design patterns do you know?
    Architect must know at least some basic design patters used in J2EE development, e.g. Business Delegate, Session Facade, VO, List Handler, DTO, Composite Entity, etc.
  9. Where business logic should reside?
    Typical answer is "in business tier" This usually opens series of questions like: What is business logic, how to determine business logic, how business logic is different from persistent logic etc.
  10. What is JDO?
    JDO is Java Data Object - persistent framework that is alternative to idea of entity beans
  11. What is the difference between JSP and servlet? When to use what?
    JSP is compiled into servlet. JSP are better suit to view of information, while servlets are better for controlling stuff.
  12. Does the J2EE platform support nested transactions?
    No.
  13. Can you use synchronization primitives in my enterprise beans?
    No.
  14. Why all major application server vendors provide custom class loaders in addition to system jvm class loader?
    System one does not support hot deployment.

Performance questions

  1. What are performance problems in J2EE and how to solve them?
  2. What are Entity beans performance pitfalls?
  3. What performance pattern do you know?

Design Pattern questions

  1. Can you use singleton in EJB?
    Yes, but should not (explain why)
  2. What is MVC pattern and why M, V and C need to be separated?
  3. Describe Business Delegate pattern (or any other pattern)
  4. How to prevent double submission of the form from JSP page? (or describe Synchronizer Token pattern)
posted on 2009-03-17 11:51 Sun River 阅读(329) 评论(0)  编辑  收藏 所属分类: Archietect