[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1918) Asyncronous methods called from an asyncronously executing methoed will not be invoke asyncronously
by Chris Rudd (JIRA)
Asyncronous methods called from an asyncronously executing methoed will not be invoke asyncronously
---------------------------------------------------------------------------------------------------
Key: JBSEAM-1918
URL: http://jira.jboss.com/jira/browse/JBSEAM-1918
Project: JBoss Seam
Issue Type: Bug
Components: Async
Affects Versions: 2.0.0.BETA1
Reporter: Chris Rudd
Currently the AsyncronousInterceptor triggers off of
Contexts.getEventContext().isSet(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL)
to determine if this invocation was from the asyncronous dispatcher. This works fine, except under the conditions where the asyncronously executed method calls another @asyncronous methd. In that case the Event context alreadt contains the AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL marked and the execution is done immedialty instead of being scheduled.
I belive a simple resolution would be to have the AsyncronousInterceptor clear the AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL before proceeding with the exection, but should only be done if the method in question is an @Asycnronous method. This would be to elimiate possible removal from other components that are called during the process of invoking the asyncronous method (ie injection, security, etc).
Here is me proposed change :
AsyncronousInterceptor.java line 24
@AroundInvoke
public Object aroundInvoke(InvocationContext invocation) throws Exception
{
boolean scheduleAsync = invocation.getMethod().isAnnotationPresent(Asynchronous.class) &&
!Contexts.getEventContext().isSet(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL);
if (scheduleAsync)
{
Dispatcher dispatcher = AbstractDispatcher.instance();
if (dispatcher==null)
{
throw new IllegalStateException("org.jboss.seam.async.dispatcher is not installed in components.xml");
}
Object timer = dispatcher.scheduleInvocation( invocation, getComponent() );
//if the method returns a Timer, return it to the client
return timer!=null && invocation.getMethod().getReturnType().isAssignableFrom( timer.getClass() ) ? timer : null;
}
+ else if( invocation.getMethod().isAnnotationPresent(Asynchronous.class) )
+ {
+ // Clear the async flag so that any async methods called by this invocation will execute asyncronously
+ Contexts.getEventContext().remove( AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL );
+ return invocation.proceed();
+ }
else
{
return invocation.proceed();
}
}
--
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
15 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1590) Problem when deploying seam application as directory deployment in glassfish
by ivica c (JIRA)
Problem when deploying seam application as directory deployment in glassfish
----------------------------------------------------------------------------
Key: JBSEAM-1590
URL: http://jira.jboss.com/jira/browse/JBSEAM-1590
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.BETA1
Environment: glassfish V2 build 53
seam 2.0.0 beta1
jdk 1.6.0 update1
netbeans 6 daily build
Reporter: ivica c
Fix For: 2.0.0.CR1
Problem occurs when deploying seam application as directory deployment in glassfish. I am getting this exception:
Exception occured in J2EEC Phasejava.lang.IllegalArgumentException: Invalid ejb jar [lib/jboss-seam.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [ctg-main] -- Invalid ejb jar [lib/jboss-seam.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:388)
at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:358)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:226)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:905)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:774)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)
Caused by: java.lang.IllegalArgumentException: Invalid ejb jar [lib/jboss-seam.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:95)
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:82)
at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:729)
at com.sun.enterprise.deployment.Application.visit(Application.java:1754)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:470)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:790)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:744)
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:349)
... 10 more
but when I deploy as norma arhive(when upload it) everything works fine.
--
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
15 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-633) remoting extension in handling exceptions on client side
by Nico Gau (JIRA)
remoting extension in handling exceptions on client side
--------------------------------------------------------
Key: JBSEAM-633
URL: http://jira.jboss.com/jira/browse/JBSEAM-633
Project: JBoss Seam
Issue Type: Patch
Components: Remoting
Affects Versions: 1.1.0.GA
Reporter: Nico Gau
Priority: Optional
Hi all,
I don't really know what JIRA is by the way, so hopefully nobody is upset by this post. I first mailed Gavin but he told me I should put it in JIRA.
I currently work on a project which uses Seam Remoting directly and I didn't find a neat way in handling errors on the client side as Exceptions are not propagated to it. Therefore I changed Seam to transmit all exceptions which can be handled in the javascript part via another callback. E.g.:
Seam.Component.getInstance('userManager').currentUser(function(user) {
alert("user: " + user);
},
function(ex) {
alert("exception occured: " + ex.getMessage());
});
As the exception handler is optional, the change would not brake any client code. If you are interested in the change, you can reach me at heinzbeinz AT googlemail.com
--
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
15 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1788) s:graphicImage fails to transform GIF images
by henrik lindberg (JIRA)
s:graphicImage fails to transform GIF images
--------------------------------------------
Key: JBSEAM-1788
URL: http://jira.jboss.com/jira/browse/JBSEAM-1788
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Environment: windows xp, JDK 1.6.0
Reporter: henrik lindberg
The org.jboss.seam.ui.graphicImage.Image class fails to rescale GIF images.
This is caused by the use of BICUBIC INTERPOLATION not working for GIF images.
I see three solutions (tested in similar code in one of my servlets that suffered from the same problem):
- Use this rendering hint (in use now)
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
but then change the format name to "png" when writing with image IO
- Use this rendering hint
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
and render as "gif"
- Use NEAREST_NEIGHBOR if image is written as a GIF, and BICUBIC otherwise.
The combination INTERPOLATION_BICUBIC (as well as INTERPOLATION_LINEAR) simply does not work if the image is written with ImageIO in "gif" format.
The result is all white pixels.
--
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
16 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1179) dvd store: Function 's:hasRole' not found
by Pete Muir (JIRA)
dvd store: Function 's:hasRole' not found
-----------------------------------------
Key: JBSEAM-1179
URL: http://jira.jboss.com/jira/browse/JBSEAM-1179
Project: JBoss Seam
Issue Type: Bug
Components: Examples, Security
Reporter: Pete Muir
Replicate by logging in as manager and attempting to change the order process
10:32:34,117 ERROR [STDERR] java.lang.ClassNotFoundException: org.jboss.seam.security.SecurityFunctions
10:32:34,117 ERROR [STDERR] at java.lang.Class.forName(Ljava.lang.String;ZLjava.lang.ClassLoader;)Ljava.lang.Class;(Unknown Source)
10:32:34,117 ERROR [STDERR] at java.lang.Class.forName(Ljava.lang.String;I)Ljava.lang.Class;(Unknown Source)
10:32:34,117 ERROR [STDERR] at org.apache.el.lang.FunctionMapperImpl$Function.getMethod(FunctionMapperImpl.java:147)
10:32:34,117 ERROR [STDERR] at org.apache.el.lang.FunctionMapperImpl.resolveFunction(FunctionMapperImpl.java:53)
10:32:34,117 ERROR [STDERR] at org.apache.el.parser.AstFunction.getValue(AstFunction.java:71)
10:32:34,117 ERROR [STDERR] at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
10:32:34,117 ERROR [STDERR] at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
10:32:34,117 ERROR [STDERR] at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:384)
10:32:34,117 ERROR [STDERR] at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:981)
10:32:34,117 ERROR [STDERR] at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:989)
10:32:34,117 ERROR [STDERR] at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:494)
10:32:34,117 ERROR [STDERR] at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:101)
10:32:34,117 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
10:32:34,117 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
10:32:34,117 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
10:32:34,117 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
10:32:34,117 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
10:32:34,117 ERROR [STDERR] at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
10:32:34,117 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
10:32:34,117 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:32:34,117 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
10:32:34,117 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
10:32:34,117 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:32:34,117 WARN [lifecycle] javax.el.ELException: /WEB-INF/incl/stats.xhtml @7,49 rendered="#{s:hasRole('admin')}": Function 's:hasRole' not found
javax.faces.FacesException: javax.el.ELException: /WEB-INF/incl/stats.xhtml @7,49 rendered="#{s:hasRole('admin')}": Function 's:hasRole' not found
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:387)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:981)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:989)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:494)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
--
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
16 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1350) Provide download component (e.g.<s:download value=#{FileManager.getFileById('10')" contentType="#{FileManager.contentType}" />)
by jarkko Lietolahti (JIRA)
Provide download component (e.g.<s:download value=#{FileManager.getFileById('10')" contentType="#{FileManager.contentType}" />)
-------------------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-1350
URL: http://jira.jboss.com/jira/browse/JBSEAM-1350
Project: JBoss Seam
Issue Type: Feature Request
Reporter: jarkko Lietolahti
<s:download value=#{FileManager.getFileById('10')" contentType="#{FileManager.contentType}" />
We're going to create new (more general component) which allows the user to download a file (any resource, Excel file, Document whatever).
The plan is to create a new UI component named UIDownload which has attributes like value, contentType (some more?).
1) UIDownload a backing bean (value) (is this still valid word in the seam world?) to generate the data ( allow byte[], OutputStreams ?).
2) UIDownload creates DownloadResource which is stored in DownloadStore.
3) UIDownload generates HTML which redirects the browser to ResourceServlet
4) ResourceServlet then uses DownloadResource to get hold of the data and the pushes it to browser
The reason for this is that we're building portlets with Seam and it's impossible to "download" files from a portal environment without additional servlet and we think it's good idea to reuse existing stuff.
Patch coming soon (if we can make it work ;)
--
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
16 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2197) interpolate swallows FormatType and FormatStyle of MessageFormat
by Martin Trummer (JIRA)
interpolate swallows FormatType and FormatStyle of MessageFormat
----------------------------------------------------------------
Key: JBSEAM-2197
URL: http://jira.jboss.com/jira/browse/JBSEAM-2197
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.CR2
Environment: Application Server: jboss-4.2.0.GA
Operating System: Windows XP
Java: 1.6
Reporter: Martin Trummer
Testcode:
String source = "{0,number,#.#}";
String interpolated = Interpolator.instance().interpolate(source);
System.out.println("soruce: '"+source+"'");
System.out.println("interpolated: '"+interpolated+"'");
Output is:
17:02:00,133 INFO [STDOUT] soruce: '{0,number,#.#}'
17:02:00,133 INFO [STDOUT] interpolated: '{0}'
Expected output:
17:02:00,133 INFO [STDOUT] soruce: '{0,number,#.#}'
17:02:00,133 INFO [STDOUT] interpolated: '{0,number,#.#}'
The interpolate() function should not swallow the FormatType and FormatStyle.
Details can be found in the Forum Discussion
--
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
16 years