[JBoss Seam] - Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?
by pete.muirï¼ jboss.org
"bsmithjj" wrote : I don't believe wrong is the correct term to describe the situation, rather, from your (Seam team) perspective, you provide examples that are based on 'things' being in places in the Seam 2.0.0.CR(X) distribution. Thus, jars like "jboss-embedded-all.jar" are not truly all. I say that because I had to discover (the hard way) that I needed to add jboss-embedded-api.jar and jboss-deployers.jar to my repo and test-scoped dependencies to my pom.xml.
Yes, the "official" maven support for Seam isn't well documented. This is because it is new and needs help from the community (e.g. blog articles, patches to the docs) - by using Maven with Seam you are
pushing the boundaries.
Now, useful information rather than me just pointing out the obvious ;)
You are depending on org.jboss.embedded jboss-embedded to get embedded support? The transitive dependencies on this are
jboss-embedded
| -> hibernate-all
| -> thirdparty-all
| -> jboss-embedded-all
| -> jboss-embedded-api
| -> jboss-deployers
So that should pull all the dependencies for booting the embedded container. This should be *easier* than setting up the classpath in ant as you have a well defined set of jars/scopes.
anonymous wrote : No, this is not in the Seam 2.0.0.CR3 docs - I double checked. I'm guessing your ant scripts build up classpaths using the lib and the lib/test directories in the distro and so it's easy to miss this kind of thing. I also just discovered that I need to add hibernate-commons-annotations.jar to my test-scoped dependencies, and thus, again, hibernate-all.jar is not truly all. It would be nice if the 'all' jars were truly 'all'. ;-)
Things become truly messy with embedded if you need newer bits of hibernate than come with embedded. Yes, embedded is a source of pain, we need to improve this.
The version of hibernate in hibernate-all doesn't depend on hibernate-commons-annotations (it's an older hibernate) but Seam's compile dependencies are newer than that.
anonymous wrote : I also needed to learn the jboss embedded container layout a bit; this is so that I could put appropriate maven2 testResource instructions into my pom(s) and reproduce the bootstrap directory layout. And... I needed to figure out that I need to copy my target/classes contents to the bootstrap deploy dir (I haven't figured out how to get the bootstrap to treat target/classes as part of the classpath).
You should just be able to add all of this to the classpath when run tests - thats what we do with Ant.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100707#4100707
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100707
17Â years, 2Â months
[EJB 3.0] - Re: Create timer -
by konami
"jcstaff" wrote : I believe you want to do what I described in my option B of the Jun 07 post. Just update the configuration file that points JMS to DefaultDS to use the data source your application is using. It will create the schema it needs. This integrates the Timer and application DB actions into a single resource.
|
| In ejb-deployer.xml
|
| | <mbean code="org.jboss.ejb.txtimer.DatabasePersistencePolicy" name="jboss.ejb:service=EJBTimerService,persistencePolicy=database">
| | <!-- DataSourceBinding ObjectName -->
| | <!-- jcstaff:if DB to support EJBs is non-XA, must use EJB's DS for Timers
| | <depends optional-attribute-name="DataSource">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
| | -->
| | <depends optional-attribute-name="DataSource">jboss.jca:service=DataSourceBinding,name=myDS</depends>
| | <!-- The plugin that handles database persistence -->
| | <attribute name="DatabasePersistencePlugin">org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin</attribute>
| | <!-- The timers table name -->
| | <attribute name="TimersTable">TIMERS</attribute>
| | </mbean>
| |
This optional attributes have moved to DatabasePersistencePolicy mbean in JBoss 4.2.1. But now I am getting another exception as below when I start the server:
java.lang.NullPointerException
| at org.jboss.ejb.txtimer.DatabasePersistencePolicy.listTimerHandles(DatabasePersistencePolicy.java:165)
| 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
|
Any idea why I am getting this? Any opinion would be helpful.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100705#4100705
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100705
17Â years, 2Â months