[Security & JAAS/JBoss] - Re: Encrypt KeyStore-Password in a Tomcat-Connetctor for 4.2
by yashendrac
Andre,
I confirmed that it is broken in JBoss5.0.1, I am not sure since when it is broken but it was working on JBoss4.2.1. I also confirmed that it is fixed in JBoss5.1.0
I checked the source code for following classes under jbosswe.jar and jbossweb-service.jar
1.org.jboss.net.ssl.JBossImplementation.java
2.org.jboss.net.ssl.JBossSocketFactory.java
3.org.apache.tomcat.util.net.jsse.JSSESocketFactory
JBossSocketFactory overrides following methods from tomcat's
JSSESocketFactory
protected TrustManager[] getTrustManagers(String keystoreType, String algorithm)
| protected KeyManager[] getKeyManagers(String keystoreType, String algorithm,
| String keyAlias)
|
But in tomcat JSSESocketFactory under JBoss5.0.1, method signatures are changed by adding additional String parameter String keystoreProvider.
So methods are changed to following in tomcat JSSESocketFactory
protected TrustManager[] getTrustManagers(String keystoreType,
| String keystoreProvider, String algorithm)
| protected KeyManager[] getKeyManagers(String keystoreType,
| String keystoreProvider,
| String algorithm,
| String keyAlias)
|
So JBossSocketFactory was not overriding these methods anymore and despite providing SSLImplementation="org.jboss.net.ssl.JBossImplementation" these two methods from JSSESocketFactory were invoked in place of JBossSocketFactory.
This is fixed in JBoss5.1.0
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234480#4234480
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234480
16 years, 10 months
[Installation, Configuration & DEPLOYMENT] - Re: Please Help Deployment the weirdest error I ever had in
by dakiar
16:42:57,673 INFO [ServerInfo] Java version: 1.4.2_08,Sun Microsystems Inc.
16:42:57,674 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.4.2_08-b03,Sun Microsystems Inc.
16:42:57,674 INFO [ServerInfo] OS-System: Linux 2.6.18-53.el5,i386
16:42:57,674 INFO [ServerInfo] OS-System: Linux 2.6.18-53.el5,i386
16:42:57,674 DEBUG [ServerInfo] Full System Properties Dump
16:42:57,674 DEBUG [ServerInfo] java.runtime.name: Java(TM) 2 Runtime Environment, Standard Edition
16:42:57,674 DEBUG [ServerInfo] jboss.server.base.dir: /usr/jboss/server
16:42:57,674 DEBUG [ServerInfo] java.protocol.handler.pkgs: org.jboss.net.protocol
16:42:57,674 DEBUG [ServerInfo] sun.boot.library.path: /usr/java/j2sdk1.4.2_08/jre/lib/i386
16:42:57,674 DEBUG [ServerInfo] jboss.server.lib.url: file:/usr/jboss/server/all/lib/
16:42:57,674 DEBUG [ServerInfo] java.vm.version: 1.4.2_08-b03
Also if a class is indeed loaded from jar I get following message:
[Loaded java.lang.Object from /usr/java/j2sdk1.4.2_08/jre/lib/rt.jar]
However this file is loaded directly from the war and is not inside a jar, thus it just say which war file, and which package the class is located in?
To make things even more interessing I removed the class from the war file.... no effect. Removing a jsp from same jar file however immidietly makes jboss scream. I checked the build script and confirmed and confirmed again, there is no jar file, all the classes is built directly into war file, I am adviced to re-install jboss, but I really want to know what is going on..... so it is my last resort.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234477#4234477
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234477
16 years, 10 months
[Management, JMX/JBoss] - Receiving notification from other MBeans
by joshua883
Hi all!
I'm trying to receive notifications from a simple MBean component. The MBean (taken from wikis) simply dumps a Message when the operation printMessage is invoked:
public class StartupService extends ServiceMBeanSupport implements StartupServiceMBean
| {
| // Our message attribute
| private String message = "Sorry no message today";
|
| // Getters and Setters
| public String getMessage()
| {
| return message;
| }
| public void setMessage(String message)
| {
| this.message = message;
| }
|
| // The printMessage operation
| public void printMessage()
| {
| log.info(message);
| }
|
| // The lifecycle
| protected void startService() throws Exception
| {
| log.info("Starting with message=" + message);
| }
| protected void stopService() throws Exception
| {
| log.info("Stopping with message=" + message);
| }
| }
|
The notification Listener (also taken from wikis) extends ListenerServiceMBeanSupport
public class NotificationListener
| extends ListenerServiceMBeanSupport
| implements NotificationListenerMBean
| {
| // Constructors --------------------------------------------------
| /**
| * CTOR
| **/
| public NotificationListener()
| {
| // empty
| }
|
| // NotificationListenerMBean implementation ----------------------
| // No attributes or operations in this example to implement!
|
| // Lifecycle control (ServiceMBeanSupport) -----------------------
| /**
| * Start
| **/
| public void startService()
| throws Exception
| {
| // subscribe for notification, true=dynamic
| super.subscribe(true); // listener is me!
| }
|
| /**
| * Stop
| **/
| public void stopService()
| throws Exception
| {
| // unsubscribe for notifications
| super.unsubscribe();
| }
|
| // ListenerServiceMBeanSupport override ------------------------
| /**
| * Overriden to add handling!
| **/
| public void handleNotification2(Notification notification, Object handback)
| {
| log.info("Got notification: " + notification + ", handback: " + handback);
| }
|
|
| }
Then I've tried to adapt the service xml file so that it receives notifications from the domain com.sample.jmx:
<mbean code="com.sample.jmx.StartupService" name="com.packtpub.jmx:service=StartupClass">
| <attribute name="Message">Hello World</attribute>
| </mbean>
|
| <server>
| <mbean code="jboss.example.NotificationListener"
| name="jboss.example:name=NotificationListener">
|
| <attribute name="SubscriptionList">
| <subscription-list>
| <mbean name="*:service=invoker,*" handback="anObject"></mbean>
| <mbean name="com.sample.jmx:*"></mbean>
|
| <notification type="JBOSS_MONITOR_NOTIFICATION"></notification>
| <mbean name="JMImplementation:type=MBeanServerDelegate">
| <notification type="JMX.mbean.registered"></notification>
| </mbean>
| </subscription-list>
| </attribute>
| </mbean>
| </server>
Unfortunately I don't receive any notification when the method printMessage is invoked....have you got any idea what's wrong?
JBoss release used 5.0.0 GA with JDK 1.6
Thanks a lot
John
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234459#4234459
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234459
16 years, 10 months