[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1498) inject JBoss service EJB with @In
by koen handekyn (JIRA)
inject JBoss service EJB with @In
---------------------------------
Key: JBSEAM-1498
URL: http://jira.jboss.com/jira/browse/JBSEAM-1498
Project: JBoss Seam
Issue Type: Feature Request
Components: EJB3
Reporter: koen handekyn
Priority: Minor
to inject a Service EJB into a seam component, for consistency it would certainly be very nice to be able to inject it within SEAM with @In and optionally adding an @Name attribute to the service class. it would be more consistent and shorter than the standard jboss approach (below)
private GlobalConfigurationMBean globalConfiguration;
@Depends ("upr:service=globalConfiguration")
public void setGlobalConfiguration(final GlobalConfigurationMBean globalConfiguration)
{
this.globalConfiguration = globalConfiguration;
}
--
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-4449) On SeamTest converters for page parameters are not called
by Tommy Key (JIRA)
On SeamTest converters for page parameters are not called
---------------------------------------------------------
Key: JBSEAM-4449
URL: https://jira.jboss.org/jira/browse/JBSEAM-4449
Project: Seam
Issue Type: Bug
Components: Test Harness
Affects Versions: 2.1.1.GA
Environment: Linux version 2.6.28-15-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009
Kubuntu 9.04
JBoss 4.2.3 GA
Reporter: Tommy Key
I have converter used in pages.xml like this:
<page view-id="/basket.xhtml">
<param name="basketId" required="true" value="#{basketHome.id}" converterId="javax.faces.convert.LongConverter" />
</page>
My entity Basket has field id is of type Long. This combination works fine on production server.
However in tests it doesn't work. No converters are used in AbstractSeamTest$Request#setStandardJspVariables. It inserts String argument, not converted to Long. There should be a conversion similar (although I'm not 100% sure) to something like this one : Pages#convertAndValidateStringValuesInPageContext.
I use this code to reproduce a bug:
new FacesRequest("/basket.xhtml") {
protected void beforeRequest() {
setParameter("basketId", "77");
}
protected void invokeApplication() throws Exception {
try {
BasketHome basketHome = (BasketHome) Component.getInstance("basketHome");
basketHome.getInstance();
} catch (IllegalArgumentException a) {
//bug - expected Long, actually got String
}
}
}.run();
--
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
16 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1707) @Destroy method on APPLICATION scope bean throws IllegalState(no context) at server stop time
by Frits Jalvingh (JIRA)
@Destroy method on APPLICATION scope bean throws IllegalState(no context) at server stop time
---------------------------------------------------------------------------------------------
Key: JBSEAM-1707
URL: http://jira.jboss.com/jira/browse/JBSEAM-1707
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Environment: Tomcat 6.0.10, JavaBean mode, Hibernate 3.2.3, HBEM 3.3.1
Reporter: Frits Jalvingh
I have a bean defined as follows:
@Name("initBean")
@Startup()
@Scope(ScopeType.APPLICATION)
public class InitBean {
containing a method:
@Destroy
public void destroy() {
Builder.getInstance().terminate();
BuildBot.getInstance().stop();
}
It is meant to shutdown some daemons when the server stops.
When the server stops I get an exception:
01:15:39,703 WARN [Component] Exception calling component @Destroy method: initBean
java.lang.IllegalStateException: no event context active
at org.jboss.seam.web.ServletContexts.instance(ServletContexts.java:40)
at org.jboss.seam.web.Parameters.getRequestParameters(Parameters.java:39)
at org.jboss.seam.faces.Parameters.getRequestParameters(Parameters.java:64)
at org.jboss.seam.Component.injectParameters(Component.java:1334)
at org.jboss.seam.Component.inject(Component.java:1304)
at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
at to.etc.saram.beans.InitBean_$$_javassist_0.destroy(InitBean_$$_javassist_0.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
at org.jboss.seam.Component.callComponentMethod(Component.java:1957)
at org.jboss.seam.Component.callDestroyMethod(Component.java:1888)
at org.jboss.seam.Component.destroy(Component.java:1217)
at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:251)
at org.jboss.seam.contexts.Lifecycle.endApplication(Lifecycle.java:52)
at org.jboss.seam.contexts.ServletLifecycle.endApplication(ServletLifecycle.java:121)
at org.jboss.seam.servlet.SeamListener.contextDestroyed(SeamListener.java:39)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3866)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4502)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1068)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1068)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
at org.apache.catalina.core.StandardService.stop(StandardService.java:510)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)
at org.apache.catalina.startup.Catalina.start(Catalina.java:577)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
which seems to be caused by the bean Injector trying to access the request context which of course is no longer there. The bean contains only a single injected thingy which is the entityManager.
--
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-4403) Create an eclipseclasspath ant target for examples
by Ondrej Skutka (JIRA)
Create an eclipseclasspath ant target for examples
--------------------------------------------------
Key: JBSEAM-4403
URL: https://jira.jboss.org/jira/browse/JBSEAM-4403
Project: Seam
Issue Type: Feature Request
Components: Examples
Reporter: Ondrej Skutka
Assignee: Martin Gencur
Fix For: 2.2.1.CR1
Add eclispeclasspath ant target for examples, that will create files '.classpath' and '.project' for eclipse. Use a JBoss Tools - generated seam project as an example of such files.
Check the project behaviour when org.jboss.tools.seam.core.seamnature and org.jboss.tools.jsf.jsfnature natures are turned on without JBoss Tools installed.
You should be able to:
- import eclipse project
- use TestNG
- deploy the example on server
- use hot deployment on properly setup environment ?
Update documentation on using Seam examples with eclipse.
--
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
16 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4438) Circular Injection causes Seam Injected variables to be null before invocation is complete
by Tim Evers (JIRA)
Circular Injection causes Seam Injected variables to be null before invocation is complete
------------------------------------------------------------------------------------------
Key: JBSEAM-4438
URL: https://jira.jboss.org/jira/browse/JBSEAM-4438
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.0.GA
Environment: I've only tested this on 2.1.0.GA so far, but I can't see anything in the release notes that would have fixed this in other versions. I will test in 2.2.0.GA soon.
Reporter: Tim Evers
OK, so If we have Seam bean A and Seam bean B and Seam bean C;
A {
@In
B b
@In
C c
public void doSomethingWithBs() {
b.doSomething(); //IMPORTANT LINE 1
c.doSomethingDifferent(); //IMPORTANT LINE 2
}
public MyDomainObj getCurrentObj() {
return myVar;
}
}
B {
@In
A a;
public void doSomething() {
process(a.getCurrentObj); //LINE THAT CAUSES BUG
}
private void process(MyDomainObj x) {
....
}
}
OK, so the situation is this
on line marked with //IMPORTANT LINE 1 all injected variables are set. The method in Seam bean B gets executed and after that line of code has executed and the program is about to execute line marked with //IMPORTANT LINE 2 the injected variables are null. Thus I get a null pointer exception on variable c;
See my forum reference link for a more detailed example.
--
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
16 years, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1879) Magic mime type detection support
by Christian Bauer (JIRA)
Magic mime type detection support
---------------------------------
Key: JBSEAM-1879
URL: http://jira.jboss.com/jira/browse/JBSEAM-1879
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Reporter: Christian Bauer
Priority: Minor
A component I can call to find out what mime type a particular byte[] or ByteInputStream is. The only existing solution in Java is http://sourceforge.net/projects/jmimemagic/ but it's basically an unmaintained half-working pile of junk.
It's interesting that nobody ever build a simple port of file(1), which you get on every unix box, together with a fantastic (/etc/magic or /usr/share/file/magic on the Mac) database of magic bytes found in file headers. We should just take that database (or the source database from which it is generated) and write our own file(1) for Seam. Search for "mime magic java" with Google and you see why it's needed. Try "file myfile.foo" on every unix box (well, younger than 10 years) and you see how it works.
--
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, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4435) Exception in Seam Resource is Swallowed and Redirection to debug.seam Does not Work
by Elmar Weber (JIRA)
Exception in Seam Resource is Swallowed and Redirection to debug.seam Does not Work
-----------------------------------------------------------------------------------
Key: JBSEAM-4435
URL: https://jira.jboss.org/jira/browse/JBSEAM-4435
Project: Seam
Issue Type: Bug
Affects Versions: 2.2.0.GA
Environment: Linux, JBoss 5.1.0.GA
Reporter: Elmar Weber
Priority: Minor
When a Seam managed resource produces an exception the exception is swallowed, i.e. it is not logged. Furthermore, maybe this is also the source of the problem, the failed request is not redirected to the correct debug.seam URL.
Steps to reproduce on JBoss 5.1.0.GA with Seam 2.2.0.GA:
1. create a Seam resource that produces an exception (code at the end)
2. navigate to the Seam resource: /seam/resource/myresource
Now instead of redirecting to /debug.seam?cid=<CID> the browser redirects to /seam/resource/debug.xhtml?cid=<CID> which of course does not exist, thus resulting in a 403 HTTP error.
Furthermore the exception is not logged in the JBoss logs.
When you manually navigate to /debug.seam?cid=<CID> the full exception trace is shown (serves also as a workaround).
Example resource (requires existence of resource servlet in web.xml):
@Scope(ScopeType.APPLICATION)
@Name("myResource")
@BypassInterceptors
public class SimpleExceptionResource extends AbstractResource {
@Override
public String getResourcePath() {
return "/myresource";
}
@Override
public void getResource(final HttpServletRequest request,
final HttpServletResponse response) throws ServletException,
IOException {
new ContextualHttpServletRequest(request) {
@Override
public void process() throws IOException {
doWork(request, response);
}
}.run();
}
private void doWork(HttpServletRequest request, HttpServletResponse response)
throws IOException {
response.getOutputStream().print("" + 0 / 0);
}
}
--
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
16 years, 1 month