COSCO Java interview questions

Source: Internet
Author: User
Tags ssl connection
COSCO Java interview question zzz

COSCO Java interview questions

Java training materials
I. Java language
1. Three basic features of object-oriented
2. Concepts and differences between method overloading and method Rewriting
3. Features of interfaces, internal classes, and abstract classes
4. Basic file read/write classes
** 5. Precautions for serialization and how to implement serialization
6. Basic concepts of threads, basic states of threads, and relations between States
7. Thread Synchronization and how to synchronize threads
8. Several common data structures and internal implementation principles.
9. Socket Communication (Differences Between TCP and UDP and JAVA Implementation)
** 10. Java event delegation and garbage collection
11. Basic Steps for JDBC to call the database
** 12. Several Methods and differences for parsing XML files
13. Definition of four basic permissions in Java
14. Java Internationalization
Ii. jsp
1. At least seven implicit objects and their differences must be made.
** 2. Differences between forward and redirect
3. Common JSP commands
3. servlet
1. When do I call doget () and dopost ()?
2. Differences between servlet Init () and service () Methods
3. servlet Lifecycle
4. How to Implement servlet single-thread mode
5. servlet Configuration
6. Four session tracking technologies
4. EJB
** 1. Services provided by the EJB container
It mainly provides declarative cycle management, code generation, continuity management, security, transaction management, lock and release management services.
2. EJB roles and three objects
EJB roles mainly include bean developers, application assemblers, deployers, system administrators, EJB container providers, EJB server providers
The three objects are remote (local) interface, Home (localhome) interface, and Bean class.
2. Several types of EJB
Session Bean, Entity Bean message-driven Bean
Session beans can be divided into stateful and stateless.
Entity beans can be divided into two types: bean management continuity (BMP) and container management continuity (CMP ).
3. Bean instance Lifecycle
Stateless Session Bean, Entity Bean, and message driven bean are generally managed by the buffer pool, while Entity Bean and statefull Session Bean are managed by cache, which usually includes instance creation, set the context, create an EJB object (create), call a business method, and remove. For beans with buffer pool management, the instance is not cleared from the memory after create, instead, the buffer pool scheduling mechanism is used to repeatedly reuse instances. For beans with Cache Management, the activation and deactivation mechanisms are used to maintain the bean status and limit the number of instances in the memory.
4. activation mechanism
Taking statefull Session Bean as an example: the cache size determines the number of bean instances that can coexist in the memory. According to the MRU or NRU algorithm, instances are migrated between the activation and deactivation statuses, the activation mechanism is that when the client calls a business method of an EJB instance, if the corresponding EJB object finds that it is not bound to the corresponding bean instance, it will activate bean storage from it (storage instance through serialization mechanism) reply (activate) this instance. The corresponding ejbactive and ejbpassivate methods are called before the status changes.
5. Main Functions of the remote interface and home interface
The remote interface defines the Business Method for The EJB client to call the business method.
The home interface is used by the EJB factory to create and remove EJB instances.
6. Several basic steps for the client to call the EJB object
1. Set the properties of the JNDI service factory and the JNDI service address system
2. Search for the home interface
3. Call the create method from the home interface to create a remote interface
4. Call the service method through the remote interface
V. Database
1. Writing stored procedures
2. Basic SQL statements
6. WebLogic
1. How to specify the memory size for WebLogic?
In the Weblogic STARTUP script (startservername located in the directory of the corresponding domian server), add set mem_args =-xms32m-xmx200m. You can adjust the minimum memory to 32 MB and the maximum memory to 200 MB.
2. How to set the Weblogic hot start mode (Development Mode) and product release mode?
You can change the Startup Mode of the corresponding server to one of the development or product modes on the console. Or modify the Service Startup File or commenv file and add set production_mode = true.
3. How do I not need to enter the user name and password at startup?
Modify the Service Startup File and add the wls_user and wls_pw items. You can also add encrypted user names and passwords to the boot. properties file.
4. In the Weblogic Management Console, After configuring JMS, EJB, connection pool, and other related information for an application domain (or a website or domain), what files are actually stored in?
The config. xml file stored in this domain is the core configuration file of the server.
5. What is the default directory structure of a domain in WebLogic? For example, a simple helloworld. under the directory where JSP is put, you can enter http: // host: Port Number // helloword in the browser. can JSP view the running result? Another example is how to use a self-written JavaBean?
Domain Directory Server Directory applications, where the application directory can be accessed as an application. If it is a Web application, the application directory must meet the web application directory requirements, JSP files can be directly placed in the application directory, JavaBean needs to be placed in the application directory of the WEB-INF directory of the classes directory, set the Server default application will be able to achieve in the browser without entering the application name.
6. How do I view the published ejbs in WebLogic?
You can use the console to view all published ejbs in its deployment.
7. How to perform SSL configuration and client authentication configuration in WebLogic or discuss how to configure SSL in J2EE (standard)
Demoidentity is used in the default installation. jks and demotrust. to implement SSL in jks keystore, You need to configure the server to use Enable SSL and configure its port. In product mode, you need to obtain the private key and digital certificate from the CA, and create the identity and trust keystore, load the obtained key and digital certificate. You can configure whether the SSL connection is unidirectional or bidirectional.
8. configuration files required for deploying EJB in WebLogic
Different types of EJB involve different configuration files, all involve configuration files including ejb-jar.xml, weblogic-ejb-jar.xmlCMP entity beans generally also need weblogic-cmp-rdbms-jar.xml
9. Does EJB need to directly implement its business interface or home interface? Give a brief description of the reasons.
The remote interface and home interface do not need to be implemented directly. Their implementation code is generated by the server. The corresponding implementation class in the program running will be used as an instance of the corresponding interface type.
10. Differences between persistent and non-persisten when sending a message Bean in WebLogic
The persistent MDB ensures the reliability of message transmission, that is, if an error occurs in the EJB container and the JMS server still sends the message when the MDB is available, non-persistent messages are discarded.
11. Are you familiar with or have heard of several common J2EE models? And some opinions on the Design Model
Session Facade Pattern: Use sessionbean to access entitybean
Message Facade Pattern: asynchronous call
EJB Command pattern: replace sessionbean with command JavaBeans for Lightweight Access
Data transfer object Factory: Using DTO factory to simplify entitybean data provision features
Generic attribute access: the attibuteaccess interface simplifies entitybean data provision features
Business interface: Use Remote (local) interfaces and bean classes to implement the same interface and standardize business logic consistency
The design of the EJB architecture directly affects the system performance, scalability, maintainability, component reusability, and development efficiency. The more complex the project, the larger the project team, the more important the good design is.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.