Anonymous | Login | Signup for a new account | 12-17-2024 10:43 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0004406 | [Resin] | major | always | 02-24-11 10:51 | 04-29-11 14:48 | ||||
Reporter | rickHigh | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 4.0.18 | Product Version | |||||
Product Build | |||||||||
Summary | 0004406: Decorator from Weld Sample App does not work in CANDI | ||||||||
Description | FloodingDecorator does not work from WELD pastbin example. | ||||||||
Steps To Reproduce | |||||||||
Additional Information |
Note that... @Local public interface CodeFragmentManager FloodingDecorator decorates CodeFragmentManager which is a local interface (EJB @Local) not an actual implementation. It seems to me that somehow our EJB engine is not recognizing the EJBs in this project as EJBs. It could be that this sample app is non-standard wrt to EJB, but further investigation is in order. After disabling the decorator, the app seems to run. The exact error message is: [23:54:59.328] {http://*:8080-2} [^] javax.enterprise.inject.InjectionException: DownloadServlet.codeFragmentManager: Exception while creating public org.jboss.weld.examples.pastecode.session.FloodingDecorator() Here is the code for FloodingDecorator package org.jboss.weld.examples.pastecode.session; import java.io.Serializable; import javax.decorator.Decorator; import javax.decorator.Delegate; import javax.inject.Inject; import org.jboss.weld.examples.pastecode.model.CodeFragment; /** * Prohibit posting more than 2 fragments a minute * * @author Pete Muir * */ @Decorator public abstract class FloodingDecorator implements CodeFragmentManager, Serializable { private static final long serialVersionUID = -4615837206290420112L; @Inject @Delegate private CodeFragmentManager codeFragmentManager; @Inject private PostTracker postTracker; public String addCodeFragment(CodeFragment code, boolean privateFragment) { // Check if we are allowed to post if (postTracker.isNewPostAllowed()) { postTracker.addPost(); return codeFragmentManager.addCodeFragment(code, privateFragment); } else { throw new IllegalStateException("You've posted more than 2 fragments in the last 20s. No flooding allowed!"); } } } Note that... @Local public interface CodeFragmentManager |
||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed. 28 unique queries executed. |