Sorry, my cody is at my business, no access at home, giving examples:
| @Stateful
| @Name("someComponent")
| public class someComponent implements SomeComponentLocalInterface {
|
| @Logger private Log log
|
| @Observer("myEvent")
| public void checkSomething(Some some) {
| throw new RuntimeException("Exception"); // no effect on jboss/seam
| /*
| try {
| throw new RuntimeException("Exception"); // works
| } catch (RuntimeException e) {
| log.degub("Error", e);
| }
| */
| }
|
| public void someMethod() {
| Events.instance().raiseAsynchroniousEvent("myEvent", new Some());
| }
| }
|
Code for the missing Seam Component Exception like:
|
| @Stateful
| @Name("someComponent")
| public class SomeComponent implements SomeComponentLocalInterface {
|
| @Logger private Log log
| @In(create = true) private MyComponentLocalInterface myComponent
|
| @Observer("myEvent")
| public void checkSomething(Some some) {
| log.debug(myComponent.toString); // never executes
| }
|
| public void someMethod() {
| Events.instance().raiseAsynchroniousEvent("myEvent", new Some());
| }
| }
|
| @Stateful
| @Name("myCmponent") // Spell Error
| public class MyComponent implements MyComponentLocalInterface {
| }
|
|
Ok, @Destroy method is missing, but my components at business do have them.
So, first code does not show the thrown RuntimeException, second code sould
have shown an Seam Exception that component could not be found...
Hope this helps, thanks in advance
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074183#4074183
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074183
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user