[JBoss Seam] - seam, spring activemq
by henderson_mk
Hi folks,
I'm attempting to use seam for a webapp, the implementation of which is fine.
However, there can be a back end feed that comes in via jms and its kinda been mandated that I use activemq for this.
So I've configured the various activemq bits and bobs via spring. However... I need to persist some of the data that comes in, into the db. So I did this:
| <!-- Use this to wire into the active mq beans -->
| <bean id="springHook" class="org.banana.utils.SpringHook">
| <property name="session"><ref local="hibernateSession"/></property>
| </bean>
|
| <seam:instance name="svDatabase" id="hibernateSession" proxy="true"/>
|
to get hold of the seam managed hibernate session.
However... when I put that spring hook bean into a message listener and have it attempt to log out the hibernate session I get:
| svi ERROR [Thread-5] UpdateListener.onMessage(74) | jms exception=No application
| context active
| java.lang.IllegalStateException: No application context active
| at org.jboss.seam.Component.forName(Component.java:1545)
| at org.jboss.seam.Component.getInstance(Component.java:1595)
| at org.jboss.seam.Component.getInstance(Component.java:1578)
| at org.jboss.seam.Component.getInstance(Component.java:1572)
|
but when I nav to the first page of the app and have a test just to log out the session... it works. It appears that referencing a seam managed hibernate session isn't working for me.
Although this might be the way its supposed to work... i was wondering if there were another way of getting hold of a hibernate session from seam?
Hope you can help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027601#4027601
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027601
19Â years, 1Â month
[Clustering/JBoss] - get partition(cluster)
by oruchovets
Hi , I try to get partition(cluster) name using external applicatin using JMX.
String jmxQuery = "jboss:service=DistributedReplicantManager,*";
// getting the server MBean
Set set = connection.queryNames(new ObjectName(jmxQuery), null);
if (set != null && set.size() > 0) { // this is a cluster
for (Iterator i = set.iterator(); i.hasNext();) {
ObjectName on = (ObjectName) i.next();
System.out.println("--"+on);
String ClusterName = on.getKeyProperty("partitionName");
}
}
Is it correct way to get a cluster name using DistributedReplicantManager.
and may be you have a reference how to discover a full topology of jboss (all partitions , clusters and servers in it).
Thanks in Advance Oleg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027596#4027596
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027596
19Â years, 1Â month
[JBossWS] - How can I do mutual SSL when using JBoss as Web service clie
by zhijun
Hi,
I'm running a Web Service client on JBoss 4.0.5 and JBossWS1.0.4GA.
The Web service I'm trying to consume requires mutual SSL authentication.
I have created keytore, with the private key, the certificate in it. I also added the Web service provider's certificate to this keystore as a trusted certificate.
I have configured my server.xml file to include the following:
<Connector port="8443" address="${jboss.bind.address}"
| maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
| emptySessionPath="true"
| scheme="https" secure="true" clientAuth="false"
| keystoreFile="${jboss.server.home.dir}/conf/jboss.keystore"
| keystoreType="jks"
| keystorePass="password" sslProtocol = "TLS" />
But I guess this is not good enough (I don't feel that way either). So when I called the service, the error message said that my request did not present a certificate.
How do I configure my Web service client, or write some code, to make sure that my web service request (to a https URL) will present a client certificate?
I saw that you could specify user ID and password in the <service-ref> tag if you are using basic authentication. But I need certificate-based authentication and couldn't find an example.
SOAP signing doesn't help me either because the Web service provider expects the certificate to be presented during the SSL handshake.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027593#4027593
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027593
19Â years, 1Â month