[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
14 years, 2 months
[JBoss JIRA] Created: (JBIDE-5084) Hibernate 3.0 XML Editor - NPE
by Vitali Yemialyanchyk (JIRA)
Hibernate 3.0 XML Editor - NPE
------------------------------
Key: JBIDE-5084
URL: https://jira.jboss.org/jira/browse/JBIDE-5084
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: common, Hibernate
Affects Versions: 3.1.0.M4, 3.1.0.CR1
Reporter: Vitali Yemialyanchyk
Assignee: Viacheslav Kabanovich
java.lang.NullPointerException
at org.jboss.tools.common.editor.TreeFormPage.initialize(TreeFormPage.java:142)
at org.jboss.tools.hibernate.ui.xml.editor.HibConfig3CompoundEditor.doCreatePages(HibConfig3CompoundEditor.java:34)
at org.jboss.tools.common.editor.ObjectMultiPageEditor.createPages(ObjectMultiPageEditor.java:235)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
--
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
14 years, 2 months