In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly analyzes the relevant knowledge points of how to understand J2EE and Java Learning Path, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor to have a look, and follow the editor to learn more about "how to understand J2EE and Java Learning Path".
J2EE programming
First of all, be sure to learn that JNDI,JNDI is an App Server location server resource (EJB component, Datasouce,JMS) search method, if you are not familiar with JNDI, EJB,JMS these things can hardly be learned. JNDI is actually the javax.naming.* package, which is easy to use. The difficulty lies in the configuration of server resource files. For the configuration of server resource files, you need to look at the special documentation specifications, such as web.xml writing, ejb-jar.xml writing, and so on. For each different App Server, you also need to be familiar with your own service resource profile.
You can then learn about JTA, mainly to understand how JTA controls transactions and where to use JTA. Here can be a simple example, we know that generally for a database connection transaction control (conn.setAutoCommit (false),...., conn.commit ()), as an atomic operation, but suppose my business requirement is to take the operation of two different databases as an atomic operation, can you do it? At this time, we can only use JTA. Assuming that the operation process is to insert a record into database A, and then delete another record in database B, we cannot control the whole operation as an atomic operation by writing our own code. In the case of JTA, the control is done by App Server.
Before learning EJB, you should learn that object serialization and RMI,RMI are the foundation of EJB. Then learn about JMS and EJB. For EJB, the most important thing is to understand how EJB uses RMI to make calls to remote objects, and when to use EJB.
After learning EJB,JMS, you may realize that you can't wait to learn knowledge in two areas, one is UML, the other is Design Pattern. The design of Java enterprise software attaches great importance to the design of framework (Framework). A good software framework is a necessary condition for successful software development. At this time, we should start to focus on the learning of design patterns and frameworks, and master the design patterns of EJB and the core patterns of J2EE through learning and practical programming experience.
In the J2EE specification, there are many enterprise technologies besides EJB,JMS,JTA,Servlet/JSP,JDBC, which will not be introduced here.
There is also a new field, Web Services. Web Services has nothing new at all. It is like a glue that unifies different services to provide a unified calling interface. As a consumer, I just need to get the WSDL (description of the service) given to me by the service provider. I have no idea whether the service provided by the server provider is an EJB component, a .net component, a CORBA component, or some other implementation. I don't need to know. The greatest thing about Web Services is that it realizes the sharing of the whole Internet service through a unified way of service provision and invocation, which is a very exciting technical field. Web Services doesn't seem to have any good books yet, but you can learn it by looking up information on the Internet.
Java Learning Path
Java as a programming language, the best way to learn is to write code. When you learn a class, you can write a simple example program to run it, see what the results are, and then call a few more class methods to see the running results. This is very intuitive to learn the class, and the memory is very deep. Then should not be satisfied with the code, you should think about if I do not write this, another way, try again. Remember which master said that learning programming is a destructive process, put the examples in the book, learn the examples written by Documentation in the run through, constantly try to use different methods to achieve, keep trying to destroy the structure of the code, see what the result will be. In this way, you will be thoroughly and proficient in Java.
For example, we all made up Hello World.
Public class HelloWorld {
Public static void main (String [] args) {
System.out.println ("Hello World")
}
}
Many beginners do not quite understand why the main method must define public static void main (String [] args) in this way, can it not be written in this way? Including when I first studied Java, I also had such questions. Do you want to know the answer? It is very simple, you change the name of main to run, see what errors are reported, and then analyze them according to the error messages; remove the public of main and try to see what errors are reported; whether the static can still be run without static; do not know whether the main method must pass a String [] array, change String [] to int [], or try String. If you don't know if you have to write the name of the args parameter, you can change the args to another name to see what the result is.
That's what I did when I learned Java. I changed the Hello World program seven or eight times, ran it over and over again, analyzed the results, and finally completely understood why the main method was defined in this way.
In addition, at the beginning, I didn't know much about staic,public,private,Exception,try {} catch {} finally {} and so on. I ran the examples in the reference book successfully, and then I began to destroy it, constantly rewriting the program according to the questions in my heart, to see if it could run, what it would look like, and whether I could get the expected results. This takes time, but after an example program is destroyed several times like this. I have thoroughly learned the relevant knowledge. Sometimes even deliberately write some wrong code to run to see if you can get the expected run error. In this way, the grasp of programming is very profound.
It is particularly worth mentioning that JDK has a great debugging feature,-verbose
Java? Cverbose
Javac? Cverbose and many other JDK tools have this option
-verbose can show where the Class is loaded by JVM during the execution of the command. Through this valuable debugging information, it can help us to analyze what JVM has done in the process of execution.
In addition, in the process of learning, many of these destructive routines should be consciously preserved, and the typical routines accumulated in the work should be sorted out regularly. Over time, I have a code base. If you encounter similar problems, just go to Copy & Paste, Search & Replace in the code base, which greatly improves the speed of development. Ideally, some general routines are abstracted by themselves to form a general class library and encapsulated. Then the reusability is even stronger.
This is the end of the introduction on "how to understand J2EE and Java Learning Path". More related content can be searched for previous articles, hoping to help you answer questions and questions, please support the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.