JAVA basics-full explanation of Java BASICS (5)

Source: Internet
Author: User
Tags ssl connection

81. 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.


82. 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.


83. 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.


84. 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.


85. 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


86. 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.


87. How do I view the published ejbs in weblogic?
You can use the console to view all published ejbs in its Deployment.


88. What is CORBA? What is the purpose?
The Common Object Request Broker Architecture is a Common Object Request Broker Architecture, which is standardized by Object Management Group (OMG. It is composed of an Interface Definition Language (IDL), a language binding (binding: also translated as associated encoding), and a protocol that allows interoperation between applications. The objective is to use different programming languages to run in different processes and develop different operating systems.


89. How many common j2ee modes do you know or have heard? 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 design is.


90. 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.


91. Which of the following methods are generally implemented during Servlet execution?
Public void init (ServletConfig config)
Public ServletConfig getServletConfig ()
Public String getServletInfo ()
Public void service (ServletRequest request, ServletResponse response)
Public void destroy ()


92. Common j2ee design patterns? Describe the factory model.
23 Design Patterns in Java:
Factory (Factory mode), Builder (construction mode), Factory Method (Factory Method mode ),
Prototype (original model mode), Singleton (Singleton mode), Facade (Facade mode ),
Adapter (Adapter mode), Bridge (Bridge Mode), Composite (merging mode ),
Decorator, Flyweight, Proxy ),
Command (Command mode), Interpreter (Interpreter mode), Visitor (Visitor mode ),
Iterator, Mediator, Memento ),
Observer (Observer mode), State (State mode), Strategy (Policy mode ),
Template Method (Template Method mode), Chain Of Responsibleity (responsibility Chain mode)
Factory mode: The factory mode is a frequently used mode. Classes implemented based on the factory mode can generate instances of a class in a group based on the provided data, generally, this group of classes has a common abstract parent class that implements the same method, but these methods perform different operations on different data. First, you need to define a base class. The subclass of this class implements the methods in the base class through different methods. Define a factory class. The factory class can generate different subclass instances according to the conditions. After obtaining the subclass instance, developers can call the methods in the base class without having to consider which subclass instance is returned.


93. Does EJB need to directly implement its business interface or Home interface? Please briefly describe 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.


94. What are the methods for sorting? List. Use JAVA to implement a fast sorting.
The sorting methods include insert sorting (direct insertion sorting and Hill sorting), exchange sorting (Bubble sorting and quick sorting), select sorting (Direct selection sorting and heap sorting), and merge sorting, sort allocation (Box sorting and base sorting)
Pseudo code for fast sorting.
// Use the quick sorting method to sort a [0: n-1]
Select an element from a [0: n-1] As m I d l e, which is the fulcrum
Divide the remaining elements into two left and r I g h t, so that the elements in l e f t are less than or equal to the fulcrum, and the elements in right are greater than or equal to the Fulcrum.
Recursively sort left by using the quick sorting method
Recursively sort right using the quick sorting method
The result is l e f t + m I d l e + r I g h t.


95. Please explain (or briefly describe) the terms commonly used in J2EE below)
Web Container: provides an environment for the application components (JSP and SERVLET) in the container, so that JSP and SERVLET can directly interact with the environment variable interfaces in the container, so that you do not have to pay attention to other system problems. It is mainly implemented by WEB servers. For example, TOMCAT, WEBLOGIC, and WEBSPHERE. The interface provided by the container strictly complies with the web application standard in J2EE specifications. We call the WEB server that complies with the above standards the WEB Container in J2EE.
EJB container: Enterprise java bean container. More industry-specific characteristics. It provides various management functions for the component EJB running in it. As long as the EJB meeting the J2EE specification is put into the container, it will be managed efficiently by the container immediately. In addition, system-level services can be obtained through ready-made interfaces. For example, mail service and transaction management.
JNDI :( Java Naming & Directory Interface) JAVA Naming Directory service. The main function is to provide a directory system that allows applications from other places to leave their own indexes on it to quickly find and locate distributed applications.
JMS :( Java Message Service) JAVA Message Service. Communication between applications. Including point-to-point and broadcast.
JTA :( Java Transaction API) JAVA Transaction service. Provides various distributed transaction services. An application only needs to call the interfaces it provides.
JAF :( Java Action FrameWork) JAVA security authentication FrameWork. Provides some security control frameworks. Developers can implement their own personalized security control policies through various deployment and customization.
RMI/IIOP :( Remote Method Invocation/internet object request mediation protocol) They are mainly used to call services remotely. For example, if a program runs on a remote computer that provides the Stock Analysis Service, we can directly call it on a local computer. Of course, this requires certain specifications to communicate between heterogeneous systems. RMI is unique to JAVA.


96. How to handle exceptions in JAVA? What are the meanings of keywords: throws, throw, try, catch, and finally? Can I throw an exception in the try block?
Java uses object-oriented methods to handle exceptions, classify various exceptions, and provides good interfaces. In Java, each exception is an object, which is an instance of the Throwable class or other subclass. When one party

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.