forge/core — pull request #223 by fiorenzino (2012-09-29 23:12:19+00:00)
Title: FORGE-610

Hi George,

i hope to have correctly followed your suggestions.

summary of changes:

1) Rename it to EJBType (better consistency with other EJB artifacts) : OK
2) Shouldn't the default value be STATELESS (upper cased) ? defaultValue: OK
3) Call it "named". Check the EntityPlugin : OK
4) Be sure to name your commit with the JIRA issue number also
5) Do you really need to throw an exception here ? How do I change a transaction attribute in a method using this plugin ? : OK
6) Remove all System.out.println lines (IN TESTS) : OK
7) What if I don't specify a package ? The method signature says it's not required. Add a test to that : OK
---- like entity plugin i use default package
8) Shouldn't this option be required ? now the option is not required - with prompt we request a package value or we use default project package
9) Minor change: use == instead of equals. : OK
10) Is this resource a method when this else block is reached ? OK - Corrected
11) shell.setCurrentResource(resource); should be used instead ? OK
12) Missing license header. Check the other files as well : OK
13) Remove this enum class (TransactionAttributeType.java) : OK
14) Unnecessary line : OK
15) I must be wrong, but I guess the imports are already added. : OK removed
16) It would be better if you could simply prompt for overwrite confirmation : OK
17) Missing License Header (EJBPluginTest.java) : OK
18) EjbType.java - The header license has changed since 1.0.6.Final. Check the other files for an example : OK
19) Make it private and non-static : OK
20: BTW, you could just set the type, without throwing any error instead, WDYT ? : OK
21) This is wrong. It should test for the TransactionAttribute annotation, not TransactionAttributeType : OK
22) Enum values should be upper cased (JmsDestinationType.java) : OK
23) This option should be split into two options (package and name) : OK
24) Do we really need this enum ? You can use the TransactionAttributeType annotation directly in your plugin : OK REMOVED
25) Enum values should be uppercased (/EjbType.java) : OK
26) I don't think this really works right now, but leave it there (EJBPlugin.java - @RequiresResource({ JavaResource.class, JavaMethodResource.class })): IT WORKS
27) Remove this commented code ( ejb.addAnnotation(EjbType.messagedriven.getAnnotation()) > + // .setLiteralValue("name", "testName"); : OK REMOVED