This article is the third of the GC expert series. In the first understanding of Java garbage Collection, we learned several different GC algorithm processing processes, the way GC works, the difference between the new generation and the old age. So, you should have known about the 5 GC types in JDK 7, and the performance impact of each GC.The second monitoring of Java garbage collection describes how the J
Lambda best practices in Java 8 (1)
Java 8 has been launched for some time. More and more developers choose to upgrade JDK. The hot news shows that JDK 7 is the most popular, followed by JDK 6 and 8. This is a good thing!
In 8, Lambda is the most popular topic, not only because of changes in syntax, but more importantly, it brings the idea of functional programm
recycled by GC because they are circular references to each other.2. Root Search algorithmA series of objects named "GC Roots" are used as starting points from which to search down, and when you reach objects that are not on the GC Roots reference chain, even if they are related to each other, they are still considered recyclable objects.Using the theory of graph theory, can be expressed as GC roots to the object unreachable .3. Better understanding of "references"In
The first part walks into Java one, into Java1. OverviewJava is widely used in embedded systems, mobile terminals, enterprise servers, mainframe and other occasions, to get rid of the constraints of the hardware platform, to achieve the "write once, run everywhere" ideal2. Java Technology Architecture According to the function to divideIncludes the following components:
1. Preface
Java application is a very common problem, how to read the Jar/war package and the path of the configuration file, different people according to different practices summed up the different scenarios, but others application will be due to the environment and other differences to find a variety of problems, this article from the principle of interpretation of best practice.
2. Referen
Java multi-thread programming practices-general Linux technology-Linux programming and kernel information. The following is a detailed description. Java 5 adds a new class library concurrency set Java. util. concurrent, which provides a wide range of API multi-threaded programming for concurrent programs, making
StringBuilder instead of string objects at the right time, single-threaded using StringBuilder, stringbuffer in multithreaded situations.
Allocate StringBuffer, arrays, array,vector and other capacities in advanceFor objects that need to be allocated continuously, it is better to allocate the capacity ahead of time, generally the default initial capacity is relatively small, such as the capacity of StringBuffer is only 16, if the default capacity is easy to reallocate after the full capacity
Java multi-thread programming practices
Multithreading in Java programs is much easier to use than C or C ++, because the Java programming language provides language-level support. This article uses simple programming examples to illustrate how intuitive multithreading is in Java
Writing concurrent code is more difficult, although the Java language provides a lot of synchronization and concurrency support, but ultimately it takes a person's diligence and expertise to write Java concurrency code without bugs. Java multithreaded concurrency best practices are a good set of practical ideas that he
Eclipselink and Hibernate, as follows: Eclipselink
q.sethint ("Eclipselink. Jdbc_fetch_size "," 100000 ");
Hibernate
@BatchSize
//Query here ...
Also, you can set paging-related settings for query: Query q = em.createnamedquery ("SelectAll");
Query.setfirstresult (101);
Query.setmaxresults (+);
list This will allow the data to be obtained from the 101th to No. 200 section only. At the same time, the above uses a named query (Named query,createnamedquery ()) instead of a temporary query (Ad-ho
Java Database performance Best Practices
Spend time evaluating the bestJDBC driverfor the application.
The best driver would often vary depending on the specific deploy ment. The same application is better with one JDBC driver in one deployment and a different JDBC driver in a differ ENT deployment.
If There is a choice,avoid ODBC and type 1 JDBC Dr Ivers.
J
factor, ebay refers to the existing application porting and training developers in the implementation of YA Xu carefully considered.?? The characteristics of the SOA platform for a basic large-scale application mentioned above, and for a more complete SOA platform, the author believes that there are also the following points:
Support cluster environment: Software load Balancing, service interface or method level routing strategy, etc.
Perfect service governance: including dependenc
the parent delegation model, where a classloader receives a request for class loading, is first delegated to the parent ClassLoader to complete, all load requests are routed to the top-level startup ClassLoader, and if the parent ClassLoader feedback fails to complete the load request, it continues to be loaded by the subclass.The benefit of this load is that the Java class has a hierarchical relationship with precedence over its classloader, avoidin
(); } The above task contains an application for an external class instance, which will cause the reference to not be reclaimed by the GC immediately. Because the timer will remain TimerTask is released after a specified time. Therefore, the external class instance corresponding to the task will be reclaimed after 5 minutes. The correct wording: Timertasktask=newjob (this); timer.schedule (task,300000l); Try{dosomething (); }finally {task.cancel ();} staticclassJobextendsTimerTask{ privateMyCla
Introduction: Traditional Java EE applications typically use some kind of MVC framework (for example, Struts) as a front-end user interface, with the advent of Flex, RIA-based clients can bring users cooler interfaces, shorter response times, and closer to the experience of desktop applications. This article will describe how to integrate Flex into an existing Java EE application, and how to apply best
PHP core technology and best practices PHP uses PHPRPC protocol to call JAVA class
SOAP (Simple Object Access Protocol, Simple Object Access Protocol) with the continuous competition and design of manufacturers, and because the transfer of objects cannot achieve interoperability, SOAP gradually changes to the transfer of strings, and is finally designed as the XML-based WebService.
PHPRPC protocol: it
Java Web concurrency: for update practices, monitoring and solving ., Javawebupdate
Writer: BYSocket)
Weibo: BYSocket
Douban: BYSocket
I. Preface
We have been talking about concurrency. At present, there are two common practices: Lock Mechanism: 1. pessimistic lock; 2. Optimistic lock.
However, this article is mainly used to record my processing experience. In ad
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.