Java face Test (5) __java

Source: Internet
Author: User
Tags ssl connection

72, EJB roles and three objects
A complete EJB based distributed computing structure consists of six roles, which can be provided by different developers, and each role must follow the EJB specification provided by Sun to ensure compatibility with each other. These six roles are EJB component developers (Enterprise Bean Provider), application group (application assembler), Deployer (deployer), EJB server provider (EJB Serverprovider), EJB container provider (EJB Container Provider), system administrator
The three objects are the remote (local) interface, the Home (Localhome) interface, and the Bean class

73. The services provided by the EJB container
It mainly provides services such as declaration cycle management, code generation, continuous management, security, transaction management, lock and release management.

74. The EJB specification stipulates which operations are prohibited in the EJB.
1. Cannot manipulate thread and thread APIs (thread APIs refer to methods such as notify,wait, etc.) that are not thread objects.
2. Cannot operate AWT,
3. Can not implement the server function,
4. Cannot access static properties,
5. Can not use IO Operation direct Access file system,
6. The local library cannot be loaded.
7. You cannot use this as a variable and return,
8. Cannot loop call.

75, remote interface and home interface main role
The remote interface defines a business method that is used by the EJB client to invoke the business method.
The home interface is the EJB factory used to create and remove lookup EJB instances

76, the life cycle of the bean instance
Buffer pool management generally exists for stateless session beans, Entity beans, message Drivenbean, and cache management for Entity beans and statefull sessionbean. Typically includes creating instances, setting contexts, creating ejbobject (Create), business method invocation, remove, and so on, for the bean with buffer pool management, the instance is not purged from memory after the create, but the buffer pool scheduling mechanism is used to reuse the instance. For a bean with cache management, it maintains the state of the bean and restricts the number of instances in memory by activating and activating the mechanism.

77, the activation mechanism of EJB
Take the stateful session bean as an example: its cache size determines the number of bean instances that can exist in memory at the same time, depending on the MRU or NRU algorithm, the instance moves between activating and activating states, and the activation mechanism is when a client invokes an EJB instance business method. If the corresponding Ejbobject discovers that it does not have a corresponding bean instance, it activates the instance by activating it from the Bean store (through the serialization mechanism store instance). The corresponding ejbactive and Ejbpassivate methods are invoked before the state changes.

78. Several types of EJB
Sessions (session) bean, Entity (Entity) bean message-driven (driven) bean
Session beans can also be divided into stateful (Stateful) and stateless (stateless)
Entity beans can be divided into bean-managed persistence (BMP) and container-managed persistence (CMP)

79. Several basic steps of calling EJB object by Customer service end
Set the Jndi service factory and the Jndi service address system Properties, look for the home interface, call the Create method from the home interface to create the remote interface, and invoke its business method through the remote interface.

80, how to give WebLogic the specified size of memory?
In the script that initiates WebLogic (Startservername in the corresponding server directory of the Domian), add set mem_args=-xms32m-xmx200m, you can adjust the minimum memory to 32M, Max 200M
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 admin console for one of the development or product models. or modify the service's startup file or commenv file to add set Production_mode=true.

82, how to start without entering a username and password?
Modify service startup files to add Wls_user and WLS_PW entries. You can also add encrypted user names and passwords to the Boot.properties file.

83, in the WebLogic management platform for an application domain (or a Web site, domain) for JMS and the EJB or connection pool and other related information configuration, the actual save in what file?
stored in the Config.xml file in this domain, it is the core configuration file for the server.

84, talk about a domain in the WebLogic default directory structure? For example, to put a simple helloworld.jsp into what directory, but the browser can be into the http://host: port number//helloword.jsp can see the results of the operation? And for example, what do you do with a javabean that you write?
Domain Directory server directory applications, the application directory will be placed in this directory can be used 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 without entering the application name on the browser.

85. Which configuration files should be involved in publishing EJB in WebLogic
Different types of EJBS involve different configuration files, and the configuration files involved include ejb-jar.xml,weblogic-ejb-jar.xmlcmp entity beans that typically require weblogic-cmp-rdbms-jar.xml

86, how to WebLogic in the SSL configuration and client authentication configuration or say Java (standard) for SSL configuration
Using Demoidentity.jks and Demotrust.jks KeyStore to implement SSL in the default installation, you need to configure the server to use ENABLESSL, configure its ports, and obtain private keys and digital certificates from the CA in product mode. Create identity and Trustkeystore, and mount the obtained keys and digital certificates. You can configure whether this SSL connection is one-way or bidirectional.

87. How do I see the EJB that has been published in WebLogic?
You can use the Admin console to view all published EJBS in its deployment

88. What is CORBA and what is the purpose?
The CORBA standard is the common object request broker structure (Common object requests broker architecture), which is standardized by the object Management Organization (objects Management Group, abbreviated as OMG). It is composed of interface Definition language (IDL), language binding (binding: Also translated as a binder), and protocols that allow interoperability between applications. The purpose is: to write in different programming languages in different processes run, for different operating systems development.

89. What are some of the common patterns in Java EE that you know or have heard about? and some ideas about design pattern
Session façade pattern: using Sessionbean to access Entitybean
Message façade pattern: implementing an Asynchronous call
EJB command pattern: Use command JavaBeans instead of Sessionbean for lightweight access
Data Transfer Object Factory: Simplifies Entitybean with DTO Factory features
Generic Access: Simplifies Entitybean data-delivery features via the Attibuteaccess interface
Business Interface: Achieve same interface Specification business logic consistency through remote (local) interface and Bean class
The design of EJB architecture will directly affect the system performance, scalability, maintainability, component reusability and development efficiency. The more complex the project, the greater the project team will be to reflect the importance of good design.

90, talk about the difference between persistent and non-persisten when developing a message bean in WebLogic
Persistent MDB can guarantee the reliability of message delivery, that is, if the EJB container is problematic and the JMS server still sends the message to the MDB when it is available, the non-persistent message is discarded.

91. When the servlet executes, which methods are generally implemented.
public void init (servletconfig config)
Public ServletConfig Getservletconfig ()
Public String Getservletinfo ()
public void Service (ServletRequest request,servletresponse response)
public void Destroy ()

92, Java-ee commonly used design patterns. Describes the factory model.
23 Types of Design Patterns in Java:
Factory (Factory model), Builder (construction mode), Factory method (Factory mode),
Prototype (original model mode), Singleton (single case mode), façade (façade mode),
Adapter (adapter mode), bridge (bridging mode), composite (synthetic mode),
Decorator (decoration mode), Flyweight (mode of privilege), Proxy (agent mode),
Commands (Command mode), interpreter (interpreter mode), Visitor (accessor mode),
Iterator (iterative sub-mode), Mediator (mediator mode), Memento (Memo mode),
OBSERVER (Observer mode), State (status mode), strategy (policy mode),
Template method (template approach mode), Chain of responsibleity (responsibility chain mode)
Factory mode: The factory pattern is a pattern that is often used, a class implemented according to the factory pattern can generate an instance of a class in a group of classes based on the data provided, usually with a common abstract parent class and implementing the same method, but these methods operate differently for different data. You first need to define a base class that implements the methods in the base class in different ways. Then you need to define a factory class where the factory class can generate different instances of subclasses based on conditions. When an instance of a subclass is obtained, the developer can call the 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 brief reasons.
The remote interface and the 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 is used as an instance of the corresponding interface type.

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.