[JBoss JIRA] Created: (JBIDE-3136) New decorator from existing Web Bean
by Dan Allen (JIRA)
New decorator from existing Web Bean
------------------------------------
Key: JBIDE-3136
URL: https://jira.jboss.org/jira/browse/JBIDE-3136
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: webbeans
Reporter: Dan Allen
Fix For: LATER
Suppose we have an interface that represents accounts:
public interface Account {
public BigDecimal getBalance();
public User getOwner();
public void withdraw(BigDecimal amount);
public void deposit(BigDecimal amount);
}
A decorator is a simple Web Bean that implements the type it decorates and is annotated @Decorator.
@Decorator
public abstract class LargeTransactionDecorator
implements Account {
@Decorates Account account;
@PersistenceContext EntityManager em;
public void withdraw(BigDecimal amount) {
account.withdraw(amount);
if ( amount.compareTo(LARGE_AMOUNT)>0 ) {
em.persist( new LoggedWithdrawl(amount) );
}
}
public void deposit(BigDecimal amount);
account.deposit(amount);
if ( amount.compareTo(LARGE_AMOUNT)>0 ) {
em.persist( new LoggedDeposit(amount) );
}
}
}
The tooling would not only help you create the class that acts as the decorator, but make sure that it implements the same interfaces as the Web Beans and injects the Web Bean into a @Decorate field.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (RHDS-120) java.lang.NullPointerException when try to save empty value in web.xml Editor.
by Anton Klimkovich (JIRA)
java.lang.NullPointerException when try to save empty value in web.xml Editor.
------------------------------------------------------------------------------
Key: RHDS-120
URL: http://jira.jboss.com/jira/browse/RHDS-120
Project: Red Hat Developer Studio
Issue Type: Bug
Affects Versions: 1.0.0.beta1
Reporter: Anton Klimkovich
Open web.xml on tree tab
Right ckick on Error Pages for example
Set Error-Code and location
On Tree tab in web.xml Editor clear field with Error-Code
Try to save file.
java.lang.NullPointerException
at org.eclipse.jst.j2ee.model.internal.validation.WarValidator.validateErrorPages(WarValidator.java:693)
at org.eclipse.jst.j2ee.model.internal.validation.WarValidator.validate(WarValidator.java:251)
at org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator.validate(UIWarValidator.java:95)
at org.eclipse.jst.j2ee.model.internal.validation.WarValidator.validateInJob(WarValidator.java:329)
at org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator.validateInJob(UIWarValidator.java:111)
at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:75)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
org.eclipse.wst.validation.internal.core.ValidationException: CHKJ3000E: WAR Validation Failed: java.lang.NullPointerException
at org.eclipse.jst.j2ee.model.internal.validation.WarValidator.validateInJob(WarValidator.java:343)
at org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator.validateInJob(UIWarValidator.java:111)
at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:75)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months