[Messaging, JMS & JBossMQ] - How to use "SecurityManager attribute" on EJB 3.0 MDB
by 10takashi
Hello there,
My name is Takashi. Currently I'm searching the solution for the title.
In conclusion, I want to know the way how to define Anotation for this attribute.
(@ActivationConfigProperty(propertyName)
First I'm describing my environment.
--------------
The host that has queue(remotehost)
Name: Remotehost
Server: Linux(SUSE 9.3)
JDK Version: 1.5.0_14
JBoss Version: 4.2.2-AS
The host that has MDB tries to listen to remotehost's MQ(localhost)
Name: localhost
Server: Linux(SUSE 9.3)
JDK Version: 1.5.0_14
JBoss Version: 4.2.2-AS
--------------
In Remotehost, I defined queue/remotetest with Security Manager like this
in remotehost-ds.xml file and deployed in Remotehost's /default/deploy/jms folder.
--------------
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
<depends optional-attribute-name="ExpiryDestination">
jboss.mq.destination:service=Queue,name=expiredTest
<depends optional-attribute name="SecurityManager">
jboss.mq:service=SecurityManager
--------------
The red characters above show the "Security Manager attribute".
In localhost, I created a EJB 3.0 MDB tries to listen to Remotehost's MQ through RemoteJMSProvider like this,
--------------
@MessageDriven(activationConfig =
{
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/remotetest"),
@ActivationConfigProperty(propertyName="providerAdapterJNDI", propertyValue="java:/RemoteJMSProvider")
})
--------------
When I execute this code, I got this error,
--------------
org.jboss.deployment.DeploymentException: Error for ActivationSpec class
--------------
In EJB2.0, in jboss.xml file, I defined mdb-user and mdb-passwd like this
--------------
<message-driven>
<ejb-name>Remotetest</ejb-name>
<destination-jndi-name>queue/remotetest</destination-jndi-name>
<mdb-user>test</mdb-user>
<mdb-passwd>test</mdb-passwd>
<resource-ref>
</resource-ref>
</message-driven>
--------------
However, I couldn't find any doccument how can I define in EJB 3.0 MDB corresponding to the red characters part above....
If anyone gives me good suggestion, I'm really appriciated.
Best regards
Takashi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122733#4122733
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122733
18 years, 6 months
[JBoss Seam] - NoClassDefFoundException in seam-gen generated code !!!
by nicolasd
Greetings,
After having ran "seam generate-entites" on my db and after having deployed the EAR, I got the following exception in the log file:
| 2008-01-23 17:16:58,786 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/SimplexCRM]] Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) àl'instance de classe d'écoute (listener) org.jboss.seam.servlet.SeamListener
| java.lang.RuntimeException: Could not create Component: accountsAuditHome
| at org.jboss.seam.init.Initialization.addComponent(Initialization.java:976)
| at org.jboss.seam.init.Initialization.installComponents(Initialization.java:903)
| at org.jboss.seam.init.Initialization.init(Initialization.java:548)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
| ................. etc.
|
The reason of this exception is displayed further, in the log file:
| Caused by: java.lang.NoClassDefFoundError: fr/simplexSoftware/crm/jpaBeans/AccountsAuditId
| at java.lang.Class.getDeclaredMethods0(Native Method)
| at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
| at java.lang.Class.privateGetPublicMethods(Class.java:2547)
| at java.lang.Class.getMethods(Class.java:1410)
| at org.jboss.seam.Component.hasAnnotation(Component.java:1059)
| at org.jboss.seam.Component.<init>(Component.java:228)
| at org.jboss.seam.Component.<init>(Component.java:216)
| at org.jboss.seam.init.Initialization.addComponent(Initialization.java:961)
| ... 139 more
|
The EAR file contains in its lib directory a jar which contains all the required classes, including the one flagged as missing. The application.xml correctly defines the modules, so I don't understand how is it possible that this exception is raised, given that all the classes are there.
Could anybody help please ?
Many thanks in advance.
Nicolas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122729#4122729
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122729
18 years, 6 months