Jar-The Java Archive Tool
Combines multiple files into a single JAR archive file.
Jar [options] [manifest] destination input-file [input-files]
The jar tool is a java application that combines multiple files into a single JAR archive file. Jar is a general-purpose archiving and compression tool, based on ZIP and the ZLIB compression format. However, the jar was designed mainly to facilitate the packaging of java applets or applications into a single archive. When the components of an applet or application (. class files, images and sounds) are combined into a single archive, they may be downloaded by a java agent (like a browser) in a single HTTP transaction , rather than requiring a new connection for each piece. This dramatically improves download times. <! - REMIND: put a link to download benchmarkstatistics in here -> jar also compresses files and so further improves download time. In addition, it allows individual entries in a file to be signed by the applet author so that their origin can be authenticated. The syntax for the jar tool is almost identical to the syntax for the
The three types of input files for the jar tool are
- Manifest file (optional)
- Destination jar file
- Files to be archived
Typical usage is
% *. Class jar cf myjarfile In this example, all the class files in the current directory are placed into the file named "myjarfile." A manifest file is automatically generated by the jar tool and is always the first entry in the jar file. By default, it is named META -INF/MANIFEST.INF. The manifest file is the place where any meta-information about the archive is stored. Refer to the manifest specification for details about how meta-information is stored in the manifest file.
If you have a pre-existing manifest file that you want the jar tool to use for the new jar archive, you can specify it using the-m option:
% *. Jar cmf myManifestFile myJarFile class
When files are added to a jar archive, the file and its MD5 and SHA hashes are stored. The hashes are entered into the manifest file. It is easy to view and process the contents of the manifest file, since it uses RFC822 ascii format.
If any of
- Creates a new or empty archive on the standard output.
- Lists the table of contents from standard output.
- Extracts all files, or just the named files, from standard input. If file is omitted, then all files are extracted; otherwise, only the specified file or files are extracted.
- The second argument specifies a jar file to process. In the case of
c reation,this refers to the name of the jar file to be created (instead of on stdout). For
xtract, the second argument identifies the jar file to be listed or extracted.
- Generates verbose output on stderr.
- Includes manifest information from specified pre-existing manifest file. Example use:
Jar cmf myManifestFile myJarFile class *. You can add special-purpose name-value attribute headers to the manifest file that aren't contained in the default manifest. Examples of such headers would be those for vendor information, and version information, and package sealing. See the JAR Files trail in the Java Tutorial for examples of using the m option.
- Store only, without using ZIP compression.
- Do not create a manifest file for the entries.
the "files"is a directory, then that directory is processed recursively.
To add all the files in a particular directory to an archive:
C: \ WWWROOT \ JAVA> ls12/09/96 12:20 a <DIR>. 12/09/96 12:17 a <DIR> .. 12/09/96 12:18 a 1010 0.au12/09/96 12: 18a 946 1.au12/09/96 1218 a 1039 2.au12/09/96 1218 a 993 3.au12/09/96 1218 a 1006 4.au12/09/96 1218 a 1016 5.au12 / 09/96 12:18 a 1048 6.au12/09/96 1218 a 980 7.au12/09/96 1218 a 1064 8.au12/09/96 1218 a 989 9.au 12/09/96 12: 19a 48072 spacemusic.au12/09/96 12:19 a 527 at_work.gif12/09/96 12:19 a 12,818 monkey.jpg12/09/96 12:19 a 16,242 Animator.class12/09/96 12:20 a 3368 Wave.class 17 File (s) 91118 bytes 414983168 bytes freeC: \ WWWROOT \ JAVA> jar cvf bundle.jar * adding: 0.auadding: 1.auadding: 2.auadding: 3.auadding: 4.auadding: 5.auadding: 6.auadding : 7.auadding: 8.auadding: 9.auadding: Animator.classadding: Wave.classadding: at_work.gifadding: monkey.jpgadding: spacemusic.auC: \ WWWROOT \ JAVA> If already have subdirectories for images, audio files and classes in my html directory, I might jar up each directory into a single jar file:
C: \ WWWROOT \ JAVA> DIR12/09/96 12:11 a <DIR> .12/09/96 12:17 a <DIR> ..12/03/96 6:54 p <DIR> audio12/06/96 02: 02p <DIR> images12/09/96 12:10 a <DIR> classes 6 File (s) 207,360 bytes 414983168 bytes freeC: \ WWWROOT \ JAVA> jar cvf bundle.jar audio classes imagesadding: audio/1.auadding: audio / 2 . auadding: audio/3.auadding: audio / spacemusic.auadding: classes / Animator.classadding: classes / Wave.classadding: images / monkey.jpgadding: images / at_work.gifC: \ WWWROOT \ JAVA \ Animator> dir12/09 / 96 12:11 a <DIR> .12/09/96 12:17 a <DIR> ..12/09/96 12:11 a 207,360 bundle.tar12/03/96 6:54 p <DIR> audio12/06/96 02: 02p <DIR> images12/09/96 12:10 a <DIR> classes 6 File (s) 207,360 bytes 414983168 bytes freeC: \ WWWROOT \ JAVA \ Animator> I can then see the entry names in the jarfile using the jar tool and the "t" option:
C: \ WWWROOT \ JAVA \ Animator> jar tf bundle.jarMETA-INF/MANIFEST.MFaudio/1.auaudio/2.auaudio/3.auaudio/spacemusic.auclasses/Animator.classclasses/Wave.classimages/monkey.jpgimages/at_work . gifC: \ WWWROOT \ JAVA \ Animator> Enumerating verbosely (with the "v" option) will tell me more information about the files in the archive, such as their size and last modified date:
C: \ WWWROOT \ JAVA \ Animator> jar tvf bundle.jar 145 Thu Aug 01 22:27:00 PDT 1996 META-INF/MANIFEST.MF 946 Thu Aug 01 22:24:22 PDT 1996 audio/1.au 1039 Thu Aug 01 22:24:22 PDT 1996 audio/2.au 993 Thu Aug 01 22:24:22 PDT 1996 audio/3.au 48,072 Thu Aug 01 22:24:23 PDT 1996 audio / spacemusic.au 16,711 Thu Aug 01 22:25:50 PDT 1996 classes / Animator.class 3368 Thu Aug 01 22:26:02 PDT 1996 classes / Wave.class 12,809 Thu Aug 01 22:24:48 PDT 1996 images / monkey.jpg 527 Thu Aug 01 22: 25:20 PDT 1996 images / at_work.gifC: \ WWWROOT \ JAVA \ Animator>
FROM bamboo shoots Chaorou http://hedong.3322.org/
Reading "Effective java Chinese version of" (41)
Article 40: dished out three can be used to restore the structure of the conditions, the use of the inspection was abnormal for procedural errors, the use of run-time anomaly; wrong are often reserved for JVM instructions lack of resources, failure bound, or the other unable to continue implementation of the procedures conditions.
For a method statement to be thrown out of every check abnormal, it is a potential user API instructions: associated with the abnormal condition is a way to call this a likely outcome.
Two of the checks may not dished out structure: run-time anomalies and errors in the same act, they do not need to, nor should be thrown out of the catch. You have not yet achieved all of the inspections should be thrown out of the subclass is RuntimeException. Definition of a non-Exception, RuntimeException or Error thrown out of the subclass is feasible, but acts in the same sense, it was an ordinary check was abnormal (Exception subclass not RuntimeException subclass).
Is a completely abnormal sense of the object, in its definition can be arbitrary way. Inspection due to the abnormal often return to the conditions of the instructions, by definition, the caller will be some help to restore information.
Reading "Effective java Chinese version of" (42)
No. 41: Avoid unnecessary use of the anomaly is checked and returned to the different code, the anomaly was forced inspection procedures exceptional circumstances, thus greatly improving the reliability of the procedure. And the excessive use of the anomaly is checked, an increase of the burden can not be ignored. If the proper use of API does not prevent the formation of such abnormal conditions, and once had a unusual, the use of the API program useful action can be taken, then the burden is considered legitimate.
) Catch (TheCheckedException e) (
If the use of the API programmer can not do better than this, it is not unusual inspection may be more appropriate. In practice, almost the total catch assertion failure characteristics.
"The inspection was not abnormal check into abnormal," a technology is the fact that this method should be thrown out abnormal divided into two methods, the first method returns a boolean to specify whether to throw an error, another implementation real function, if the conditions are not satisfied with the parabolic anomaly. As follows:
/ / Invocation with checked exception
) Catch (TheCheckedException e) (
/ / Handle exception condition
/ / Invocation with state-testing method and unchecked exception
If (obj.actionPermitted (args)) (
/ / Handle exception condition
Of course, such conversion is not always appropriate, for example, an object will be in the absence of an external sync with the circumstances was to visit, or may be outside the state change, then such a conversion would be inappropriate.
Reading "Effective java Chinese version of" (43)
Article 42: The abnormal as far as possible the use of standard java platform in the payment of the most commonly reuse this anomaly as follows:
Abnormal use occasions
IllegalArgumentException inappropriate parameter values
IllegalStateException this method calls, the status of inappropriate objects (such as inappropriate initialization)
NullPointerException null be prohibited in the case of null values
IndexOutOfBoundsException subscript transboundary
ConcurrentModificationException amend the prohibition of concurrent circumstances, with the revised target detection
UnsupportedOperationException object does not support the request, other methods can also be used anomaly, as long as that dished out the abnormal conditions and documentation requirements can be consistent.
Reading "Effective java Chinese version of" (44)
Article 43: The abnormal dished out to the corresponding abstract suitable for the realization of high-level and low-level exceptions should be caught, and trotted out a high-level abstraction can be carried out in accordance with the interpretation of the anomaly, this practice is called abnormal Translation (exception translation). For example:
/ / Exception translation!
/ / Use lowlevel abstraction to do our bidding
) Catch (LowerLevelException e) (
Throw new HigherLevelException (…);
The lower the abnormal high-level anomaly was saved, and provide a very high level of public access method to obtain lower abnormalities, called chaining do this (exception chaining).
/ / Exception chaining.
/ / Use lower-level abstraction to do our bindding
) Catch (LowerLevelException e) (
Throw new HigherLevelException (e);
Abnormal chain to achieve a very simple, in the 1.4 and later, through Throwable to be supported.
/ / Exception chaining in release 1.4 or later
HigherLevelException (Throwable t) (
If it is in the early java version, it needs to preserve its first:
/ / Exception chaining prior to release 1.4
Private Throwable cause;
HigherLevelException (Throwable t) (
Cause = t;
Public Throwable getCause () (
Dealing with the anomalies from the lower,
The best approach is to be called before the lower methods, such as through a number of means to check to ensure that they will be successful implementation;
The second approach is to deal with these very high-level, high-level approach to the caller and the question of the separation of the lower;
The general practice is to use unusual translation;
If the abnormal lower method is suitable for high-rise, low-rise will be spread from the top.
Reading "Effective java Chinese version of" (48)
Article 47: not to lose sight of the purpose of abnormal anomalies you are forced to deal with the normal conditions, and air-catch block abnormal will not be the purpose of, at least catch block should also include a note to explain why ignored This abnormality. This inspection was not unusual and abnormal applies to all checks.
Not simply be an examination of the abnormal spread to the outside world at least will prompt procedures fail, so as to preserve the conditions contribute to the failure of the debugging information than the anomaly was ignored after an unpredictable moment of this process fail stronger.
Reading "Effective java Chinese version of" (49)
Article 48: the sharing of variable data synchronization visit sync, it can not only prevent a thread to see objects in a state of inconsistency, it appears to be guaranteed through a series of changes in the status of the implementation of the order sequence, from a target the same state transition to another kind of consistent state.
Synchronized keyword can guarantee that at the same time, there is only one thread in the implementation of a sentence, or a section of the code block. Java language guarantee read or write is a variable atom, unless this is the type of a variable or long double.
Java memory model decision, in order to reliable communication between threads, as well as mutually exclusive visit to the atom to read and write data synchronization is needed. See a terrible examples:
/ / Broken - require synchronization!
Private static int nextSerialNumber = 0;
Public static int generateSerialNumber () (
Return nextSerialNumber + +;
Improve their only need generateSerialNumber statement Xiuchifu increase can be synchronized.
In order to terminate a thread, and a recommended approach is to let a thread polling domain, the domain of value if the change means that the thread should terminate their own. Below is the example of this idea, but the problem simultaneously.
/ / Broken - requires synchronization
Public class StoppableThread extends Thread (
Private boolean stopRequested = false;
Public void run () (
Boolean done = false;
While (! StopRequested & &! Done) (
…// Do what needs to be done in the thread
Public void requestStop () (
StopRequested = true;
To improve as follows:
/ / Properly synchronized cooperative thread temination
Public class StoppableThread extends Thread (
Private boolean stopRequested = false;
Public void run () (
Boolean done = false;
While (! StopRequested () & &! Done) (
…// Do what needs to be done in the thread
Public synchronized void requestStop () (
StopRequested = true;
Private synchronized boolean stopRequested () (
Another improvement would be to volatile stopRequested statement, the synchronization can be omitted.
Let's look at slow initialization (lazy initialization), double access patterns do not necessarily able to work, unless the shared variable contains a value of the original language. See examples:
/ / The double-check idion fro lazy initialization - broken!
Private static Foo foo = null;
Public static Foo getFoo () (
If (foo == null) (
Synchronized (Foo.class) (
If (foo == null) new Foo foo = ();
The change is most likely to save slow initialization:
/ / Normal static initialization (not lazy)
Private static finall Foo foo = new Foo ();
Public static Foo getFoo () (
Or use the correct synchronization method, but it may slightly increase the synchronization overhead:
/ / Properly synchronized lazy initialization
Private static Foo foo = null;
Public static synchronized Foo getFoo () (
If (foo == null) new Foo foo = ();
Initialization containers on-demand model is not bad, but it can only be used for static domain, can not be used for example domain.
/ / The initialize-on-demand holder class idiom
Private static class FooHolder () (
Static final Foo foo = new Foo ();
Public static Foo getFoo () (return FooHolder.foo;)
In short, no matter when multiple threads when variable data sharing, each read or write data to be a thread lock. If not synchronized, then a thread by the changes can not be guaranteed to be observed by another thread.
Reading "Effective java Chinese version of" (52)
No. 51: Do not rely on the thread scheduler can not allow applications rely on the accuracy of thread scheduler. Otherwise, the results of the application is neither healthy nor does it have portability. As a corollary, do not rely on Thread.yield or thread priority. These facilities are only affect the scheduler, which can be used to improve one has been able to work the system the quality of service, but should never be used to "amendment" and not an original work procedures.
Preparing robust, the good response, portable multi-threaded application approach is the best, as far as possible to ensure that at any given time only a small number of threads can be run. This approach technology is the key to each thread a small amount of work to do, and then wait for a certain use conditions Object.Wait occurred, or use Thread.sleep sleep for a period of time.
Reading "Effective java Chinese version of" (53)
Article 52: Thread the safety of each type of document should be clear in the document that it threads security attributes. In a statement, a method of synchronized Xiuchifu This is a realization of the details of the API documentation is not derived part.
A class to a number of threads can be safely used in the document must clearly state its support of the security-level threads.
Non-degeneration (immutable) - Examples of this type for the other customers, is unchanged, the need for an external synchronization. See 13.
Thread-safe (thread-safe) - Examples of this type are variable, but include all parts of the synchronization means sufficient, these examples can be used with the need for external synchronization.
Conditional thread-safe (conditionally thread-safe) - This class (or related) contains some of the methods, they must be calling sequence, but not by other threads interference, in addition, this thread with a security level on the same case. In order to eliminate the possibility of interference by other threads, customers in the implementation of this method during the sequence must be a proper lock. If HashTable or Vector, and their requirements for external synchronization iteration. Such as:
Hashtable h =…;
Synchronized (h) (
For (Enumeration e = h.keys (); e.hasMoreElements ();)
F (e.nextElement ());
Thread compatible (thread-compatible) - each method invocation of the external use of external synchronization, at the instance of the class can be used with safety. As ArrayList or HashMap
Thread confrontation (thread-hostile) this class can not be safely used by multiple concurrent threads, even if all method calls are surrounded by external synchronization. Under normal circumstances, the thread is the source of confrontation, this kind of method to amend static data, and these static data may affect other threads.
The conditional thread-safe category specified in the document "in order to permit Method Invocation sequence to atomic implementation, which should be an object locked."
Reading "Effective java Chinese version of" (54)
Article 53: Apart from the group to avoid the use of threads thread, locks and monitors, threading system also provides a basic abstract, or threads (thread-group). However thread group did not provide too many useful functions.
One exception is that when a thread in the group trotted out a thread not capture the abnormal, ThreadGroup.uncaughtException method will be automatically called. "Execution environment," the use of this method to use in an appropriate manner to respond to the anomaly was not caught.
Reading "Effective java Chinese version of" (57)
Article 56: Protection of preparation readObject prepared by the method of a class readObject, equivalent to the preparation of the construction of a public function, whether to pass it what kind of a byte stream, it must produce an effective example. Below are the initials of the readObject robust method of guiding principles:
The object reference must be maintained for the private domain of the category, "these will be stored in the object domain" of copy protection. Non-variable component of the variable part of this category.
For the category of a binding conditions, we must check whether the conditions bound to meet, if not satisfied, then trotted out a InvalidObjectException anomaly. These inspections should follow in all of the copy protection after.
If the object graph of the anti-sequence, the entire object graph are to be effective, they should be used ObjectInputValidation interface.
Whether direct or indirect, should not call category method can be rewritten.
ReadResolve method may be used to take the readObject alternative methods of protection.
Not, strictly speaking, readObject is a "byte stream used as the only parameter," the constructor function. When faced with a stream of bytes of forged when readObject the object will be in breach of it in the category of restrictive conditions. Preliminary way is readObject binding inspection methods, as in the example:
Private void readObject (OjbectInputStream s) throws IOException, ClassNotFoundException (
/ / Check that our invariants are satisfied
If (start.compareTo (end)> 0) throw new InvalidObjectException (start + "after" + end);
On the above precautions can still attack: forged a byte stream, the byte stream to an effective Period examples generated by the byte stream as a start, and then added two additional quote, point of the two examples Period Date internal private domain, the attacker used by the internal attacks domain. Therefore, when an object was anti-sequence of the time, customers should not have to the object invoked, if the domain which contains the object reference, it must be done in copy protection, this is very important. The following cases:
Private void readObject (ObjectInputStream s) throws IOException, ClassNotFoundException (
Start = new Date (start.getTime ());
End = new Date (end.getTime ());
If (start.compareTo (end)> 0) throw new InvlaidObjectException (start + "after" + end);
Reading "Effective java Chinese version of" (58)
Article 57: readResolve when necessary to provide a method of both singleton, or other examples controlled (instance-controlled) category, and methods must be used to protect readResolve "examples - the control of restraint." In essence, a readObject readResovle ways to approach from a de facto public constructor function into a de facto public static factory. For those packets from the succession of prohibited categories, as a way to protect readResolve readObject of an alternative method is very useful.
Sigleton the following categories:
(Public class Elvis
Public static final Elvis INSTANCE = new Elvis ();
Private Elvis () (
…// Remainder omitted
If Elvis examples of the sequence of interface, the following methods to ensure that readResolve its sigleton attributes.
Private Object readResolve () (throws ObjectStreamException
/ / Return the one true elvis and let the GC take care of the Elvis impersonator
For singleton object is not only necessary, readResolve method for all other examples of controlled type (such as type-safe enumeration type) is also essential.
ReadResolve The second method used, as in section 56, as recommended as a protection of a conservative approach readObject alternative. At this time, 56 of the cases can be readObject examples of alternatives:
/ / The defensive readResolve idiom
Private Object readResolve () throws ObjectStreamException () (
Return new Period (start, end);
For those who allow the succession of categories, readResolve methods of protection may not be able to replace the readObject methods. If the super-category readResolve is final, then made an example of category-can not be normal sequence of. If the super-category readResolve method can be rewritten, then malicious subclass may rewrite it with a method, the method returns an example of the damage.
Reading "Effective java Chinese version of" (postscript)
Finally read the. From January 31, today ended March 23, or 52 days, the average day of a speaking, progress still can.
Too busy for the middle was interrupted for a few days, almost no persevered. Work, reading books Burongyia. Hehe.
# Compressed java documents, labeled as jar -
1. Opened (cd java document directory)
Set path = C was under jdk1.5.0_05 \ bin directory where - your own installation directory jdk
Set classpath =. - the current path
Jar cvf tt.jar. / –(./ Said that the current file of all documents, a)
4. Jar can not be generated by this operation, to its release,
Generate a called META-INF folder, open the additional Main-Class: a packet. Class name - (: After must spaces)
5. Again packing
Jar cvfm packets were. Jar. / Meta-inf / manifest.mf. / - (Mf after a space,. /)
6. Could pull! ! ^ _ ^
# Compressed java documents, labeled as war package
1. Package to open a folder (directory cd)
Set path = C was under jdk1.5.0_05 \ bin directory where - your own installation directory jdk
The current path set classpath =.
3.jar cvf tt.war. / –(./ Said that the current file of all documents, a)
Java download video tutorial
Ftp://eicp.net:eicp.netdown @ 188.8.131.52 / computer / video tutorial Zhang Xiaoxiang java / 01. Rm
Ftp://eicp.net:eicp.netdown @ 184.108.40.206 / computer / video tutorial Zhang Xiaoxiang java / 02. Rm
Ftp://eicp.net:eicp.netdown @ 220.127.116.11 / computer / video tutorial Zhang Xiaoxiang java / 03. Rm
Ftp://eicp.net:eicp.netdown @ 18.104.22.168 / computer / video tutorial Zhang Xiaoxiang java / 04. Rm
Ftp://eicp.net:eicp.netdown @ 22.214.171.124 / computer / video tutorial Zhang Xiaoxiang java / 05. Rm
Ftp://eicp.net:eicp.netdown @ 126.96.36.199 / computer / video tutorial Zhang Xiaoxiang java / 06. Rm
Ftp://eicp.net:eicp.netdown @ 188.8.131.52 / computer / video tutorial Zhang Xiaoxiang java / 07. Rm
Ftp://eicp.net:eicp.netdown @ 184.108.40.206 / computer / video tutorial Zhang Xiaoxiang java / 08. Rm
Ftp://eicp.net:eicp.netdown @ 220.127.116.11 / computer / video tutorial Zhang Xiaoxiang java / 09. Rm
………………. Among themselves and ……………
Ftp://eicp.net:eicp.netdown @ 18.104.22.168 / computer / video tutorial Zhang Xiaoxiang java / 19. Rm
Ftp://eicp.net:eicp.netdown @ 22.214.171.124 / computer / video tutorial Zhang Xiaoxiang java / 20. Rm
Ftp://eicp.net:eicp.netdown @ 126.96.36.199 / computer / video tutorial Zhang Xiaoxiang java / 21. Rm ftp://eicp.net:eicp.netdown @ 188.8.131.52 / computer / video tutorial Zhang Xiaoxiang java / 22.rmvb
Ftp://eicp.net:eicp.netdown @ 184.108.40.206 / computer / video tutorial Zhang Xiaoxiang java / 23. Rmvb
Ftp://eicp.net:eicp.netdown @ 220.127.116.11 / computer / video tutorial Zhang Xiaoxiang java / 24. Rmvb
Ftp://eicp.net:eicp.netdown @ 18.104.22.168 / computer / video tutorial Zhang Xiaoxiang java / 25. Rmvb
Ftp://eicp.net:eicp.netdown @ 22.214.171.124 / computer / video tutorial Zhang Xiaoxiang java / 26. Rmvb ftp://eicp.net:eicp.netdown @ 126.96.36.199 / computer / video tutorial Zhang Xiaoxiang java / 27.rm ftp://eicp.net:eicp.netdown @ 188.8.131.52 / computer / video tutorial Zhang Xiaoxiang java / 28. rm
Ftp://eicp.net:eicp.netdown @ 184.108.40.206 / computer / video tutorial Zhang Xiaoxiang java / 29. Rm
Ftp://eicp.net:eicp.netdown @ 220.127.116.11 / computer / video tutorial Zhang Xiaoxiang java / 30. Rm
………………. Among themselves and ……………
Ftp://eicp.net:eicp.netdown @ 18.104.22.168 / computer / video tutorial Zhang Xiaoxiang java / 52. Rm
Ftp://eicp.net:eicp.netdown @ 22.214.171.124 / computer / video tutorial Zhang Xiaoxiang java / 53. Rm
Ftp://eicp.net:eicp.netdown @ 126.96.36.199 / computer / video tutorial Zhang Xiaoxiang java / 54. Rm
Ftp://eicp.net:eicp.netdown @ 188.8.131.52 / computer / video tutorial Zhang Xiaoxiang java / 55. Rm
Ftp://eicp.net:eicp.netdown @ 184.108.40.206 / computer / video tutorial Zhang Xiaoxiang java / 56. Rm
Java learning path (b) chapter books
Learning a new knowledge, could not be expected only Kanyiben or two books will be able to fully grasp. The need for a step-by-step process of reading. I recommend Oreilly books published by the Java Series.
Here, I just want to add that view, a lot of people learning Java is from "Thinking in Java" start with this book, but I think that this book is not suitable for beginners. I think that the right to use this book as a method should be supplementary reading materials. "Thinking in Java" is not in the integrity of the entire system on Java, but a leaping writing method is a method similar to the tips of many Java carried out an in-depth knowledge of the analysis and interpretation.
For beginners, it is best to find an entry Java books, but relatively complete progressive on Java syntax, object-oriented characteristics, the core class libraries, and so on, looking at this book, you can sync of "Thinking in Java," to deepen the understanding of Java and the use of principle, while Java can complete understanding of the entire system.
The Java-entry books, Tsai Yung is recommended Oreilly "Exploring Java, 2nd Edition" or "Java in a Nutshell, 2nd Edition (for C + + background)," I have not read these two books. Actually, I feel that the electronic publishing industry "Java 2 programming explain" or "Java 2 from entry to the intimate knowledge of the" very good.
Java books in all, the issue of the utmost useful fact, the Java Serials O'reilly not, the real issue of the utmost JDK useful is the Documentation! Almost all you want to be in the Documentation of knowledge are all inside, which is of course the most important part of the foundation class library Java API documentation is organized in accordance with the package, for each class has a detailed explanation, it Inheritance, the achievement of a certain interface, which is usually used in occasions, it can be found all public properties and methods, the interpretation of each attribute, meaning, the use of each method, calling parameters, the parameters significance of the return value type, and methods may be thrown out of the abnormal, and so on. It can be run, all on the books Java programming actually is in a more user-friendly language, and a good organization to introduce Documentation inside a package containing some of the use of it. So central theme remains the same, if you have the ability to learn directly through Documentation to the Java class libraries, so basically do not need to see the other books. In addition, the Documentation is also required manual programming, I have three desktop shortcuts Documentation were J2SDK1.4.1 the Documentation, Servlet2.3 the Documentation and J2SDKEE1.3.1 the Documentation. With this three Documentation, what other books are not needs.
For Java Web programming, the core is to become familiar with and grasp the HTTP protocol, and Java has nothing to do on this, in a familiar HTTP agreement on the need to know the Java class libraries to achieve the HTTP protocol, which is Servlet API, the most important thing is Servlet API. Of course for beginners, directly and through Servlet API to learn Web programming is very difficult, I recommend O'reilly "Java Server Pages," this book to learn Web programming.
EJB books, "Enterprise Java Beans?, 2nd Edition" is a very good book, EJB learning threshold is relatively high, the entry difficult, but this book completely reduce the learning difficulty, especially important point is that EJB a combination of the learning needs of a concrete realization of App Server, EJB learning, we must also simultaneously learning some App Server, and this book related to the three books were Weblogic6.1, Websphere4.0 JBoss3.0 deployment of the book and the example of the above is done. Is not only theoretical, have practical. EJB learning at the same time, can look on the job, EJB learning will become very easy.
But this book also has a problem, is the older version, the main stresses EJB1.1 norms and the norms of EJB2.0. Ed Roman and wrote "Mastering EJB 2.0," This book is written under the EJB2.0 standardized, and easy-EJB programming covering all aspects, and there are many tips programming experience, but also very EJB study recommended books one.
If it is to learn with Weblogic J2EE so, "J2EE application with BEA Weblogic Server" is definitely the preferred reading material, although described Weblogic6.0 is still worth buying, this book is recommended by the BEA official teaching, the author is BEA company engineers . Now Chinese version of the already can be seen everywhere. This book introduced with Weblogic J2EE technology in all aspects of the Weblogic platform in the development and deployment of practice guiding significance is very strong.
With the Java platform based on J2EE knowledge and the knowledge of the future, is to learn how to further the use of OO software design methods, then must learn from the "design mode." Sun has published a "J2EE core model," each is the development of the Java Enterprise platform software architect of the necessary books. This book introduces a comprehensive architecture of J2EE design pattern, the designer is required reading books.
- URL registration equipment, including industry-standard interfaces on the information, such as bill payment services.
- Has been committed to supporting the industry-standard interface (such as MoneyBroker) of the specific companies.
- These devices to the SOAP interface, the potential use of these collaborators interface can be programmed to find each other mutually.
- Used to describe a SOAP interface standards technology-neutral language.
I. Overview 1. Middleware with the concept of the rapid development of computer technology, a wide range of needs in a variety of application software platform between the transplant, or a platform to support a variety of applications and manage multiple applications, hardware and software platforms and applications between the need for reliable and efficient data transfer or conversion, allowing the system to ensure that synergies. All these need to build a software and hardware platform, while the top of the more application software to support software system, and middleware It is in this environment and hygiene should be pregnant.
Because middleware technology is in the process of developing, it could not be precise definition.
More popular definition: middleware is an independent systems software or service procedures, distributed applications using the software between the different technologies in the sharing of resources. Middleware in client / server operating system, management of computing resources and network communications.
From the definition of middleware can be seen, middleware is a kind of software, rather than a software middleware not only to achieve interconnection, but also to achieve interoperability between applications; middleware is based on the distributed processing software, the definition of special emphasis on its network communications capabilities.
2. Middleware features and advantages of the usual sense, the middleware should have the following features: large-scale application to meet the needs of running on a variety of hardware and OS platform; support distributed computing, to provide inter-network hardware and OS platform transparent of the application or service interactive features to support standard protocol to support standard interface.
Programmers by calling the middleware provided by the large number of API, heterogeneous environment of communication, thereby shielding the complexities of heterogeneous systems operating systems and network protocols.
Middleware provides client and server connectivity between services, a standard programming interfaces and protocols. Different operating systems and hardware platforms, they can interface with a variety of norms and agreements achieve.
As standard interfaces for portability and interoperability standards for the agreement of the importance of standardization of many middleware has become a major part of the work. For application development, middleware, operating system and network services much more important, middleware provided by the program interface defines a relatively stable high-level application environment, regardless of the underlying computer hardware and system software upgrade how, as long as the intermediate of updates, and maintain the middleware external interface definition unchanged, applications almost without any changes, thereby protecting the enterprise application software development and maintenance of a major investment.
Middleware is an independent systems software or service procedures, distributed applications using the software between the different technologies in the sharing of resources. Middleware software management procedures and a client database or early communication between the application software.
Distributed middleware in customer service and the nexus between playing a role, such as Service management, load balancing and Web-based computing.
These technologies help to reduce the use of the burden of software development, so that they make use of the existing hardware, operating system, network, database management systems and object model to create distributed applications software more handy. As enterprise middleware to protect the investment and ensure the relative stability of application software, application software is used to achieve expansion at the same time middleware products in a simplified to a large extent by different hardware distributed to the complexity of dealing with the environment, so it's there is growing concern about users.
World famous SBSTA The Standish Group in a research report summed up the middleware Ten advantages:
(1) Application Development: The Standish Group of 100 applications in the key business logic, application logic procedures and the proportion of procedures basis; business logic and application logic program total only 30% of procedures, and based procedures accounted for 70%, the use of the traditional sense of a middleware can save 25% to 60% of the cost of application development. If a new generation of middleware products to portfolio application, and to support the business reusable component objects, application development cost savings to 80%.
(2) system running: no use of middleware applications, its initial capital investment and operating costs than with the scale of the use of middleware application system more than doubled.
(3) the development cycle: basic software development is a time-consuming work, the use of standard commercial middleware can shorten the development cycle of 50% to 75%.
(4) reduce project development risks: study shows that do not use standard commercial middleware key application systems development project failure rate higher than 90%. The built-in the development of their own enterprises basis (middleware) software is wasted, and the total project cost at least double, or even more than 10 times.
(5) a reasonable use of funds: commercial use of the middleware standards, enterprises can easily in existing or legacy systems or on adding new functional modules, and their seamless set of the original EC. Rely on the standard middleware, the old system can be a trendy new form of Internet / Intranet applications.
(6) Application Set: middleware can rely on the standards of the existing applications, new applications and the purchase of a business application components together to pool.
(7) system maintenance: the need for mentioning is that the basis for (middleware) software self-development is a high price to pay, in addition, annual maintenance of the basis of self-development (middleware) software will require the expenditure of the initial development costs 15 % ~ 25% of the annual expenditure on the maintenance procedures are also necessary when the total cost of the project 10 percent to 20 percent. In normal circumstances, the purchase of standard commercial middleware products each year just to pay the prices of 15% to 20% of the maintenance costs, of course, the specific middleware products based on the purchase price to which a number of vendors and determined.
(8) Quality: Construction on the basis of self-enterprises (middleware) software platform applications, each adding a new module, it is necessary to accordingly in the basic (middleware) software on any alteration. Instead of the standard interface middleware in the area are clear and norms. Standard middleware standardized modules can effectively guarantee that the quality of applications and reduce maintenance costs the new system.
(9) technological innovation: Enterprise on the basis of self-construction (middleware) software platform frequent innovation is extremely difficult to achieve (not practical). And the purchase of standard commercial middleware, the development of technology and changes can be rest assured that middleware vendors will be duty-bound to grasp the direction of technology and technological innovation.
(10) increase product appeal: different business middleware provided by different functional model, the rational use, the application allows you to more easily add new forms and new services. Viewed from another angle, reliable commercial middleware also enables business applications better, more superior.
Specifically, the middleware shield the complexity of the low-level operating system, developers face a simple and unified development environment, to reduce the complexity of the design process, to focus on their own business, no longer procedures in a different system software transplant duplication of work, thus greatly reducing the technical burden.
Bring middleware application development system is not only simple, shorten the development cycle and reduce the system's maintenance, operation and management of workload, but also reduce the overall cost of a computer input. The Standish Group survey shows that the use of middleware technology, application systems the total construction costs could be reduced by 50 percent. In the network's economic development, the development of e-commerce today, middleware was not only the interests of the IT vendors, IT users winner is the same, and with more certainty is the winner.
As new layers of middleware infrastructure software, and the important role will be different periods, different operating systems, software development and application integration, and each other like a seamless coordination of the overall work, which is the operating system, database management system itself can not be done. This middleware role in technology development, application software in the past to work on some of the results are still used, saving a huge amount of human and financial resources invested.
3. Middleware applications and classification of computer software technology with the development of middleware technology has increasingly mature, and appeared at different levels, different types of middleware products. According to IDC's classification, middleware can be divided into six categories. Data Access Middleware respectively, remote procedure call middleware, middleware, transaction middleware, middleware, and other objects.
Data Access Middleware: Application of resources in order to establish a data interoperability model, the heterogeneous database environment to achieve connectivity or file system to achieve connectivity middleware;
Remote Procedure Call middleware: Through this Remote Procedure Call mechanism, the development of client side programmer applications, which could be called upon in the need for remote server process;
MOM: to shield swap agreement between the various platforms and the characteristics of mutual communication and achieve synergy between the applications;
Middleware transactions: in the distribution of heterogeneous environments provide a guarantee transaction integrity and the integrity of the data an environment platform;
Object-Oriented Middleware: in the distribution of heterogeneous network computing environment, the distributed object can be of various organic combination of the rapid completion of system integration and realizing object reuse.
At present there are many companies at home and abroad have developed their own middleware products, including the world's largest independent middleware vendors BEA, also like IBM, Oracl e, and Microsoft, HP, Sun, and other vendors have also set foot in the middle of e-commerce pieces.
Object-Oriented Middleware and distributed object technology is a product of the development of the industry generally believe that the object-oriented middleware is the future direction of the mainstream of the development, which provides a communications mechanism, transparency in the distribution of heterogeneous computing environments transfer Object Request, which can be targeted at the local or remote machine.
Object-oriented standards originally only one, that is, CORBA (Common Object Request Broker Architecture), the standard by including BEA Systems, IBM, Oracle, Sun Microsystems and Sybas e of the many companies, such as manufacturers work out, thus forming a huge CORBA Union forces. Later, Sun launched Enterprise JavaBeans (EJB), and use their own easy-to-use process models to make improvements on CORBA. Microsoft's COM (Component Object Model, the Component Object Model) have enabled object-oriented middleware market, there's one standard, so that the object-oriented middleware products in the formation of the two standards, Microsoft's COM 1 , First JavaBeans.
From a macro perspective, middleware can be divided into three broad categories:
Data categories: for data access, use and value-added, such middleware for building data-centric applications.
Class: the distribution network nodes in the various applications or handle connected together to form a unified distributed applications.
Distributed Component categories: support component applications, the development direction of future applications, today's highly competitive.
Second, the technical specifications 1.DCE middleware system DCE is Distrbuted Computing Environment Distributed Computing Environment initials, which by the Open Software Fondation development, the organization now known as the Open Group.
DCE by a number of common components work together components, which are: Remote Procedure Call (RPC), the local and global directory services (CDS and GDS), security services, DCE threads, distributed clock services (DTS) and Distributed File Services (DFC). Threads, RPC, CDS, security services and DTS components are usually a safe core, and is composed of any DCE environment necessary components, DTS is optional pieces. DCE in the environment, but also for the management of these components management tool.
DCE known as middleware or to have the capability of the technology, it does not exist independently, but is bundled with the operating system vendor, or from third-party vendors to integrate.
2.DTP DTP model is the model X / OPEN organization of a software structure, and this structure allows multiple applications to share a number of resources provided by the management of resources, and coordinated with the overall things.
X / OPEN is an independent, global influence on the open system, it has most of the world's largest providers of information system support, and the fundamental norms of any open system through a concrete realization from the perspective of how allows users to gain more benefits.
X / OPEN DTP model from the five basic modules:
Application Procedure (AP): used to define the boundaries of things, and to determine what form the operation of action.
Resource management (RM): If the database or file system for access to documents.
Things Management (TP): things to the distribution of identification, monitoring things and be responsible for the handling process and the coordination of the completion of things things failure recovery.
Communication resource management (CRM): In an organizer or two things for the management of the communications between the control.
In this five modules X / OPEN model defines the following modules and the interface between the module specifications:
Applications - Explorer already exists between some X / OPEN standards, such as SQL and ISAM; in the application process - things managers TX interface between the definition in the transaction management - resource management device XA interface between the definition in the transaction management - communication between the definition of resource management for the XA + interface in the application - Communications Resource Manager interfaces between the three kinds: TXRPC, XATMI and CPI-C In the communication resource management - the underlying operating system provides a communication protocol between XAP-TP interface.
CORBA is the Common Object Request Broker Architecture acronym, as common object request broker architecture, which by the international development of OMG Object Management Organization, the Organization is an international organization that was founded in 1989, and now owns, including manufacturers and software developers more than 800 members, aimed at the distribution and structure computer environment has been under development for the application software to provide a common framework within which to develop software that is object-oriented and had a reusability, portability, as well as operational characteristics . Other features of the situation CORBA see note below the third part.
J2EE is the Java 2 Platform Enterprise Edition acronym, is a multi-tier application model structure. SUN norms by the company, which will service business logic from the system functionality and user interface separated, placed in the client layer and the application of basic facilities in the middle between these two layers, is the most extensive application of the Web-oriented Application of system structure norms. Other features of the J2EE in the third part, see note below.
5. Technical specifications related Internet Web (World Wide Web) is a network of information resources, it relies on three mechanisms so that these resources can be a large number of information users.
1) the naming of a sole mechanism for the Internet to locate resources, such as: URI.
2) A communications protocols, in order to have access to the Internet named these resources, such as: HTTP.
3) mixed text, in order to better control of these information resources, such as: HTML.
URI (Universal Resource Identifier) the overall resources logo, a naming mechanism, it's an online resource positioning divided into three parts: access to resources for the name of the means of communication, such as HTTP, FTP; preservation resources machine name, such as: www.sohu.com; the name of the resource itself, but also access to these resources is the path. HTTP (HyperText Transfer Protocol) is a distributed for and cooperate with each other, mixed-media information system application-layer communication protocols. Use of this order, in addition to obtaining information in the information system, can also make enquiries on the front as well as updated information dissemination operations.
HTML (HyperText Markup Language) is an online publication of the use of language, it can be for the author to provide such features: online publishing documents, including title, text, tables, lists and photographs; press the mouse, through mixed View text link text; and remote services for the on-line transaction processing established forms of information to find, such as ordering products and scheduled operations directly in the document include independent pages, video and audio information.
These norms are based on web technology, in addition to these technical specifications, there are some norms are also very important, and its use is among enterprises and the enterprises for data exchange through the Web. These norms are XML, SOAP, WSDL and UDDI.
VXML (Extensible Markup Language) through the provision of more flexible and more easily receive information identification method to improve Web functionality. XML can be expanded as the markup language, HTML it is not a single, pre-defined language, XML is a language used to describe other languages, the use of XML, you can define your own, are not restricted type , and other types of documents.
SOAP (Simple Object Access Protocol) is a lightweight protocols, in the absence of control centres for, distributed environment to exchange information. With XML-based, from four components: an envelope, the definition of what information is and how it handled the framework of a set of encoding rules for the application of the definition of describing the type of data that example to a group that Remote Procedure Call and response rules, as well as a group of bundling approaches, which use low-level communications protocols for the exchange of information. SOAP and other rules with the possibility of combining.
UDDI (Universal Description, Discovery and Integration) is a standardized, this specification for a distributed Web services to Web-based information to their registration. UDDI is also a realization of the norms of the public can access the collection of the norms of any particular enterprise Web services can provide registration information with the contents of the form out so that other companies can be found these services. Web services are the next step in the development of Web technology direction, it allows programmable be placed on the Web, the other side can use the form of distributed access.
WSDL (Web Service Description Language) is a group-oriented documents contain information or process-oriented operational information endpoint of the Web Services Description xml format; news operation and the description of the first to be abstract, and then tied to specific network protocols and message formats , in order to define the endpoint, the endpoint was related to the specific combinations of abstract endpoints (services). WSDL description can be bundled with SOAP, HTTP GET / POST and MIME-related.
Third, the mainstream middleware technology platform focuses on the following three major mainstream and compared middleware technology platform to enable readers to better understand middleware technology.
1. Current support server-side middleware technology platform inspection of the distribution of the current mainstream technology platform, the main OMG CORBA, J2EE and Sun's Microsoft DNA 2000. They are server-side support for the development of middleware technology platform, but have their own characteristics, will be described below.
(1) of the OMG CORBA
CORBA distributed computing technology is based on numerous organizations OMG open systems platform vendors object to the distribution of content interoperability formulated on the basis of the common object request broker architecture norms.
CORBA distributed computing technology, by the vast majority of distributed computing platform supported by the manufacturers and technical norms followed in the system, a model of integrity, and advanced, independent of the platform and development language, the support of a wide range of features, have gradually become the distributed computing technology standards. COBRA standards can be divided into three levels: Object Request Broker, public services and public facilities targeted. The bottom is CORBA ORB that the distributed object definition (interface) and linguistic mapping, object to achieve the communications and interoperability, distributed object system of "soft bus" in the above definition of a lot of ORB public services, such as concurrent services can be provided, name services, services (transaction) services, security services, a wide range of services; the top of the definition of public facilities component framework provided directly to the business objects can be used, provides business objects for effective collaboration agreement rules. At present, the distribution of CORBA with an endless stream of products, including manufacturers ORB middleware products, such as BEAM3, IBM Component Broker, distributed object vendors introduced products, such as such as IONAObix and OOCObacus.
CORBA standard of recent developments, an increase of Internet-oriented features, quality of service control and CORBA Component Model (CORBA Component Model).
Internet integration features include a firewall against transmission IIOP (Firewall) and the definition of the internal operation of the URL naming format Naming Services (Naming Service).
Including the ability to control the quality of service with the quality control of asynchronous messaging services, a group of CORBA for embedded systems definition, a group of fault-tolerant real-time CORBA and CORBA at the request of the programme.
CORBA CCM (CORBA Component Model) technology, in support of the POA CORBA specification (after version 2.3) based on the combination of EJB on the basis of the current norms develop. CORBA component model, is OMG organizations for the development of a distributed application development and deployment of the standard model of server-side middleware, which mainly include the following three elements:
A, abstract component model, the server-side components used to describe the structure and components of the structure of interoperability;
B, component packaging structure, and to provide a common component operation and management of the environment and to support the security, services, durable status, and system integration services;
C, component configuration and packaging norms, CCM packaging technology to manage the use of the binary components, multi-language version of the executable code and configuration information, and to develop a component package and the specific content of the documents based on XML content standards.
In short, CORBA is characterized by large and comprehensive, interoperability and open a very good job. CORBA's weaknesses are large and complex, and the updated technology and standards are relatively slow, COBRA norms from 1.0 to 2.0 upgrade of the time spent is very short, and delves into the release version of the relatively very slow. In the use of specific applications are not many.
(2) Sun's J2EE
In order to promote Java-based server-side application development, Sun at the end of 1999 was launched Java2 the J2EE technology and related standards, J2EE objectives are: to provide platform-independent, portable, support concurrent access and security, based entirely on the Java development of server-side middleware standards.
In J2EE, Sun is a complete Java-based application development for enterprise distribution norms, which, in the Distributed interoperability agreement, J2EE support RMI and IIOP, and server-side form of distributed application structure, including the Java Servlet and JSP (Java Server Page), EJB, and other means, to support a variety of business needs, and Java applications with the "Write once, run anywhere" feature, making J2EE technology in the computer field have been released quickly development.
J2EE components can be simplified scalable, server-side components in the complexity of the application, although in 2000 the same DNA, but the biggest difference is that the DNA is a product of 2000, J2EE is a standard, different manufacturers can realize their own norms with J2EE products, J2EE standards, many of the manufacturers involved in the development, it is not unique to Sun, and its support for cross-platform development, which many large distributed computing platform manufacturers have publicly supported and compatible J2EE technology.
EJB is Sun introduced Java-based server component part of the J2EE standard, since the launch of J2EE, a wide range of development, has become the standard application server technology. SunEJB technology is the local component in the Java Bean on the basis of the development of distributed applications for the server-side component technology. It is based on the Java language, Java-based provide a byte binary code reuse way. EJB is the system's server-side components distribution norms, which include components, component interface standard containers, as well as packaging components, component configuration, and other standards and norms content. EJB technology will enable Java component-based approach to the development of server-side distributed applications possible. Enterprise applications from the perspective of multi-storey structure, EJB is Yewuluojiceng middleware technology, and JavaBeans different, which provides transaction processing capacity, since the three-tier structure, the middle layer, which is Yewuluojiceng is processing services the core of separation from the data storage layer to replace most of the storage layer status. From the perspective of distributed computing, EJB as CORBA, provides a distributed technology foundation. Provide a means of communication between objects. From the perspective of application of Internet technology, and EJB Servlet and JSP with a new generation of application server's technical standards, in the EJB Bean can be divided into sessions Bean and entities Bean, the former maintenance of the session, which dealt with matters, and is now responsible for client Servlet communications, visit EJB, and the results generated through the JSP pages back to the client.
J2EE The advantage is that the mainstream of the server market or mainframe and UNIX platforms, which means that the Java development components, to achieve the "Write once, run anywhere", the development of applications can be configured to include any Windows platform, server-side environment he said.
(3) 2000 Microsoft DNA
Microsoft DNA 2000 (Distributed interNet Applications) is the introduction of Microsoft Windows2000 series on the basis of operating system platforms, in the expansion of the distributed computing model, and the transformation of Back Office Series server distributed computing products since the release of a new distributed computing architecture and norms.
On the server end, DNA 2000 offers ASP, COM, Cluster, and other application support. At present, the structure of DNA2000 technology has tremendous advantages. On one hand, as Microsoft is the operating system platform vendors, DNA technology is the underlying 2000 operating system platforms with strong support; On the other hand, Microsoft's widely used operating system platforms, support of the application development platform the large number of vendors, In practice, DNA 2000 was the introduction of many application developers and support.
DNA 2000 combines today's most advanced distributed computing theory and thought, such as transaction processing, scalability, asynchronous message queue, clustering, and so forth. DNA can be made based on Microsoft development platform for application server components, such as database services, asynchronous communications services and security services, by the bottom of the distributed object system. Microsoft led to the DCOM / COM / COM + camp, DDE, OLE, such as ActiveX to provide the basis for the development of the middleware, such as the VC, VB, Delphi, and so support DCOM, including OLE DB database access, new technology With the release of Windows2000, Microsoft's DCOM / COM / COM + technology, in DNA2000 structure on the basis of distributed computing, displays a new model of component distribution. First, DCOM / COM / COM + Component still using ordinary COM (Component Object Model) model. COM initially as a Microsoft desktop system component technology, mainly for the local OLE application services, but with the Microsoft NT server operating systems and the release of DCOM, COM through the bottom of the component technology makes remote support extended to the distribution of application areas. DCOM / COM / COM + will also expand its distribution-oriented application server middleware business logic. COM + by the relevant services and facilities, such as load balancing, memory database, object pool, component management and configuration and so on, DCOM / COM / COM + will COM, DCOM, MTS function organically unified together to form a concept, strong function of the component application architecture. Moreover, DNA2000 manufacturers to provide a single component of the distributed object model, developers using the same vendor to provide a series of development tools, this combination of a number of development tools than more attractive.
But it is dependent on the lack of Microsoft's operating system platforms, and so the other system development platform (such as Unix, Linux) can not play a role.
2. Comparative analysis of the current relevance, in view of the above-mentioned various distributed computing platform technologies, are all experiencing a similar and comparable Distributed Component, or CORBA CCM (CORBA Component Model) technology, the SUN EJB (Enterprise JavaBean) technology and DNA in the 2000 COM / DCOM / COM + technology.
For more than three distributed computing platform, the paper used by the industry from the practice of the following three aspects:
Integration: Integration is mainly reflected in the basic platform for application interoperability on the support of capacity. It demands in different machines on the platforms and operating systems using different languages or development tool to create the types of business applications must be integrated together, form a unified framework for enterprise computing. This integration framework must be established on the basis of the network, and have the ability to integrate legacy applications;
Availability: The software requirements of the technical component must be mature technology, the product must also be mature products, in the critical enterprise applications to be stable, safe and reliable operation. In addition, since the database in the enterprise computing play an important role in software component technology should be tightly integrated with database technology;
Scalability: integration framework must be scalable, able to coordinate different design patterns and implementation strategy may be based on the enterprise computing needs tailoring, and rapid response to the changes in the market and technology trends. By guaranteeing some of the reusability to maximize the protection of corporate investment.
The following table from the integration, availability, scalability, three aspects are given the three mainstream distributed computing platform for the comparison results.
Although these three platforms because of its formation of the historical background and business background is different from, each of which has its own characteristics and emphasis, in fact, among them also have great complementarity and the same.
4, middleware is the realization of e-commerce infrastructure software that is the essence of e-commerce in a distributed environment on the various computer systems exchange coordination, thereby opening up new commercial mode of operation. Network communications, especially the Internet, e-commerce communications infrastructure, and management and transmission of operational information between systems, coordination of the various systems in the middle of processing module management system is to ensure that the key to the success of e-commerce applications. E-commerce application servers, generic gateways, payment gateway, communications platforms and security platforms, and into the areas of e-commerce middleware framework.
From a technical perspective, e-commerce will be Internet / Intranet technology, the traditional IT technology and the business of dealing with the specific composition. However, the establishment of the system will be faced with many new issues, including the application of systems can be quickly established, users can meet large, high-capacity requirements, is able to provide high efficiency, high reliability, high availability, and so on mission-critical requirements, and whether they can meet the security needs, and so on.
These issues, but relies on simple Web technology is not enough. Web technology currently used as more of the early information-oriented release, concurrent access bottleneck exists, it is difficult to expand, low efficiency, security, and many other issues, we can not meet the needs of electronic commerce. In order to properly address these issues, the need for low-level Web-based technology, planning an overall Application Framework, and to provide a support platform for Internet application development, deployment and management, and to take the solution of these problems . This has developed into a wide standards to support layer, as Internet applications infrastructure (Infrastructure), a support layer is actually Internet-based middleware, that is, application servers.
At the same time, because of a business enterprise is not able to cross-not on the Internet, but must be with the combination of traditional applications, and therefore must pass middleware to integrate Web applications and traditional applications, achieving complete e-commerce.
Under such circumstances, e-commerce applications should contain the following levels:
â— browser: This will be the e-commerce channel.
â— e-commerce application platform: providing e-commerce application of different types of generation tools, such as on-line shops, online payment, virtual communities, and so on.
â— exchange e-commerce platform: internal integration within the various business and e-commerce-related business systems, external connectivity, business partners, such as banks, suppliers, customers, distribution structure, completed between the various operational systems and data conversion and the whole.
â— based e-commerce platform: to support a large number of customers with Internet access, application developers to quickly develop dynamic e-business applications, as soon as possible information systems and business activities into the Internet.
In exchange e-commerce platform and e-commerce platform based middleware can not exist. It can be said that no middleware will not be able to support today's network applications.
Middleware is a framework for e-commerce e-commerce application integration of the key, regardless of what e-business applications in the distribution of hardware platforms, the use of any database system, through what complex networks, and e-commerce applications are interconnection and interoperability First of all e-commerce middleware framework to solve the problem. In the communications, e-commerce middleware framework to support a variety of communication protocols and communications services model, data transmission, data format translation, flow control, data encryption, data compression, and so on in the core of e-commerce middleware framework, resolve the name services, security control, concurrency control, reliability and efficiency of assurance in the area of e-commerce application development, must be able to provide different platforms based on the richness of the interface development, popular support for the development of tools and standards such as heterogeneous interconnects In management, e-commerce middleware framework to resolve its own configuration, monitoring, tuning, the easy-to-use e-commerce application manageability to provide guarantee.
Secondly, the different Web application environment, the framework for e-commerce middleware there are different requirements. The workflow application, it is necessary to meet the conditions and the conditions of the state, the information in response to an application from the state transfer to another application of online transaction processing, distributed data need to ensure consistency, non-stop operations, with a large number of high-efficiency For a data acquisition system need to ensure reliable transmission, and so on.
5, middleware consistent with the trend of development of software and software components (Software Component) technology in the large-scale industrial production inspired by the right moment, is a software technology cross-century development trends, the aim is to thoroughly change the software production methods, and fundamentally software to improve the efficiency and quality of production, improve the development of large-scale software systems in particular the success of the system is the commercial rate. With software component, application developers can use off-the-shelf software component assembly as applied to different areas, different functions of the application software. Reusable software has been the world software industry by pursuing the dream, software components to achieve this dream into a practical point out that the roads, and middleware is the software component of the form. Middleware abstract model of the typical applications, application software maker can be in the form of standards-based development, the software component of the possible, and has accelerated the process of software reuse. Therefore, the middleware software is in line with the law of development.
Middleware is a software technology development trend, known as the fastest growing software varieties, the strong momentum in recent years, of course, this is also from the market in the context of the global middleware support. There is no doubt that the software industry is becoming a middleware technology and new economic growth points.
On the preparation of cross-platform Java programs, the attention of the author: Javaresearch Source: Javaresearch
Jsp: plugin Action so you can insert the specific requirements of the browser or EMBED OBJECT elements to run a specified browser plug-ins required JAVA Applet.
Type = "bean | applet"
Code = "classFileName"
Codebase = "classFileDirectoryName"
[Name = "instanceName"]
[Archive = "URIToArchive, …"]
[Align = "bottom | top | middle | left | right"]
[Height = "displayPixels"]
[Width = "displayPixels"]
[Hspace = "leftRightPixels"]
[Vspace = "topBottomPixels"]
[Jreversion = "JREVersionNumber | 1.1"]
[Nspluginurl = "URLToPlugin"]
[Iepluginurl = "URLToPlugin"]>
[<Jsp: param name = "parameterName"
Value = "(parameterValue | <= expression%%>)" />] +
</ Jsp: params>]
[<jsp:fallback> Text message for user </ jsp: fallback>]
</ Jsp: plugin>
<jsp:plugin Type=applet code="Molecule.class" codebase="/html">
<jsp:param Name="molecule" value="molecules/benzene.mol" />
</ Jsp: params>
<p> Unable to load applet </ p>
</ Jsp: fallback>
</ Jsp: plugin>
Type = "bean | applet"
Plug-in implementation of the object type. You must be in the bean or a designated applet, because no default value of this property.
Class = "classFileName"
JAVA implementation of the plug-in type of document name. In your name must be included in the extension. And the file must be in the "codebase" attributes specified directory.
Codebase = "classFileDirectoryName"
Includes plug-ins will be run JAVA category at this directory or directory path. JSP documents to the default path.
Name = "instanceName"
Bean or applet examples of the name. JSP be made with the document called a bean or applet communication between possible.
Archive = "URLToArchive,â€¦"
Path to a comma-separated list. Those specified directory for codebase under the category of pre-loading the loading of the archive file pathname. Usually, these archive files through the network was safe loading, can significantly improve the performance of applet.
Notes and customary use characters
You can use some of the specific elements to insert notes and some signs are usually as a special character. Following is a summary: Grammar aim
<% - Notes -%> JSP form of the Notes. Will be JSP scriptlet-to-ignored by the compiler. Any embedded JSP scripting elements, directives, or actins will be ignored. Example:
<% @ Page language = "java"%>
<head> <title> A Comment Test </ title> </ head>
<h2> A Test of Comments </ h2>
<% - This in the Show Notes will not be time to see the source code -%>
<! - Notes -> HTML form of the Notes. Transmitted directly to the final HTML. Any embedded JSP scripting elements, directives, or actins would be normal implementation. Example:
<! - This page was loaded on
<% = (New java.util.Date ()). ToLocaleString ()%> ->
View the source code will see:
<! - This page was loaded on January 1, 2000 ->
<\% In the template text (static HTML), when you want to output the pages on this special symbols (<%), so please write.
%> In the use of scripting elements, and the role of the above "</%" similar.
'In the use of a "'" attributes that are characters in " '." Of course, you can also use the "" "as a distinction. Case of: 'pig" fhjgj "', or, 'pig'fhjgj''
"In the use of the" "" is that the attributes of character "and". "Of course, you can also use" ' "as a distinction. Example:" pig'fhjgj' ", or" pig "fhjgj" "
%> In the attributes of "%>"ã€‚
<\% Of the attributes "<%"ã€‚
JCIFS Java is a completely with the development of SMB client library. It follows CIFS specification (a standard Microsoft Windows platform file sharing agreement), Unicode support, order pipeline, batch, threaded call the IO multiplexing, encryption, authentication, integrity Affairs, Victoria / working group / Host / total enjoy / document enumerated, NetBIOS name socket and services, smb: / / URL protocol processors, a type of java.io.File API, called RAP, NTLM HTTP identification.
JCIFS use of remote machines read and write shared directories and files, the main use of which three categories: SmbFile, SmbFileInputStream, SmbFileOutputStream. Similar to the use of Java in the File, FileInputStream, FileOutputStream.
API documentation specific to download and see the official website: http://jcifs.samba.org/« go back — keep looking »