81, how to set the WebLogic hot start Mode (development mode) and product release mode?
You can modify the startup mode of the corresponding server in the administration console to one of the development or product models. or modify the service's startup file or commenv file to add Setproduction_mode=true.
82, how to start without the need to enter the user name and password?
Modify the service startup file to add Wls_user and WLS_PW entries. You can also add an encrypted user name and password to the Boot.properties file.
83, in the WebLogic management system in the application domain (or a website, domain) for JMS and EJB or connection pool and other related information to configure, the actual file saved in?
Saved in this domain's config. s file, it is the server's core configuration file.
84. What is the default directory structure of a domain in WebLogic? For example, to put a simple helloworld.jsp into what directory, and then in the browser can be scored http://Host, port number//helloword.jsp can see the results of the operation? Another example of this is the use of a self-written javabean what should be done?
Domain Directory server directory applications, put the application directory in this directory will be available as an application access, if it is a Web application, the application directory needs to meet the requirements of the Web application directory, JSP files can be placed directly in the application directory, JavaBean need to be placed in the classes directory of the Web-inf directory of the application directory, setting the server's default application will be implemented in the browser without the need to enter the application name.
85. What configuration files should be involved in the release of EJB in WebLogic
The configuration files involved in different types of EJBS involve different profiles, including ejb-jar.xml,weblogic-ejb-jar.xmlcmp entity beans, which generally also require weblogic-cmp-rdbms-jar.xml
86, how to do SSL configuration in WebLogic with the client authentication configuration or to say that the Java (standard) SSL configuration
Using Demoidentity.jks and Demotrust.jks KeyStore to implement SSL in the default installation requires configuring the server to use ENABLESSL, configuring its ports, and obtaining private keys and digital certificates from the CA in product mode. Create identity and trust KeyStore, and load the acquired keys and digital certificates. You can configure whether this SSL connection is unidirectional or bidirectional.
87. How do I view the EJB that has been published in WebLogic?
You can use the administration console to view all of the published EJBS in its deployment
88. What is CORBA? What is the purpose?
The CORBA standard is the public object request broker structure (Commonobject request broker Architecture), which is standardized by the Object Management organization (the Objects Management Group, abbreviated as OMG). It consists of an interface definition language (IDL), a language binding (binding: Also translated as a binder), and a protocol that allows interoperability between applications. Its purpose is: to write in different programming languages to run in different processes, for different operating systems development.
89. Tell me about some of the common patterns in the Java EE you are familiar with or heard of. And some views on design patterns
Session facade Pattern: accessing Entitybean with Sessionbean
Message facade Pattern: Implementing an Asynchronous call
EJB Command Pattern: Use Commandjavabeans instead of Sessionbean for lightweight access
Data Transfer Object Factory: Provides features through dtofactory simplifying Entitybean data
Generic Attribute Access: simplifies Entitybean data delivery with Attibuteaccess interface
Business Interface: Implementing the same interface specification through the remote (local) interface and the Bean class.
The design and quality of EJB architecture will directly affect the performance, expansibility, maintainability, reusability and development efficiency of the system. The more complex the project, the larger the project team is, the greater the importance of good design.
90. Talk about the difference between persistent and non-persisten when developing message beans in WebLogic
The persistent way of MDB guarantees the reliability of the message delivery, that is, if there is a problem with the EJB container and the JMS server will still send the message when this MDB is available, and the non-persistent message will be discarded.
91. What are the general implementations of the servlet implementation?
public void init (servletconfig config)
Public ServletConfig Getservletconfig ()
Public String Getservletinfo ()
public void Service (ServletRequest request,servletresponse response)
public void Destroy ()
92, the common design pattern of the Java EE? Describes the Factory mode.
23 Design Patterns in Java:
Factory (Factory mode), builder (build mode), Factory method (factory approach mode),
Prototype (original model mode), Singleton (singleton mode), facade (façade mode),
Adapter (adapter mode), Bridge (bridge mode), Composite (synthetic mode),
Decorator (decorative mode), Flyweight (enjoy meta mode), proxy (proxy mode),
Command (order mode), interpreter (interpreter mode), Visitor (visitor mode),
Iterator (iterative sub-mode), Mediator (mediator mode), Memento (Memo mode),
Observer (Viewer mode), State (status mode), strategy (policy mode),
Template method (pattern mode), Chain of responsibleity (responsibility chain mode)
Factory mode: Factory mode is a frequently used pattern, and classes implemented according to the factory pattern can generate an instance of a class in a set of classes based on the data provided, usually this group of classes have a common abstract parent class and implement the same method, but these methods have different operations for different data. First, you need to define a base class in which subclasses implement methods in the base class in different ways. Then you need to define a factory class where the factory class can generate different subclass instances based on the criteria. When an instance of a subclass is obtained, the developer can call a method in the base class without having to consider which instance of the subclass is returned.
93, 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 run as an instance of the corresponding interface type is used.
94. What are the various methods of sorting? Please list. Implement a quick sort with java.
Sorting methods are: Insert sort (direct insert sort, hill sort), swap sort (bubble sort, quick sort), select sort (direct selection sort, heap sort), merge sort, assign sort (box sort, base sort)
The pseudo-code for quick sorting.
//Use Quick Sort method to sort a[0:n-1]
Select an element from a[0:n-1] as the Mi d d l E, the element is the Fulcrum
Divide the remaining elements into two segments left and Ri G H t so that the elements in Le F t are equal to the fulcrum and the elements in right are greater than or equal to the fulcrum
Recursively sort left by using the Quick Sort method
Recursively sort right by using the Quick Sort method
The resulting result is le F t + m i d d l e + r i g h t
95. Please explain (or simply describe) the following nouns commonly used in the Java EE
Web container: Provides an environment for the application component (Jsp,servlet) in which Jsp,servlet directly interacts with the environment variable interfaces in the container, without concern for other system problems. There are mainly Web servers to implement. For example: Tomcat,weblogic,websphere and so on. The interface provided by this container strictly complies with the Web application standard in the Java EE specification. Our web server, which adheres to the above criteria, is called the Web container in Java EE.
EJB container: Enterprisejava bean container. It has the industry domain characteristic more. He provides various management functions for the EJB component that runs in it. As long as the EJB that satisfies the Java EE specification is placed in the container, it is immediately managed efficiently by the container. and the system-level services can be obtained through the existing interfaces. For example, mail service, transaction management.
JNDI: (javanaming & directory Interface) Java named directory service. The main functionality is to provide a directory system that allows applications from other parts of the world to leave their index on top of them, thus satisfying the ability to quickly find and locate distributed applications.
JMS: (javamessage service) Java Messaging Service. The main implementation of communication between the various applications. Includes point-to-point and broadcast.
JTA: (javatransaction API) Java Transaction service. Provides a variety of distributed transaction services. The application simply invokes the interface it provides.
JAF: (javaaction framework) Java Security Certification framework. Provide some framework for security control. Let developers implement their own personality security control strategies through a variety of deployments and customizations.
RMI/IIOP: (Remotemethod invocation/internet Object Request Mediation Protocol) they are primarily used to invoke services remotely. For example, a program that runs on a remote computer provides stock Analysis Services that we can invoke directly on the local computer. Of course, it is necessary to pass a certain specification in order to communicate between heterogeneous systems. RMI is unique to Java.
96, the Java language How to handle exception, keyword: throws,throw,try,catch,finally what is the meaning of each? Can I throw an exception in a try block?
Java uses an object-oriented approach to exception handling, classifies various exceptions, and provides a good interface. In Java, each exception is an object, which is an instance of the Throwable class or other subclass. When an exception is thrown, a method throws an exception object that contains the exception information, and the method that invokes the object can catch the exception and handle it. Java exception handling is achieved through 5 keywords: try, catch, throw, throws, and finally. In general, a try to execute a program, if an exception occurs, the system will throw (throws) an exception, when you can catch it by its type (catch), or finally (finally) by the default processor to handle.
Use try to specify a piece of program that prevents all "exceptions". Immediately following the try program, you should include a catch clause to specify the type of "exception" you want to catch.
The throw statement is used to explicitly throw an "exception".
Throws is used to indicate the various "exceptions" that a member function might throw.
Finally, a piece of code is executed to ensure that a piece of code occurs regardless of the "exception".
You can write a try statement outside of a member function call and write another try statement inside this member function to protect the other code. Whenever a try statement is encountered, the "exception" frame is placed on the stack until all the try statements are completed. If the next-level try statement does not handle an "exception", the stack expands until it encounters a try statement that handles this "exception."
97. Can I include more than one class (not an inner class) in a ". Java" source file? What are the restrictions?
OK. Only one class name must be the same as the file name.
98. How do the various parts of MVC have the technology to implement?
MVC is shorthand for Model-view-controller. "Model" represents the business logic of the application (implemented through the JAVABEAN,EJB component), "View" is the presentation face of the application (generated by the JSP page), and "Controller" is the process control that provides the application (typically a servlet), Through this design model, the application logic, processing and display logic are divided into different component implementations. These components can be interacted with and reused.
99. There are several ways to implement a thread in Java? What keyword modifies the synchronization method? How are the Stop () and suspend () methods not recommended?
There are two implementation methods, namely, inheriting the thread class and implementing the Runnable interface.
Using the Synchronized keyword to modify the synchronization method
Against the use of Stop () is because it is unsafe. It unlocks all locks acquired by the thread, and if the object is in an incoherent state, then other threads can examine and modify them in that state. The result is hard to check out the real problem. The suspend () method is prone to deadlocks. When calling suspend (), the target line routines stops, but still holds the lock that was acquired before. At this point, no other thread can access the locked resource unless the thread that is "suspended" resumes running. For any thread, if they want to restore the target thread while trying to use any of the locked resources, it will cause a deadlock. So instead of using suspend (), you should place a flag in your own thread class that indicates whether the thread should be active or suspended. If the flag indicates that the thread should hang, use wait () to enter the wait state. If the flag indicates that the thread should be resumed, restart the thread with a notify ().
100. Are there several types of streams in Java? The JDK provides some abstract classes for inheritance for each type of stream, tell me what classes they are.
Byte stream, character stream. The byte stream inherits from the Inputstreamoutputstream, and the character stream inherits from the Inputstreamreaderoutputstreamwriter. There are many other streams in the java.io package, mainly to improve performance and ease of use.
101. There is a memory leak in Java, please describe it briefly.
Yes. such as: Inti,i2; return (I-I2); When I is a positive number large enough, the i2 is a large enough negative number. The result is an overflow that causes an error.
102. What is the mechanism for polymorphism in Java?
The overridden overriding and overloaded overloading of a method are different manifestations of Java polymorphism. Overriding overriding is a representation of polymorphism between a parent class and a subclass, and overloading overloading is a representation of polymorphism in a class.
103. What is the basic principle of the garbage collector? Can the garbage collector reclaim memory right away? Is there any way to proactively notify a virtual machine for garbage collection?
For GC, when a programmer creates an object, the GC starts to monitor the object's address, size, and usage. Typically, a GC uses a graph to record and manage all objects in the heap. In this way, you determine which objects are "accessible" and which objects are "unreachable." When the GC determines that some objects are unreachable, it is the responsibility of the GC to reclaim those memory spaces. OK. The programmer can manually execute System.GC () to notify the GC to run, but the Java language specification does not guarantee that the GC will execute.
104. What is the difference between a static variable and an instance variable?
static i = 10; Constant
Class A; A.I =10;//Variable
105. What is Java serialization and how do I implement Java serialization?
Serialization is a mechanism for dealing with the flow of objects, so-called object flow is the flow of the object's contents. It is possible to read and write to a Fluidized object, or to transfer the streamed object between the networks. Serialization is a problem that is raised when reading and writing to an object stream.
Serialization implementation: Implement the Serializable interface for the class that needs to be serialized, there is no method to implement, implementsserializable just to annotate that the object is serializable, and then use an output stream ( such as: FileOutputStream) to construct a ObjectOutputStream (object flow) object, followed by the WriteObject (objectobj) of the ObjectOutputStream object method to write out (that is, save its state) the object with the parameter obj, and the input stream to restore.
106. Is it possible to make a call to a non-static method from within a static method?
No, if it contains the object's method (), the object cannot be guaranteed to initialize.
107, when writing the Clone () method, usually have a line of code, what is it?
Clone has a default behavior, Super.clone (); He is responsible for generating the correct size of space and copying it bit by digit.
108. How do I jump out of the current multiple nested loops in Java?
Use the Break;return method.
109, List, MAP, set three interfaces, access to elements, what are the characteristics of each?
Lists hold elements in a particular order, and can have repeating elements. Set cannot have duplicate elements, internal ordering. Map holds the Key-value value, and value can be multivalued.
110, what is the Java EE?
The Java EE is a multi-tier (multi-diered), distributed (distributed), component-based (component-base) enterprise Application Model (Enterprieseapplication model) presented by Sun. In such an application system, it can be divided into different components by function, which can be on different computers and at the corresponding level (tier). The hierarchy includes the customer layer (clietntier) components, the Web tier and components, the business layer and components, and the Enterprise Information System (EIS) layer.
111, the UML aspect
Standard modeling Language UML. Use case diagrams, static diagrams (including class diagrams, object graphs, and package plots), behavior diagrams, Interaction diagrams (sequence diagrams, collaboration diagrams), implementation diagrams.
112, say some of the commonly used classes, packages, interfaces, please give 5
Common classes: Bufferedreaderbufferedwriter filereader filewirter String Integer
Commonly used packages: JAVA.LANGJAVA.AWT java.io java.util java.sql
Common interfaces: remotelist Map Document NodeList
113. What are the design patterns used in the development?
Each pattern describes a problem that continues to arise in our environment and then describes the core of the solution to the problem. In this way, you can use the existing solutions countless times without having to repeat the same work. The main use of the MVC design pattern. Used to develop jsp/servlet or EE-related applications. Simple Factory mode and so on.
114. What are the actions of JSP?
JSP has the following 6 basic actions jsp:include: Introduce a file when the page is requested. Jsp:usebean: Find or instantiate a JavaBean. Jsp:setproperty: Sets the properties of the JavaBean. Jsp:getproperty: Outputs the properties of a JavaBean. Jsp:forward: Move the request to a new page. Jsp:plugin: Generates an object or embed tag for the Java plug-in based on the browser type.
115, Anonymousinner Class (anonymous inner Class) can extends (inherit) other classes, whether you can implements (implement) interface (interface)?
You can inherit other classes or complete other interfaces, which are common in swing programming.
116. What is the difference between application server and webserver?
Application server: Weblogic, Tomcat, Jboss
WEB Server:iis, Apache
117, the relationship between BS and CS and the difference.
C/S is the abbreviation of Client/server. Servers typically employ high-performance PCs, workstations, or minicomputer, and employ large database systems such as Oracle, Sybase, Informix, or SQL Server. The client needs to install the dedicated client software.
b/S is an abbreviation for Brower/server, as long as a browser (Browser) is installed on the client, such as Netscape Navigator or Internet Explorer, the server installs Oracle, Sybase, Informix, or Databases such as SQL Server. In this structure, the user interface is implemented entirely through the WWW browser, and some transaction logic is implemented at the front end, but the main transaction logic is implemented on the server side. The browser interacts with the database through webserver data.
c/S and b/s difference:
1. Different hardware environments:
c/S is generally established in a dedicated network, a small range of network environment, LAN and then through a dedicated server to provide connectivity and data exchange services.
b/S is built on the WAN, need not be specialized network hardware environment, example with telephone Internet, renting equipment. Information is managed by itself. Have more than C/s to adapt to the range, generally as long as there are operating systems and browsers on the line
2. Different for security requirements
c/S is generally oriented to a relatively fixed user group, the ability to control information security is very strong. Generally highly confidential information system using C/s structure is suitable. Can be published through the B/s part of the public information.
b/S is built on the wide area network, the security control ability is relatively weak, may target the unknown user.
3. Different from the program architecture
c/S program can pay more attention to the process, the authority can be multi-level check, the system running speed can be less considered.
b/S multiple considerations for security and access speed are based on the need for more optimization. More than C/s has higher requirements B/s structure of the program architecture is the trend of development, from the MS. NET series of BizTalk 2000Exchange 2000, etc., fully support the network of component building system. SUN and IBM push the JavaBean component technology, so that b/s more mature.
4. Software reuse is different
c/S program can inevitably be considered as a whole, the reuse of components is not as good as the reuse of components under B/s requirements.
The multi-structure of B/s pair requires the relative independent function of the component. Can be reused relatively well. You can reuse the table you bought, not the stone table on the wall.
5. system maintenance is different
Due to the integrity of the C/s program, it is necessary to investigate the problem and upgrade the system. Upgrade is difficult. Could be a whole new system.
b/S components, components of individual replacement, to achieve seamless upgrade of the system. Minimal system maintenance overhead. Users can download and install themselves from the Internet to achieve upgrades.
6. Handling problems differently
c/S program can handle the user face fixed, and in the same area, security requirements of high demand, operating system-related. Should all be the same system.
b/S is built on the wide area network, facing different user groups, dispersed area, this is the C/s can not be made. Minimal relationship to operating system platform.
7. User interface is different
C/S is established window platform, the performance method is limited, the programmer generally requires higher
b/S is built on the browser, there is more rich and vivid expression way to communicate with users. And most of the difficulty is reduced, reducing development costs.
8. Different information flow
c/S program is typically a centralized mechanical processing, the interaction is relatively low
b/S information flow can change, b-b b-c b-g and other information, flow changes, more like the trading center.
118, Linux thread, GDI class explanation.
Linux implements a "one-to-one" threading model based on the core lightweight process, where a thread entity corresponds to a core lightweight process, and the management of threads is implemented in the kernel external function library.
GDI classes program Interface class libraries for image devices.
119. Struts applications (e.g. struts architecture)
Struts is an open-source framework that uses Javaservlet/javaserver pages technology to develop Web applications. Using struts can develop an application architecture based on the MVC (Model-view-controller) design pattern. Struts has the following main functions: one. Contains a controller servlet that can send a user's request to the appropriate action object. Two. JSP free tag library, and provide associated support in the controller servlet to help developers create interactive form applications. Three. A series of practical objects are provided: XML processing, Automatic processing of JavaBeans properties via Java Reflectionapis, and internationalized hints and messages.
120. What is JDO?
JDO is a new specification for Java object Persistence, a short name for Javadata object, and a standardized API for accessing objects in some kind of data warehouse. JDO provides transparent object storage, so for developers, storing data objects does not require additional code (such as the use of JDBCAPI). These tedious routines have shifted to the JDO product provider, freeing developers to focus time and energy on business logic. In addition, the JDO is flexible because it can run on any data underlying. JDBC is a more generic, relational database (RDBMS) JDO that provides storage capabilities to any underlying data, such as relational databases, files, XML, and Object Databases (Odbms), and so on, making application portability even stronger.
121. Can the inner class refer to the members of his containing class? Are there any restrictions?
An inner class object can access the contents of the external class object that created it
122, WebService noun explanation. Introduction to the JSWDL Development kit. Explanation of JAXP and JAXM. SOAP, uddi,wsdl interpretation.
Web Serviceweb Service is a network-based, distributed, modular component that performs specific tasks and complies with specific specifications that enable WebService to interoperate with other compatible components.
JAXP (Java API for XML parsing) defines a common interface for using DOM, SAX, and XSLT in Java. So in your program you just use these generic interfaces, and you don't need to modify the code when you need to change the specific implementation.
JAXM (Java API for XML Messaging) is an API that provides access methods and transport mechanisms for soap communication.
WSDL is an XML format used to describe a network service as a set of endpoints that operate on messages that contain document-oriented information or process-oriented information. This format first abstracts operations and messages, and then binds them to specific network protocols and message formats to define endpoints. The associated specific endpoints are combined into abstract endpoints (services).
Soap is a Simple Object Access Protocol (Simpleobject access Protocol), which is a lightweight protocol for exchanging XML encoded information.
The purpose of UDDI is to establish standards for e-commerce; UDDI is a web-based, distributed, webservice-provided, information Registry Implementation Standard specification that also includes a set of webservice registrations that enable enterprises to provide themselves. To enable other enterprises to discover the implementation criteria for the Access Protocol.
Java Surface Examination Questions Daquan (iii)