In this paper, typical examples of the application and operation of the scene, trying to understand a simple way to explain the ECLIPSE Group to use development environment. In this series of Part 1 Introduced the CVS group of related terms and the process of establishing the development environment.
<! - START RESERVED FOR FUTURE USE INCLUDE FILES - ><!-- include java script once we verify teams wants to use this and it will work on dbcs and cyrillic characters -> <! - END RESERVED FOR FUTURE USE INCLUDE FILES -> 5. Day-to-day operation
Version of management in a team development environment, some operations a developer to carry out almost every day, such as the submission of the modification work to update the local working copy, to resolve conflicts. The following describes in detail how to achieve these ECLIPSE day-to-day operations. Before carrying out these operations are required to establish a connection with the CVS server. ECLIPSE conducted in such operation, if it is to operate on the directory, it will automatically ECLIPSE subdirectories of the directory and file the same operation, the operation of the directory is recursively nested. In this paper, the following document on the operation only as an example, but these operations also apply to the directory. Generally, if a directory in a number of documents to the same operation, while relatively simple to choose the directory operation. In addition, if not specified, CVS resource library of documents referring to the HEAD branch is the main document.
Following the work of four different sub-scenes work on how to copy the changes will be reflected in the CVS Resource Library.
a. Check out the module in the local (Local) on the revised document, CVS resource library of documents has not changed.
Copy in the work of SimpleTest.java to make some changes and save, this time the screen ECLIPSE Figure 17. Changes to the document in its own directory before an arrow, in the hope that the document submitted by right-click, pop-up menu that appears, select the Team 】 【→】 【Commit ..., the dialog box that appears in the following Enter notes and click the OK button. While the Notes are not to be entered, but the best for each form submitted in the good habit of writing notes, which in the actual process of system development is necessary. After the success of a document submitted to the revision number will be automatically increased, 18 as shown in Figure, SimpleTest.java the revision number into a 1.2 from 1.1.
b. Check out the module in the project to build a new document in the hope that the new document will be additional resources to the CVS repository.
Documents in the new right-click, pop-up menu that appears, select 【Team】 【→】 Add to Version Control . It should be noted that: The above operation is not new to the CVS file additional resources, in order to document the new resources added to the CVS repository, but also do the following: in the new right-click the file, in the event of pop-up menu, select Team 】 【→】 【Commit ....
c. Check out the module in the project to delete the document, hoping that in the CVS Resource Library also delete the corresponding file.
First, delete the file in the project, and then delete the files in the parent directory on the right-click, pop-up menu that appears, select the Team 】 【→】 【Commit .... It is worth pointing out: The above operation will be deleted only the files removed from the main branch, but not from the CVS repository of resources have been completely deleted, and should not be from the CVS repository of resources have been completely deleted, as a label or branch may need to be deleted documents.
If you want to restore the deleted files in the Navigator view ECLIPSE selected documents deleted the parent directory, in the right menu, select Team 【】 → 【】 Restore from Repository ..., and then in the dialog box that appears, select the revised edition of hope from which to restore the contents of deleted files.
d. Check out the module in the local (Local) on the revised document, but prior to its submission, other developers have a file with a revised and submitted to the CVS repository of resources.
At this point, the resource base as a result of CVS in the revised version of the document number will be higher than the local amendments to the document version number, it will not be able to submit the file. If you try to submit the document, ECLIPSE an error dialog box will pop up, see Figure 19. In this case, in order to introduce bills to amend must first resolve the conflict. See the operation in detail to resolve the conflict.
Development environment in the group should be regularly submitted to the results of their work, but it can not be submitted. In general, the changes to be submitted to other developers not to obstruct the premise conditions. For example, the code should be compiled to be normal. If the development environment in the group also used the CHECKSTYLE such as code review tools, in addition to the submission of the code can be compiled outside of the normal, but also through the review of code review tools.
In the system development process, developers should not be concerned about their own development, but also as far as possible with other developers to keep pace, that is, the need for regular staff to the development of other development results to update the local copy of the work.
a. CVS resource library files are updated, but do not update the local file.
In the development group may be part of developers responsible for the development of a number of generic modules, and the rest of the developers are focused on the development of business systems. Development in this scene, the development of business systems on general-purpose module should be updated frequently to maintain the working copy of the common resource pool module with CVS in general synchronization module. Right-click the document in the event of the pop-up menu, select Team 】 【→】 【Update .... The contents of local files will be replaced by the corresponding resource library CVS document.
b. CVS documentation library resources have not been updated, but the local files are updated.
At this point, the local paper a revised version of its library resources with the CVS file the same revision number, update actually did anything.
c. CVS documentation library resources and local files are updated.
At this point, ECLIPSE will try to CVS content library resources into the local file. If the merger did not find the course of the conflict, then the merged file will contain local modifications and amendments to other developers; if the merger resulted in the course of the conflict, the ECLIPSE will focus on the merger documents show that part of conflict, and the original documents to make a backup. Figure 20 to 23 demonstrate the process. cvstest.txt document version 1.2 of the contents of the three lines were test line1, test line2, test line3. Jiangch users to modify the content of the document and save the structure in Figure 20, in jiangch prior to its submission, the user has cvsuser2 modify the content of the document and submit, at this time in the CVS Resource Library cvstest.txt the revision number of 1.3, see Figure 21.
The second line remains unchanged, but the conflict arising from the first, three lines were marked out. cvstest.txt also the revision number to 1.3 and in a modified state, the new documents produced. # cvstest.txt.1.2 is a revised version 1.2 of its backup file. Jiangch by hand will be changes with the merger of cvsuser2 can be submitted after the operation, and Figure 23 is a combined result of the author.
ECLIPSE operation for the CVS to provide a very useful function: simultaneously Perspective (Team Synchronizing Perspective). Simultaneous perspective, we can submit, update operations that may exist before the conflict was found. Development environment using the ECLIPSE Group of developers should be familiar with the simultaneous use of perspective. Figure 21 to 24, demonstrated how to use the synchronization perspective. Cvstest2.txt1.13 in cvstest.txt 1.6 and based on these two documents jiangch user modified and saved. At this point the results of Figure 24.
Consider the following scenarios: in the project, when completed, we hope for at this time the document state (snapshot) to establish a label milestone1. Modify the procedures in the follow-up process, if found in milestone1 version does not exist in the BUG, we can use the unified milestone1 logo to obtain a snapshot of the document and the revised document comparison, without the need for each file are the revision number in mind.
In ECLIPSE, there are two ways to establish a labeling module. Method 1. In the workplace to create copies of labels, projects on JAVA, JAVA perspective through the right-menu operation; Method 2. Resource library in the CVS view to create labels. Prior to the establishment of label, it is best to keep copies of the work of the synchronization and resource library. To Method 2 as an example, the resource library in the CVS view of the HEAD node label to select the modules to establish that, in the right menu, select Tag as Version ... 【】 , in the subsequent dialog box appears to add the label name can. Figure 29 is UnitTest module milestone1 and milestone2 established after the results of the two labels.
Tag revision number and document the relationship between the Figure 30. A label with each file revision number may be different, for example, the label 1, document A is a revised version of its 1.2, and document B is the revision number 1.3; with a revised version of the same document may belong to No. different labels, for example, the label 1 and label 2, the document B is a revised version of No. 1.3.
Check out from the labels of the module is static, even if the revised copy of the local paper can not be submitted to the resource library. In order to confirm this point, readers can check out the first node Versions of modules, making changes in the local resource base and then submitted to the CVS modifications. At this time there will be similar to Figure 31, the error message screen. Show that the documents submitted are labels milestone1, but not the branch milestone1 thus not be introduced.
Although the labels can easily manage multiple file revision number, but through the label to obtain copies of the document is static, can not be based on its revised and submitted. Therefore, it can not support the following concurrent development scene. Suppose a software company after a period of development, has released version 1.0 of product A. In order to further expand the product's market share in the 1.0 version was based on the further development of more powerful version 2.0. But the company also must be version 1.0 of product maintenance and support, if the user in the use of version 1.0 found the BUG, should be able to amend version 1.0 as soon as possible and publish the corresponding patch. In other words, developers should be amended in version 1.0 and version 2.0 of these two routes at the same time the development work. The establishment of a branch can support those requirements.
With the establishment of label similar to the establishment of branches in ECLIPSE are two ways. In this paper, resource library in the CVS view of the operation as an example demonstrate the process of establishing branches, and its steps are as follows:
1. Labeling method according to the establishment of the establishment of a new label, for example, v1_0.
2. Select a new label v1_0, in the right menu, select 【Add to Branch List ... 】 (not limited to new label v1_0, can operate in any label, but the establishment of branches should be carried out at a crucial moment).
3. In the resulting dialog box, type the branch, such as the importation of "UnitText1_0_X" and to determine at this time on the establishment of a branch. However, at this time the branch is empty, there is no associated resources.
4. Select a new label v1_0, in the right menu, select Tag with Existing ... 【】 , in the resulting dialog box and select Open Branches nodes in step 3, the newly created branch UnitText1_0_X, identify and press the OK button after the full establishment of a new branch of the CVS branch of built resource database after the view shown in Figure 32.
Now, you can branch from the main branch and UnitText1_0_X working copy respectively. Obtained from the main branch of the work submitted will be reflected in the copy to the main branch, the branch from UnitText1_0_X received copies of the work submitted will be reflected in the branch UnitText1_0_X, in the main branch and branches UnitText1_0_X can be complicated to carry out Independent development . The development of a combination of these scenes, the product A 1.0 version of the amended version of the corresponding branch UnitTest1_0_X, A 2.0 version of the product can continue to develop on the main branch.
6. 2.2 branch revision number
Branch of a revised version of its main branch in the revision number is slightly different, the main branch, branch and revision number of the relations can be used to illustrate Figure 33.
Figure 34 shows the document cvstest.txt the first time in UnitTest1_0_X branch revision number after the submission of the changes. Its revision number is not from "1.10" to "1.11", but into "126.96.36.199". If the document once submitted, the revision number will be transformed into "188.8.131.52". That is, changes in the last decimal figure.
2.1 The scene continues to develop products in the development of A 2.0 version of the 1.0 version at the same time also for maintenance. Developer A 1.0 version based on product feedback from users to amend a number of BUG, as a result of product A 2.0 version is also based on the continued development of version 1.0, they found that some of the BUG in the development of version 2.0 there. At this point, on the hope that version 1.0 changes the amendments to the main branch of the merger.
Figure 35-39 demonstrate the process of merging branch. UnitTest1_0_X after the establishment of a branch in the main branch and submit the amendments to cvstest.txt, the results shown in Figure 35.
UnitTest1_0_X check out a branch from a project (if the user jiangch or cvsuser2 the use of existing ECLIPSE, then check out items to choose 【】 Check Out As ... menu item and check to a different "UnitTest" name), cvstest.txt modify the document and submit the results shown in Figure 36. Figure 36 also can be seen, from the branches of the project check out the back of the name of the project will be marked with the name of a branch.
Choose the main branch of the work of copy cvstest.txt, in its right-menu, select Team 】 【→】 【Merge ... appeared dialog box shown in Figure 37. In the "want to be a branch of the merger or the label" input box "UnitTest1_0_X"; in the following "common-based version of" input box "v1_0", its significance for the origin of branch version (see the establishment of branches of the steps in this article 3 and Step 4).
In Figure 37, click "Finish" button, there will be simultaneous perspective. If you want to branch in the second line of the contents of the documents to the main branch of the merger, just contrast it from the copy editor to the second column the first column, and then right in the file menu, select Mark as Merged 】 【 (see Figure 38), and finally in the right file menu, select Commit 】 【 .
hibernate lock mechanism 1. Pessimistic lock It refers to the modification of data by outsiders hold a conservative attitude. The assumption that at any time access to data, may also have another client to access the same data, in order to maintain t ...
Private http://www.lifevv.com/tenyo/doc/20070605102040991.html c3p0 for open source's JDBC connection pool, with the release hibernate. This article describes how to use the hibernate configuration in c3p0. c3p0 connection pool configuration is v ...
Hibernate in the configuration file: <properties> <property name="hibernate.hbm2ddl.auto" value="create" /> </ properties> Parameter Description: validate load hibernate, the authentication to create a database t ...
Build flex + spring + blazeds + hibernate application First, set up the project blazeds 1, will blazeds.war extract to a directory, such as: myflex /; 2, set up java works were such as: MyFlex, in the orientation of selection create project from exis ...
Hibernate cache: 2-bit cache, also known as process-level cache or SessionFactory level cache, secondary cache can be shared by all of the session Cache configuration and the use of: Will echcache.xml (the document code in hibernate package directory ...
hibernate Lazy strategy can be used in: <class> tag, it can be true / false Tags can <PROPERTY> values true / false type of necessary tools to enhance <set> <list> can tag values true / false / extra <many-to-one> <on ...