|

Thursday March 09, 2006
Java EE 5 verification in Netbeans 5.5
I can eventually show off with a self-implemented piece of NB functionality: Java EE 5 Verification - a framework for finding & solving problems in Java code that uses EJB 3.0, Persistence API and JAX-WS 2.0 annotations. Similary to java syntax errors, the JEE 5 problems are detected and highlighted as you type.
There are 'quick-fix actions' (hints) available for many of them. Just as in case of ordinary java errors, those actions can be accessed by clicking the bulb icon that pops up when the cursor position is within the line that contains error.
Together with advanced code completion, online help and wizards this facility should make NetBeans 5.5 a terrific learning tool for folks starting up with Java EE 5.
Assertions implemented as of build 'release55_20060309':
Persistence API (JSR 220)
| Assertion | Hints |
| InconsistentAccessTypeInEntity | Unify property access, Unify property access |
| EntityHasNoSuitableAccessor | Encapsulate field... |
| Missing Enity ID | Create Entity ID... |
| EntityHasPublicField (warning) | |
| FinalClassAsEntity | |
| NonPublicClassAsEntity | |
| FinalMemberInEntity | |
| NoSuitableConstructorInEntity | |
| SetterMethodsAnnotatedInEntity | Move persistence annotations from setter to getter |
| InvisiblePropertyAccessorInEntity | |
JAX-WS 2.0
| Assertion | Hints |
| the serviceName attribute is not allowed on interfaces | Remove serviceName attribute |
| the endpointInterface attribute is not allowed on interfaces | Remove serviceName attribute |
| it is not possible to annotate a method with the @Oneway annotation without corresponding @WebMethod annotation | Add @WebMethod annotation, Remove @Oneway annotation |
| an operation marked @Oneway may not have a return value | Remove @Oneway annotation |
| an operation marked @Oneway may not have out/in-out parameters | Remove @Oneway annotation |
| an operation marked @Oneway must not declare any exceptions | Remove @Oneway annotation |
| it is not allowed to combine @HandlerChain annotation with @SOAPMessageHandlers annotation | Remove @HandlerChain annotation, Remove @SOAPMessageHandlers annotation |
None of the EJB3-specific checks has been implemented so far, however the final list of assertions and hints in all the three areas is to be substantially expanded by the final NB 5.5 release.
Posted by tomslot
( Mar 09 2006, 07:55:40 PM CET )
Permalink
|