JAVA

You are currently browsing the archive for the JAVA category.

I’m just starting the development of applications using Java Persistence API (JPA). In fact, the most challenging thing comes up to me at my start, the compatibility of IDE.

JPA is co-developed by the team of JavaEE 5 Specification Group, as a replacement to the heavy-weighted Entity bean. Until now, there are limited IDE that supports the development of JavaEE, especially EJB 3.0. Two of them are Sun Netbeans and Oracle JDeveloper. Both of them are free, but not open-sourced IDEs.

I personally use Eclipse as my primary development tool, thus quite familiar with the functionalities within. However, Eclipse for now just provides a plugin project named “Dali” for the development of Java Persistence. However, Dali have lots of bugs and seems suspended from Aug, 2006. That’s why it’s not a good choice to use.

Instead, in order to develop JPA easily and still use Eclipse as my major platform, I have the following methods.

  1. Develop JPA related things in Netbeans, including the Entity itself and the configuration of persistence.xml file
  2. Export those Entities and required settings to JAR file using Ant Script
  3. Import the JAR file and other required libraries into Eclipse
  4. In Eclipse, just like developing usual applications, and for the persistence part, call the methods of Entity.

This is not a very good method, since there are so many troubles in between. But at least, it helps me to do more with JPA easily

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

Eclipse Profiler

Is there a good method to analyze a large amount of code, by providing a flatten, simple and clear diagram, telling you the relationship of classes and the call stack, also the ad-hoc status of each particular object? Eclipse Profiler may be one of the tools.

There is recently an article on TheServerSide introducing this free plugin of Eclipse. Go and take a look:

Code Analysis with the Eclipse Profiler by Peter Dawson

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

I have finished a previous online course on AJAX, my name is already shown in the Graduate List. I am one of the two persons from Hong Kong. Find me inside:

http://www.javapassion.com/ajaxcodecamp/graduates.html

Anyway, just a chance for me to explore AJAX, not yet to be in development use.

This time, I joined another online course talking about JavaEE. Actually I want to look at the EJB part, which gives me more examples in the new EJB3 era. My short period target is to manipulate EJB 3 well, at least produce some small projects using it. EJB is a fantastic technology which I believe it will be useful for me in the future.

Go to the JavaEE Programming Website and take a look

http://www.javapassion.com/j2ee/index.html

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

SCBCD 5.0 Beta Exam Review

Just took the Beta Exam today, it’s really a nightmare. Since it is a beta exam, I guess Sun want to deliver all the questions it has to the tester and evaluate the question difficulties and degree of appropriate.

The exam I took lasts for 5 hours, with 180 questions within. Compared to the current SCBCD for J2EE 1.3 edition, which has only 70 questions working in 2 hours, the Beta exam is really a nightmare.

Back to the content of the exam, this new edition includes many new concepts of EJB 3.0, especially the topics of Java Persistence API and Annotations, which are the core components of EJB 3.0.

The questions are mainly multiple choices, which it will specify clearly whether you should select one, two… four answers. The testing program will warn you if you select more answers than expected. Besides multiple choices, there are also drag and drop questions included, which is not included in the previous version. For drag and drop questions, you will be prompted a new window, confirmed you answer by closing the prompted window. Be careful, the answer will lose if you open this prompted window again, so answer carefully on the first time you handle these questions.

I did a simple statistics on the distribution of question types, some of the questions may include knowledges from more than one question type.

Session Bean (45 out of 180, or 25%)
Message-Driven Bean (19 out of 180, or 11%)
Java Persistance API (70 out of 180, or 39%)
Transaction (36 out of 180, or 20%)
Others (35 out of 180, or 19%)

It is suprisingly to me that Transaction occupies such a big proportion in the exam, which 20% of the questions are related. This may be due to that the use of Transaction can be applied on any Enterprise Bean and Connection Type, also the many variations of transaction types.

Besides, for Session Bean, the major questions are about the use of relevant Annotations for defining the bean type, using dependency injection and constructing references to other session beans.

For Message-Driven Bean, it simply contains the logic on how it works. A few questions also talk about the combined use with Timer Service.

For Java Persistence API, since it’s a new concept to EJB, many fundamental questions will be asked. From the use of annotations to define Entity and Relationships, to the syntax of EJB-QL on querying the database, they all are asked in the exam.

For the remaining part categorized as Others, about one-third of the questions are related to the security issue on the beans, with the use of roles both by annotations or XML descriptors. Other questions include the handling of exceptions, interceptors, etc.

In conclusion, this exam provides a good platform on the new standard EJB 3.0. As the functionalities equipped with EJB 3.0 will greatly helps the development of EJB, I believe this exam must be popular in the coming future. Even I believed I did not do well in today’s exam, I will anyway retake it and get certified after this is officially published.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

There is a book named “Mastering EJB 3.0″

In Chapter 13 of the book, it introduces their ideas for desigining “When to Use EJB” in the following design situations.

- Remoting is required
- Distributed transactions are required
- Component-security is required
- Persistence is required
- Integration with legacy applications is required
- Scalability is required

Reference:
Free Book: Mastering Enterprise JavaBeans 3.0
http://www.theserverside.com/tt/books/wiley/masteringEJB3/index.tss

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

As I passed SCJP, my next step shall be something about JavaEE. In fact, when I read those books, I found the exam version is quite old. For EJB, it still resides in EJB2.1 of J2EE 1.3. It’s very very old and actually not easy for development.

I would prefer the new version EJB3, with a fantastic development environment by the use of annotation. Then I look of the release date of the new version exam on EJB3.

While I’m doing the search, I got the following information, which Sun is inviting Java developers to help shape the EJB3 exam. That’s why I join it.

Even I am a newbie in EJB3, but it’s free. So I still joined it, and if I’m lucky and passed this exam, I will get the SCBCD directly. So good.

The details are as follow:

[Reference: http://www.sun.com/training/certification/java/beta_scbcd.xml

FREE: Sun Certified Business Component Developer 5.0 Beta Exam

Are you a developer who is responsible for designing and implementing applications using Enterprise JavaBeans 3.0? If so, this is your opportunity to get involved in the creation of the Sun Certified Business Component Developer (SCBCD) 5.0 exam!!!!!

»   Beta Dates: December 8, 2006 – January 2, 2007
»   Registration Start Date: November 24, 2006
»   Beta Exam Number: 311-091

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

SCJP Exam Result

Yeah!! I have successfully passed the SCJP exam on last Saturday. It’s not as difficult as I think, perhaps that’s the reason for the mock exam.

I got 62 questions correct out of 72, which scored me 86%. I accepted this score in terms of doing an exam on Java 5. It’s lucky already because many skills like Generics, I even didn’t write a system on it.

In order to pass the exam, I will also leave some hints. I got two books, which was introduced here before. Work on the mock exam questions will be very useful, since I can find at least twenty questions in the real exam which are exactly the same as the mock questions.

For the next step, I may plan to study on either SCWCD or SCBCD. In fact, I do want to know more about EJB at this moment, especially the new EJB 3.0 specification. As it provides a brand new framework that allows developers to work on really the business logic. They need not to care about the codes like implementing SessinoBean and EntityBean anymore. The development becomes more reflective and easy.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

SCJP Exam

Finally, I have booked the SCJP exam to be on the coming Saturday in Hong Kong. It is the first public IT exam for me. I’m very nervous now, since I think my knowledge is not enough yet.

The exam for SCJP 5.0 really gets a lot harder than previous version. It contains many new topics. In fact, the major reason that I think it is difficult is due to lack of programming. After I entered the current job, most of my office hours are dealing with documents and documents. I seldom have time and chance to work on programming. This makes me less practice on JAVA. Thus, to be a good programmer, do more programme!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

SCJP Study Guide

I have just bought another book for the preparation of SCJP 5.0. Actually the topics covered in this new exam is quite a lot. When I tried the mock exam before, I just got a low mark. Compared to my result when I was studying in University, it’s really a big gap.

That’s why I decided to buy some more teaching materials, which helps me to learn more. The book I bought named as “Sun Certified Programmer for Java 5 Study Guide”, my version is a Chinese one. It is a recommendation from many of the web users who took the SCJP exam. Hope I can finish the book shortly and take the SCJP exam.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

Quoted from:
http://www-128.ibm.com/developerworks/xml/library/x-injava/

The different Java XML document models all have some areas of strength, but from the performance standpoint there are some clear winners.

XPP is the performance leader in most respects. For middleware-type applications that do not require validation, entities, processing instructions, or comments, XPP looks to be an excellent choice despite its newness. This is especially true for applications running as browser applets or in limited memory environments.

dom4j doesn’t have the sheer speed of XPP, but it does provide very good performance with a much more standardized and fully functional implementation, including built-in support for SAX2, DOM, and even XPath. Xerces DOM (with deferred node creation) also does well on most performance measurements, though it suffers on small files and Java serialization. For general XML handling, both dom4j and Xerces DOM are probably good choices, with the preference between the two determined by whether you consider Java-specific features or cross-language compatibility more important.

JDOM and Crimson DOM consistently rank poorly on the performance tests. Crimson DOM may still be worth using in the case of small documents, where Xerces does poorly. JDOM doesn’t really have anything to recommend it from the performance standpoint, though the developers have said they intend to focus on performance before the official release. However, it’ll probably be difficult for JDOM to match the performance of the other models without some restructuring of the API.

EXML is very small (in jar file size) and does well in some of the performance tests. Even with the advantage of deleting isolated whitespace content, though, EXML does not match XPP performance. Unless you need one of the features EXML supports but that XPP lacks, XPP is probably a better choice in limited-memory environments.

Currently none of the models can offer good performance for Java serialization, though dom4j does the best. If you need to transfer a document representation between programs, generally your best alternative is to write the document out as text and parse it back in to reconstruct the representation. Custom serialization formats may offer a better alternative in the future.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

« Older entries § Newer entries »

 

November 2008
S M T W T F S
« May    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Categories