This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Produces | |
@ApplicationScoped | |
@Resource("/ConnectionFactory") | |
private ConnectionFactory cf; | |
vs. | |
@Resource("/ConnectionFactory") | |
private ConnectionFactory cf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ApplicationScoped | |
@SomeQualifier | |
public class CDIMessageListener implements MessageListener { | |
@Inject Logger logger; | |
public void onMessage(Message m) { | |
logger.info("Received a message of type "+m.getClass().getCanonicalName()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tad.jms.jmsmanagingapp; | |
import javax.ejb.ActivationConfigProperty; | |
import javax.ejb.MessageDriven; | |
import javax.enterprise.event.Event; | |
import javax.enterprise.inject.spi.BeanManager; | |
import javax.inject.Inject; | |
import javax.jms.JMSException; | |
import javax.jms.Message; | |
import javax.jms.MessageListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestScoped | |
@Path("/send") | |
public class SendEventResource { | |
@Inject @QualOne Event<String> es1; | |
@Inject @QualTwo Event<String> es2; | |
@Inject @QualOne @QualTwo Event<String> es3; | |
@Inject Logger logger; | |
@Path("/{data}") | |
@GET | |
@Produces("text/plain") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Qualifier | |
@Target( { FIELD, METHOD, TYPE, PARAMETER }) | |
@Retention(RUNTIME) | |
@JcrSettings({ | |
@JcrSetting(name="org.modeshape.config.URL",value="file:///path/to/modeshape-jcr.xml?repositoryName=RepoOne"), | |
@JcrSetting(name="org.modeshape.config.AnotherParam",value="happy") | |
}) | |
public @interface RepoOneRepository { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EventFiringBean { | |
@Inject @Outbound Event<String> stringJmsEvent; | |
@Inject @Inbound Event<String> stringJmsInboundEvent; | |
@Inject Event<String> stringEvent; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exception | |
javax.servlet.ServletException: No EjbLookup registry has been provided CDI @EJB injection [field] @EJB org.jboss.seam.jms.example.statuswatcher.session.ReceivingClient.statusManager | |
javax.faces.webapp.FacesServlet.service(FacesServlet.java:325) | |
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) | |
org.jboss.seam.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:62) | |
org.jboss.seam.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:72) | |
root cause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<johnament> gastaldi: is it possible to create a service handler that could automatically bind a DAO for a node via an interface? | |
<gastaldi> johnament: I guess so, using Solder right ? | |
<johnament> gastaldi: yep | |
<johnament> gastaldi: basically, i think it would be easiest to provide jcr session capabilities as a service handler based on interface methods. | |
<gastaldi> hummm | |
<gastaldi> Seam JCR provides the impl | |
<gastaldi> And the App developer the interface | |
<gastaldi> right ? | |
<gastaldi> We should have some sort of annotations to make it happen | |
<gastaldi> So that info could be read on the Service handler impl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------------------- | |
Test set: org.jboss.seam.jms.test.activemq.inject.ActiveMQConnectionFactoryProducerTest | |
------------------------------------------------------------------------------- | |
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.376 sec <<< FAILURE! | |
testJmsConnectionFactoryProducer(org.jboss.seam.jms.test.activemq.inject.ActiveMQConnectionFactoryProducerTest) Time elapsed: 0.516 sec <<< ERROR! | |
java.lang.RuntimeException: Could not inject members | |
at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:103) | |
at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.enrich(CDIInjectionEnricher.java:51) | |
at org.jboss.arquillian.impl.enricher.ClientTestEnricher.enrich(ClientTestEnricher.java:61) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* PLM: ApplicationConsumer is a class provided by the application, and injects and | |
* uses the resources defined in the central Resources class. An application would | |
* typically have multiple ApplicationConsumer-style classes - this is just an | |
* example | |
*/ | |
public class ApplicationConsumer { | |
// regular destination. | |
@Inject @FooMyTopic |
OlderNewer