[forge-dev] ejb plugin: is ready to be seen!

Lincoln Baxter, III lincolnbaxter at gmail.com
Thu Sep 20 18:34:57 EDT 2012


Hey Fiorenzo!

I've FINALLY had a chance to take a look at this. It looks great! One
comment about your tests though :)

You do a lot of this:
`assertTrue(content.contains("javax.ejb.TransactionAttributeType"));`

Instead, however, you should probably call:

`javaSource.hasImport("javax.ejb.TransactionAttributeType")`

and

javaSource.hasAnnotation("javax.ejb.TransactionAttribute");

instead of doing string comparisons.

Otherwise, though, this looks awesome! Does your plugin help with
configuring @MessageDriven beans to actually connect to a JMS queue? Just a
thought maybe for the next version :)

~Lincoln


On Wed, Sep 12, 2012 at 7:25 PM, JFlower <fiorenzino at gmail.com> wrote:

> Hi Lincoln,
>
> my ejb plugin is ready to meet your eyes:
>
> https://github.com/fiorenzino/core/tree/FORGE-610/javaee-impl/src/main/java/org/jboss/forge/spec/javaee/ejb
>
> initial test:
>
> https://github.com/fiorenzino/core/blob/FORGE-610/javaee-impl/src/test/java/org/jboss/forge/spec/ejb/EJBPluginTest.java
>
> i need to do some works before close:
> - add more tests (for all functionality)
> - add more parameters on mdb configuration
> - add clusterable annotation
> - add transaction on methods
> - permit undo/change (revert/change configuration)
>
> *I'm waiting for your comments on my slow work (..unfortunately my free
> time is limited...)*
> *
> *
> bye
>
> fiorenzo
>
>
> PS: the fucked Mdb annotation at end was:
>
> javaClass.addImport(ActivationConfigProperty.class);
> javaClass.addImport(MessageDriven.class);
> javaClass.addImport(Message.class);
> javaClass.addInterface(MessageListener.class);
> javaClass.addMethod("public void onMessage(Message message) {}");
> javaClass.addAnnotation(javaClassType.MESSAGEDRIVEN.getAnnotation())
>  .setLiteralValue("name", "\"" + name + "\"")
> .setLiteralValue("activationConfig",
>  "{@ActivationConfigProperty(propertyName = \"destinationType\",
> propertyValue = \""+ destinationType+ "\"), " +
>  "@ActivationConfigProperty(propertyName = \"destination\", propertyValue
> = \""+ destinationName + "\")" + "}");
>
>
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
>
>


-- 
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20120920/32328cbf/attachment.html 


More information about the forge-dev mailing list