You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 36 Members of 4185 |
| Forum: Seam Users |
07. Jun 2008, 01:50 CET | Link |
I don't have an application context in my mdb. I am very confident this is a configuration/self inflicted issue - the message bean in the remoting/chat example has an application context and I pretty much ripped of the code from there.
Some background info
I recv messages no problem, however when I inject a logger it is null. When I check the application context ( Context.isApplicationContextActive ) I get a false.
If there is anyone who could point me in the right direction I would really appreciate it.
thanks in advance,
g
bump.
for an MDB that is also a seam component
@MessageDriven(activationConfig={ @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), @ActivationConfigProperty(propertyName="destination", propertyValue="/queue/listUpload") }) @Name("loaderInitListener") public class LoaderInitListener implements MessageListener {...}... running under JBoss 4.2.{2,3} ...
... component injection fails and there is No Application Context active.
However, running the same MDB from a SeamTest with the embeddable EJB container works. My next step is to try with Jboss AS 5. Has anyone been able to get this to work under JBoss 4.2.x?
I have managed to get component injection into a MDB with JBoss AS 4.2.3 by creating a new project with seam-gen and doing a simple example. Now trying to figure out what configuration difference exists in the other (maven2 based) project.
Gary,
We have got this working in our application running in JBoss 4.2.0GA/Seam 2.0.1GA. Our MDB is a very important part of the application so we have done much work in this area.
One of our issues we needed to solve was in the fact that, on server startup, if the queue the MDB was listening on had messages that could be dispatched, the MDB started processing the messages BEFORE the application context was active and we would get the error you are talking about.
We have other MDBs and we have solved this issue using the annotation, but could never get it working with our Seam MDBs.
We have a solution for this that works. Let me know if you think this is the issue and I will post the solution.
Cory.
Cory, I'm running into this exact problem. I'd love to find out how you solved it.
Seam 2.0.2SP1, JBoss 4.2.3
Following up: I'm confident there is no JMS timing issue in my case since I am manually triggering the messages after the application is deployed.
I have been comparing a that works, and another that doesn't. Both MDBs are deployed inside JARs that are also EJB modules of an EAR.
Comparing the server deployment output:
Registering the MDB with the EJB container (finding the @MessageDriven annotation?)
Registering the MDB with Seam (finding the @Name annotation?)
Stacktrace when the JMS message is received inside the MDB's onMessage():
It seems pretty clear that a set of seam related interceptors are missing when the 2nd MDB is instantiated/called by the EJB container. Any suggestions on other places I can check to confirm that the 2nd MDB is deployed correctly?
Cheers
solved. was missing an ejb-jar.xml in the EJB module.