This content has been marked as final.
Show 4 replies
-
1. Re: Is @Resource + @Produces ok?
johaneltes Jan 8, 2010 12:47 AM (in response to johaneltes)Some more testing...
It does not seem to relate to combining @Produces with @Resource. I get the stack overflow even with this:
package foo.bar; import javax.annotation.Resource; import javax.annotation.sql.DataSourceDefinition; import javax.sql.DataSource; @DataSourceDefinition(name = "java:app/DerbyDb", minPoolSize = 0, initialPoolSize = 0, className = "org.apache.derby.jdbc.EmbeddedDataSource", user = "test", password = "test", databaseName = "derbyTestDb", properties = {"connectionAttributes=;create=true"} ) public class ResourceProducers { @Resource(mappedName="java:app/DerbyDb") DataSource dataSource; }
-
2. Re: Is @Resource + @Produces ok?
johaneltes Jan 8, 2010 12:48 AM (in response to johaneltes)Sorry - should have been...
package foo.bar; import javax.annotation.Resource; import javax.annotation.sql.DataSourceDefinition; import javax.sql.DataSource; @DataSourceDefinition(name = "java:app/DerbyDb", minPoolSize = 0, initialPoolSize = 0, className = "org.apache.derby.jdbc.EmbeddedDataSource", user = "test", password = "test", databaseName = "derbyTestDb", properties = {"connectionAttributes=;create=true"} ) public class ResourceProducers { @Resource(name="java:app/DerbyDb") DataSource dataSource; }
-
3. Re: Is @Resource + @Produces ok?
gavin.king Jan 8, 2010 2:13 AM (in response to johaneltes)Well, there's no actual CDI functionality used there. Just javax.annotation stuff (@Resource and @DataSourceDefinition).
-
4. Re: Is @Resource + @Produces ok?
johaneltes Jan 8, 2010 2:23 AM (in response to johaneltes)Yep, that's where it ended up. Sorry for make noise in the wrong context. The defect report went to Glassfish though.