J2EE Configuration Guide (3)

zhaozj2021-02-17  33

J2EE Configuration Guide (3)

10. Safety unauthorized users For J2EE, when there is an unauthorized user attempt to call EJB Container, J2EE must have the unauthorized unauthorized user existence. In J2EE, this user name is GUEST, the password is GUEST123. You can modify your username and password in the Auth.Properties file. DEFAULT.PRINCIPAL.NAME = guest default.principal.password = guest123 keystore Password If the user uses the public key to access HTTPS, the authentication information is placed in the /.keyStore file. At the same time, User-Home is the return value of System.getProperty ("user.home"). KeyStore is a typical password file. The default password is Changeit. You can modify the value of the keystore.password property in the web.properties file to change your password. Anyone Role In the Security panel of the Application Deployment Tool, the method is assigned to the Anyone role by default. This result is that all users and groups can call it. If you don't shoot a specific role, each user and user can call it. You can change the value of anyone.role.name in the Auth.Properties file to change the default Anyone role. Conditions of passivation: Memory restriction When the EJB Container starts passivating an EJB, it saves EJB in the affiliate storage and attempts to reassign the memory. By default, if the memory uses more than 128M, passivation begins. You can edit the value of the passivation.threshold.memory property in the config / default.properties file to modify the default. Passivation.threshold.Memory = 128000000 Value must be a positive integer. When you reduce this value, passivation is often happening. JNDI Name Server Host If JNDI Name Server and J2EE Server are not on the same machine, you must change the value of the Host property in the config / orb.properties file. Host = localhost HTTP Document The root is default, the documentation for HTTP and HTTPS services is public_html. You can edit the value of the DocumentRoot property in the web.properties file to change it. DocumentRoot = public_html / javatm 2 SDK, Enterprise Edition introduction 1. Precautions If you first use Javatm 2 SDK, Enterprise Edition (J2EE SDK), you should follow the steps below: (1) Confirm that you have installed Javatm 2 SDK, Enterprise Edition (J2EE SDK). (2) Configure your Javatm 2 SDK, Enterprise Edition (J2EE SDK) software. (3) Read the "Start J2EE" document and start building an annual EJB. 2. Supported platform SolaristM Operating Environment, Version 2.6 Windows NT, Version 4.0 3. Supported database and JDBC driver This version supports the JDBC API's 1.0 and 2.0 versions of the database drive.

We have made good tests on the following database: Oracle8 Server, Version 8.05Microsoft SQL Server, Versions 6.5, 7.0Cloudscape, Version 3.0 More JDBC information, see the JDBC Data Access API web page ("http: // www .java.sun.com / products / jdbc / index.html). Watch the driver provider list, please see http://www.java.sun.com/products/jdbc/jdbc.driver.html. When you are installed After that, you have to configure the JDBC driver in the Configuration Guide. If you use the Cloudscape database, you don't need to configure it because it has been included in this release. 4. The contents of this version include : Services: EJB HTTP HTTP OVER SSL COS NAMING Authentication Tools: Application Deployment Tool A Package J2EE Components and Publishing Applications Tools. Realm Tool Management J2EE Server User. Verifier This tool is verified. Packager Package J2EE Components. Cleanup script deletes all published J2EE applications. Cloudscape Database This version includes a relational database written in Java language - Cloudscape 3.0. Although this document is tested with Cloudscape, you can use any this version supports database. the enterprise java apisEnterprise JavaBeans API, version 1.1Java Servlets, version 2.2JavaServer Pages technology, version 1.1JDBC Standard Extension, version 2.0Java Naming and Directory InterfaceTM API, version 1.2 (CosNaming SPI) RMI / IIOPJava Transaction API, Version 1.0Javamail API, Version 1. 1Java Messaging Service, Version 1.0 (API ONLY, NO IMPLEMENT) 5. The software you need. First, you need to install JDK 1.2. The Javatm 2 SDK, Standard Edition provides the ability to run and establish J2EE applications. If your client is on another machine, JDK1.2 must also be installed on the Client. Can support J2EE JDK1.2 as follows: http://www.java.sun.com/products/jdk/1.2/download-solaris.htm http://www.sun.com/solaris/java http: // www .java.sun.com / Products / JDK / 1.2 / Download-Windows.html Other version of JDK1.2 has not been tested and J2EE is not supported. Note: The RMI-IIOP Standard Extension cannot be installed in JDK1.2. 6. Current defects. The purpose of this version is to introduce you to J2EE technology, give you a chance to feed back to us so that we will make better. There are several defects in this release.

1.Container-Managed Persistence implements the Entity Beans based on Container-Managed Persistence not fully implements the characteristics of all objects to the relational database. The Entity Bean class can only be missed to a database in a database. A Container-Managed Field can only be missed into a table in a table. When the container is loaded with Container-Managed Fields, it returns to all Container-Managed Fields. When the loaded data is very large, performance is affected. Because some data is not required for business methods. If multiple Entity Beans's Container-Managed Fields is misread to the same data in the database, and if these Beans are referenced in the same transaction, they may have an impact on the consistency of the data. In ejbcreate, ejbremove, ejbload, the Beans with SQL statements, when using deploytool distribute them, you can only modify the names of the tables and fields, and cannot modify the number of parameters incorporated and their order. The stored procedure cannot be called in the SQL statement. In the CREATE TABLE statement, you can change the SQL type of the field of the table to match the actual data type. All names of the table names and fields that occur in the statement must be consistent. The usual SQL statement is only tested on Cloudscape, Oracle, and Microsoft SQL Server, and you should test it yourself. Database Calls When you repeat the RESULT SET, you cannot connect the database when you repeat the Result Set. In the example below, theestmt.executeUpdate will fail. String query = "STRING UPDATE =" Update Employee..... "; ResultSet RS = Stmt.executeQuery (query); while (rs.next ()) {string s = rs.getstring "Deptno"); // The folload statement will fail: Stmt.executeUpdate (Update) ;....................................................... 2. Define the repeated statement into a subquery, for example: string update = "Update Employeeset DePTNO = (Select Deptno from DePtwhere Loc =` Atlanta ') Where title = `engineer'; 3. Put the second SQL statement In another method, then another method, in this case, you must pay attention to another method of method RequiresNew type transactions. At the same time, I should pay attention to the second SQL statement run in another transaction. This way, if the second thing failed, you should make the first thing roll back. Strong and Memory Problems We expect J2EE's Server running in systems that are less than 128m, or when deploy's J2EE application is greater than 16, or when thousands of Jeb instantiate, the system will have problems. If your memory overflows, shutdown and restart J2EE Server. Usually in this release, each developer should work in your J2EE SDK environment.

Multiple developers cannot share a J2EE Server. Known BUG distribution bug 1. When you type a URL when you find a web resource collection, you should type the carriage return to confirm that the data has been sent 2. When the EDIT menu in the GUI interface is selected: Typical case: tree structure It seems that it is already selected, in fact, another component is selected. Therefore, the EDIT operation operates another component. 3. For components with a long content list, you may have the limitations of the parameter length of the command line during the package. Avoiding methods: Add helpful classes to a .jar library file and add this .jar file to the application's .ser file. 4. If there is a JNDI name in an enterprise bean containing an EJB .jar file, then a new bean is added to this same .jar file. JNDI's name data may be lost. Solved method: Try to complete the EJB .jar file before specifying the JNDI name. 5. In the General dialog of the newly built EJB Wizard, the name of the class is likely to be lost. The loss occurred in your back and then moved. 6. When you add a file in the verified process, sometimes the status of file selection may be incorrect. After selecting a directory with the file selector, you may have no new files. Solved: Refresh Cache by reference this file in another tool. For example: From the File menu, select Add EJB JAR to the application, click Cancel, and then in the verified dialog. 7. In the hidden enterprise bean, if the wrong class is selected, then you roll back to select the correct project, sometimes this selected class's Container-Management Persistence property may be incorrect. Solved method: or restart the wizard, or choose another type of bean. The security problem BUG will be rejected if the user reorders to the form-based dialog page, if not registered (such as the browser's back), is then rejected. Solved method: From the new boot browser. JSP's bug is possible to load servlets when Server starts at specific conditions. J2EE Server starts, you can load a servlet and call the init method of this servlet. But the result is unpredictable. These loaded servlets include RMI-IIOP BUGS in a web.xml file 1. If your JDK is installed in the RMI-IIOP section, J2EE will not work. The solution is to install a clean JDK. 2. J2EE's customers and Server cannot be implemented in ORBs based on IIOP1.0 protocol. BUG of other software 1. On the Solaris platform, if the environment variable does not include STENV JIT_ARGS = "BCO = Off", J2EE JIT will cause Cloudscape failure. 2. Pay attention to first run the Cleanup script before switching J2EE Server from the Non-Recoverable mode to the Recoverable mode. 3. Run J2EE, JDK is necessary. In some systems, when installing JDK is time, the user can select the mode of Stand-Alone JRE. This mode cannot run J2EE. Another problem is: If JRE's root is set to the JDK installation directory, the error is possible.

In this case, when you run, everything is fine, but when deploy, there will be the following error: java.rmi.remoteException: Error Processing EJB JAR: Access Denied: (Java.IO.FilePermission E: / Testjava / lib / ext e) 4. When the HTTPS service is not started, J2EE Server will print an error, you can ignore if you don't need HTTPS. 5. In enterprise beans, if the parent class's parameters or return values ​​are not SerializAbl, do not call Deserialization in the parent class. To determine all the parent class is Serializable. 6. Server.Policy files for web components and J2EE should match. This file gives $ {com.sun.enterprise.home} / public_htm / down permissions. Apply this file, follow the steps below: A: In the lib / security / server.policy file, remove the following line: Grant CodeBase "File: $ {com.sun.Enterprise.home} / public_html / -" {Permission Java .security.allpermission;} B: Replace the content of the deleted row as follows: Grant CodeBase "File: $ {com.sun.Enterprise.home} / public_html / -" {permission java.lang.RuntimePermission "loadLibrary. *"; Permission java.lang.RuntimePermission "accessClassInPackage *."; permission java.lang.RuntimePermission "queuePrintJob"; permission java.lang.RuntimePermission "modifyThreadGroup"; permission java.io.FilePermission "<>", "read, write"; permission java .net.SocketPermission "*", "connect"; // "standard" properies that can be read by anyonepermission java.util.PropertyPermission "*", "read";. // set the JSSE provider for lazy authentication of app clients .sermission java.security.securityPermission "PutproviderProperty.jsse"; Permission java.security.securityPermission "InsertProvider.jsse";

转载请注明原文地址:https://www.9cbs.com/read-28523.html

New Post(0)