EJB & JMX notification
Can a stateless session EJB register itself to receive notifications from a JMX
MBean? What are the pros/cons of doing this?
Thanks
Raja
Can a stateless session EJB register itself to receive notifications froma JMX
MBean? What are the pros/cons of doing this?You probably want to write a thin adapter (non-EJB) to do that, and it can
call the EJB.
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/coherence.jsp
Tangosol Coherence: Clustered Replicated Cache for Weblogic
"Raja Hayek" <[email protected]> wrote in message
news:[email protected]..
>
Similar Messages
-
How JMX notifications could be sent and received remotely?
How JMX notifications could be sent and received remotely?
Sun has a product called JDMK which does just that. Its actually pretty good and not too expensive.
I believe latest versions of JBoss can do it as well. Don't know about other vendors.
As a last resort you could intercept the notifications yourself and forward then as ordinary RMI/EJB/whatever calls. -
Org.omg.CORBA.MARSHAL exception For JMX Notification
I am running Weblogic 9.2 java version 1.5.0_04 and I am tring to recieve JMX Notifications from a Custom MBean running in Weblogic but I keep recieving the following exception:
Jan 5, 2007 12:55:25 PM ClientNotifForwarder NotifFetcher-run
SEVERE: Failed to fetch notification, stopping thread. Error is: java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe
java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
at org.omg.stub.javax.management.remote.rmi._RMIConnection_Stub.fetchNotifications(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RMINotifClient.fetchNotifs(RMIConnector.java:1285)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.fetchNotifs(ClientNotifForwarder.java:508)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(ClientNotifForwarder.java:399)
at com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(ClientNotifForwarder.java:83)
Caused by: org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe
I received this first by trying JConsole that comes with JDK 1.5. This only occurs with JMX Notifications because I am able to execute the MBean operation of the MBean and I can see my custome MBean being executed in WebLogic but my custom mbean sends out a JMX Notifications and that causes
the above exception.
I wrote my own NotificationListener program to make sure that it is not a JConsole problem and I got the same problem. I tried using t3 and rmi protocol to see if one of them would work but neither worked. See the code below for the Notification Listener:
// String protocol = "t3";
//String jndiroot = "/jndi/";
String protocol = "rmi";
String jndiroot = new String("/jndi/iiop://" + hostName + ":" + port + "/");
String myserver = "weblogic.management.mbeanservers.domainruntime";
JMXServiceURL serviceURL = null;
try {
serviceURL = new JMXServiceURL(protocol, hostName, port, jndiroot + myserver);
} catch (MalformedURLException e1) {
logger.debug("malformedURLexception caught");
e1.printStackTrace();
Hashtable h = new Hashtable();
h.put(Context.SECURITY_PRINCIPAL, userName);
h.put(Context.SECURITY_CREDENTIALS, password);
// h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "weblogic.management.remote");
try {
connector = JMXConnectorFactory.connect(serviceURL, h);
connection = connector.getMBeanServerConnection();
} catch (IOException e1) {
e1.printStackTrace();
logger.debug("The connection is : " + connection.toString());
ObjectName mbeanName = null;
try {
mbeanName = new ObjectName("Mbean:Name=com.test.bean,Type=TestMBean,Location=AdminServer");
logger.debug("Created MBeanObjectName: " + mbeanName.toString());
} catch (MalformedObjectNameException e) {
e.printStackTrace();
} catch (NullPointerException e) {
e.printStackTrace();
try {
logger.debug("The mbean is registered " + connection.isRegistered(mbeanName));
} catch (IOException e1) {
e1.printStackTrace();
try {
connection.addNotificationListener(mbeanName, this,null, null);
logger.debug("the connection is added a listener : " + connection.isInstanceOf(mbeanName, "com.test.bean.MBean"));
logger.debug("Listener registered ...");
//Keeping the remote client active.
System.out.println("waiting for notifications, got to log file for details....");
System.in.read();
} catch (InstanceNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
public void handleNotification(Notification n, Object arg1) {
logger.debug("******************************************");
logger.debug("* Notification count : " + counter++ + ", Notification received at "
+ new Date().toString());
logger.debug("* type = " + n.getType());
logger.debug("* message = " + n.getMessage());
logger.debug("* source = " + n.getSource());
logger.debug("* seqNum = "
+ Long.toString(n.getSequenceNumber()));
logger.debug("* timeStamp = " + new Date(n.getTimeStamp()));
logger.debug("* userData = " + n.getUserData());
logger.debug("*******************************************");
I commented out the t3 protocol but it doesn't work for both protocol types. I implemented a Notification Listener within WebLogic and that
worked right away using the following code below:
InitialContext ctx = new InitialContext();
rmbs = (MBeanServer) ctx.lookup("java:comp/env/jmx/runtime");
As the document "Developing Custom Management Utilities with JMX" on page 4-7 "Make Local Connections to the Runtime MBean Server" described.
Has anyone seem the above exception "Failed to fetch notification, stopping thread. Error is: java.rmi.MarshalException: CORBA MARSHAL 0" when a client is trying to receive JMX Notification? All help would be greatly appreciated.
Thanks,
AjayHi ajay,
How did u manage to access the mbeanserver in BEA ? Can u pls brief on that. Even I am trying the same. But, the MBEANSERVEROBJECT i create, eventhough has NO NULL value, is not able to acces the mbean. Any method access through this object creates an EXCEPTION. Please help me too. I will try solving ur problem too.:-)
Also, do i need to put my MBEAN CLASS in the weblogic server ? Should i create an APP SERVER in BEA ?
I appreciate ur early response, dude.. -
Hi,
I am new to JMX,
I have written sample code after looking at the examples provided in CodeShare...
The requirement in my project is .. We need to recieve notifications from Weblogic MBeans like JDBCConnectionPoolRuntime, JVMRuntime etc,
I am able to add a NotificationListener to the above MBeans, but i am not able to get any notifications from the Listener.. even there is change in the attibutes of above MBeans.
I tried an example which registers to LogBroadcasterRuntime but the example code also did not throw any notifications.
Please help me out ..
Thanks and Regards,
Keerthi( I have another thought using JMX notifications with spring 2.0. The easiest way to send notifications is to inherit from NotificationBroadcasterSupport, however trouble arises when inheritance is already in use.
Is there a nice way to avoid implementing addNotificationLister, removeNotificationListener and sendNotification which are part of the otificationBroadcaster ? )
......and at the expense of coupling to both spring and jmx the notificationPublisher is an excellent tool to satisfy my demands .........
Message was edited by:
Toxic
Message was edited by:
Toxic -
There is
getNotificationInfo Successful
The operation [getNotificationInfo] was successfully invoked for the MBean [bean:name=test].
The operation returned with the value:
[Ljavax.management.modelmbean.ModelMBeanNotificationInfo;@1b9d4d8
in http://127.0.0.1:9292/ and
getNotificationInfo button in jconsole doesn't print any error. But there is
21-Feb-2006 17:39:11 RequiredModelMBean getAttributes(String[])
SEVERE: Failed to get "NewNumber": javax.management.AttributeNotFoundException: getAttribute failed: NewNumber is not readable
21-Feb-2006 17:39:11 RequiredModelMBean getAttributes(String[])
SEVERE: Failed to get "NotificationInfo": javax.management.MBeanException: An exception occured while trying to get an attribute value through a RequiredModelMBean
when making some operation on the bean in jconsole. Where should I check?
Tried to extend NotificationBroadcasterSupport class instead of NotificationBroadcaster interface implementation (like is many examples in web), but that gave absolutely no affect....
In general everything must be easy.
The steps seem to be such:
Server must be started, beans must be exported to the server.
The beans that must be listened should implement NotificationBroadcaster interface or extend NotificationBroadcasterSupport class.
On the client side Notification listener on a specific bean on the server must be registered via addNotificationListener. And that addNotificationListener defines the action when notification comes. And notification listener must implement NotificationListener interface.
And that seems to be all, right?Hi Nikolay,
If you're running on Sun's Tiger JVM you can enable the JMX logging traces:
- start your application with -Djava.util.logging.config.file=<logging.properties>
- use the logging.properties given below:
------------------------------------------logging.properties------------------------------------
handlers= java.util.logging.ConsoleHandler
.level=INFO
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
// Use FINER or FINEST for javax.management.remote.level - FINEST is
// very verbose...
javax.management.level=FINEST
javax.management.remote.level=FINER
------------------------------------------logging.properties------------------------------------
Alternatively you may also try to switch on the traces dynamically - see my
blog on the subject:
http://blogs.sun.com/roller/page/jmxetc?entry=tracing_jmx_what_s_going
Hope this helps,
-- daniel
JMX, SNMP, Java, etc...
http://blogs.sun.com/roller/page/jmxetc
There is
getNotificationInfo Successful
The operation [getNotificationInfo] was successfully
invoked for the MBean [bean:name=test].
The operation returned with the value:
[Ljavax.management.modelmbean.ModelMBeanNotificationIn
fo;@1b9d4d8
in http://127.0.0.1:9292/ and
getNotificationInfo button in jconsole doesn't print
any error. But there is
21-Feb-2006 17:39:11 RequiredModelMBean
getAttributes(String[])
SEVERE: Failed to get "NewNumber":
javax.management.AttributeNotFoundException:
getAttribute failed: NewNumber is not readable
21-Feb-2006 17:39:11 RequiredModelMBean
getAttributes(String[])
SEVERE: Failed to get "NotificationInfo":
javax.management.MBeanException: An exception occured
while trying to get an attribute value through a
RequiredModelMBean
when making some operation on the bean in jconsole.
Where should I check?
Tried to extend NotificationBroadcasterSupport class
instead of NotificationBroadcaster interface
implementation (like is many examples in web), but
that gave absolutely no affect....
In general everything must be easy.
The steps seem to be such:
Server must be started, beans must be exported to
to the server.
The beans that must be listened should implement
nt NotificationBroadcaster interface or extend
NotificationBroadcasterSupport class.
On the client side Notification listener on a
a specific bean on the server must be registered via
addNotificationListener. And that
addNotificationListener defines the action when
notification comes. And notification listener must
implement NotificationListener interface.
And that seems to be all, right? -
HI,
I am running an application "A" which is a Client (or an Agent) registered to the notification service fo JMX and monitoring an attribute "DocumentCount.".
The MBean which emits the NOtification is the ABCMBean.
The notification is sent in a method which is listed under the MBean interface
If this method is called by the client(or the agent) then notification is received successfully.
I have another application [b]"B" which is modifying this attribute by calling this same method, but is not registered to the MBean server.
So i have a process which is local to the MBean Interface which is modifying this attribute.
But in this case application A is not receiving any notification.
My assumption goes this way......
-->The notification is emitted only when the method is called by the client (or the agent defined above)
---->any other method local or remote which is calling the same method and broadcasting the same notification is not cached by the client which is registered and listening to the notification
Is this argument true??
If not what could be the possible reasons for that??Hi,
As I understood your question, you want to know that if an monitored resource is modified by anyway other than via mbeanserver's invoke, registered listener will receive notification or not.
So as per my experience with JMX if manage resource is modified by any means, you (all the listener) will receive the notification. Since this notification is synchronous you have to check if any other listener is blocking the thread,if that is the case other listener's will not be intimated until & unless thread returns after notifying previous listener....
Hope this helps..
cheers -
I'm looking for a tool that can pull data from an RMI JMX connection and use it for generating alerts and storing historical JMX attributes. I've seen many solutions that want to "push" the data via a Java agent to their monitoring servers but I haven't seen many that try to pull data.
Any ideas of some good products out there?Hi,
The short answer is yes to all your questions.
The longer answer is that you should be careful when using custom types
in your MBeans, because 1) you will need to make them serializable, and
take care of compatibility issues when they evolve, and 2) you will need to
make the jar that contain them available on the manager side.
To overcome this, JMX defines the notion of Open MBeans and OpenTypes, that
is, generic data-types (CompositeData and TabularData) that can be used to
model custom types.
In JDK 6, we're also introducing the notion of MXBean (see the excellent article
on http://java.sun.com/developer/technicalArticles/J2SE/mxbeans/ ).
MXBeans are just like MBeans, except that the MBeanServer will automatically
transform your custom types into OpenTypes (not all custom types can be
automatically converted - but a great many of them).
In JDK 6 build 98 you will find a new advanced JMX example that demonstrate
configuration MXBeans using XML serializable beans as MBean attributes.
Concerning Notifications, the same concerns applies. We usually recommend
not to create any custom subclass of notification, but use one of the standard
base classes instead. A JMX notification has a user data field in which you
could embed an instance of a generic Open Type (CompositeData/TabularData)
if needed.
The new advanced JMX example also show how you can 'reuse' the base
notification classes.
See:
http://blogs.sun.com/jmxetc/entry/looking_for_jmx_overview_examples
for JMX tutorial, examples, etc...
and
http://blogs.sun.com/jmxetc/entry/an_advanced_jmx_example_for
for instruction on the new JDK 6 JMX example.
I hope this will get you started on JMX!
-- daniel
JMX, SNMP, Java, etc
http://blogs.sun.com/jmxetc -
The bean name is:
com.bea:ServerRuntime=WLS1_COMMON_MS1,
Name=DiagnosticsJMXNotificationSource,
Type=WLDFWatchJMXNotificationRuntime,WLDFRuntime=WLDFRuntime,WLDFWatchNotificationRuntime=WatchNotification
When I run jconsole I can see that this bean is not created early on in the clustered environment during restart and I get this exception:
SEVERE: javax.management.InstanceNotFoundException: com.bea:ServerRuntime=WLS1_COMMON_MS1,Name=DiagnosticsJMXNotificationSource,Type=WLDFWatchJMXNotificationRuntime,WLDFRuntime=WLDFRuntime,WLDFWatchNotificationRuntime=WatchNotification
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.addNotificationListener(DefaultMBeanServerInterceptor.java:1190)
at com.sun.jmx.mbeanserver.JmxMBeanServer.addNotificationListener(JmxMBeanServer.java:801)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$19.run(WLSMBeanServerInterceptorBase.java:511)
Here are the different tests I've done:
1. local windows machine, admin server, serverlet listener context initiazed - always works - I can see the bean and hook up a listener
2. linux cluster, app cycle listener - always works
3. linux cluster, serverlet listener context initiazed, mostly fails - can't find the com.bea... bean
For case #3 we have an older war project that will eventually be updated to an ear but for now I don't want to
do that because I will end up having to update around 10 of the war projects at the same time. I want to use
the servlet context initialized for now, if it's possible.
So, for some reason the servlet listener on linux runs early and I can't get the JMX notifications to work. I tried
adding a thread sleep but that seems to just block the bean creation and still I see the failure. So, how can I get
this to work?
thanks,
Paul.I converted the war project to an ear project and I'm still seeing the same problem - the bea.com beans don't show. I added some simple test code in postStart:
for ( String domain : beanServer.getDomains() )
logger.info( "domain: " + domain );
on my local machine I see:
INFO: domain: Security
INFO: domain: com.sun.management
INFO: domain: JMImplementation
INFO: domain: com.oracle.jdbc
INFO: domain: com.bea
and on the cluster w/ many managed servers I see:
INFO: domain: JMImplementation
INFO: domain: oracle.jrockit.management
INFO: domain: com.sun.management
INFO: domain: com.oracle.jrockit
INFO: domain: com.oracle.jdbc
INFO: domain: java.lang
INFO: domain: java.util.logging
So, the bea.com domain is missing? Is there some way to get this domain to be available?
thanks,
Paul. -
Writing a jmx monitor for a message driven bean
I've been reading about using jmx to monitor some jms resources I have deployed to my
WL server. This monitor would monitor "some" MBean to watch for some Stuck Threads which
cause a disconnect to the jms queue to which I listen.
The problem is I'm not sure which, I'm not exactly sure which MBean I need to monitor. My
JMS Listener is an MDB which listens to a queue on a remote weblogic server. What happens is
something on the remote end causes a connection reset. About 10 mins later, I get a stack trace
dump and after that happens I'm no longer able to pull messages off my jms queue. I see logged
events where it says I'm successfully reconnected to my queue, but no amount of wishing will
let the MDB pull a message off the queue.
When the monitor detects a Stuck Thread, I'd like to force an application restart/redeployment, whichever
will accomplish a reconnection to the queue to which I'm listening. The other day, I went in through
the console, did a Lock/Edit and simply updated the already deployed application. Monitoring the log
file, I saw the mdb successfully reastablish connection to my remote end.
However, with 600+ MBeans, I'm kinda stuck on where I should start! Since I see the
stack trace in the AdminServer.log file, I'm thinking I should monitor some LoggingMBean.
But, it is JMS related, so there exists some confusion on my part.
If anyone with JMX experience could point me in the right direction, I'd appreciate
it. I'm just learning jmx, so pls be patient.
Thanks,
JohnYou have a couple of options here. You could monitor the WorkManagerRuntimeMBean's StuckThreadCount using a JMX Counter monitor, and trigger the action when that goes above 0.
You could also use WLDF to configure a Log watch to look for the Stuck thread log message, or use a Collected Metrics watch on the WM attribute, and assign it a JMX Notification. You could then write a JMX Notification listener to capture this event and perform the necessary corrective actions. -
Using JMX to get rollback statistics
Has anyone used MBean monitoring to get WebLogic transaction rollback statistics? Is there any example code for this out there?
thanks,
Jake VogelaarHello Adam,
Adam Lunger wrote:
I have registered a notification listener with a JMSDestinationRuntimeMBean, but I don't get any notifications.
What notifications are sent from the JMSDestinationRuntimeMBean? All kinds of JMX Notifications like AttributeChangeNotifications.
>
Specifically I want to receive notifications when the MesssagesCurrentCount changes. Can I use JMX to get these notifications? Any help is appreciated.Yes, you can use JMX to get notifications when this attribute changes.
Check out
http://e-docs.bea.com/wls/docs81/jmx/notifications.html#1118345
Thanks,
-satya -
OIM Log file DEBUG isn't showing up
Hi All,
I have the following in some java code:
this.logger = Logger.getLogger("Flat File Reconciliation");
and I'm trying to change the log output to show DEBUg messages, currently it only shows INFO.
I have added:
<category name="Flat File Reconciliation">
<priority value="DEBUG"/>
</category>
to my jboss log4j.xml file, restarted OIM, but I still only see INFO [FLAT FILE RECONCILIATION] in the log. What am I doing wrong?
Thank you very much
AlexSo I added
log4j.logger.FLAT FILE RECONCILIATION=DEBUG
to my log.properties file but still no go. I thought this file isn't used if using jboss?
Here is my log4j.xml file in case someone picks up a bad configuration:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<!-- ===================================================================== -->
<!-- -->
<!-- Log4j Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
<!--
| For more configuration infromation and examples see the Jakarta Log4j
| owebsite: http://jakarta.apache.org/log4j
-->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<!-- ================================= -->
<!-- Preserve messages in a local file -->
<!-- ================================= -->
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.home.dir}/log/server.log"/>
<param name="Append" value="false"/>
<!-- Rollover at midnight each day -->
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<!-- Rollover at the top of each hour
<param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
-->
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
<!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
<param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
-->
</layout>
</appender>
<!-- A size based file rolling appender
<appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.home.dir}/log/server.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="500KB"/>
<param name="MaxBackupIndex" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
</layout>
</appender>
-->
<!-- ============================== -->
<!-- Append messages to the console -->
<!-- ============================== -->
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
<param name="Threshold" value="INFO"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
</layout>
</appender>
<!-- ====================== -->
<!-- More Appender examples -->
<!-- ====================== -->
<!-- Buffer events and log them asynchronously
<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<appender-ref ref="FILE"/>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="SMTP"/>
</appender>
-->
<!-- EMail events to an administrator
<appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Threshold" value="ERROR"/>
<param name="To" value="[email protected]"/>
<param name="From" value="[email protected]"/>
<param name="Subject" value="JBoss Sever Errors"/>
<param name="SMTPHost" value="localhost"/>
<param name="BufferSize" value="10"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
</layout>
</appender>
-->
<!-- Syslog events
<appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Facility" value="LOCAL7"/>
<param name="FacilityPrinting" value="true"/>
<param name="SyslogHost" value="localhost"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
</layout>
</appender>
-->
<!-- Log events to JMS (requires a topic to be created)
<appender name="JMS" class="org.apache.log4j.net.JMSAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Threshold" value="ERROR"/>
<param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/>
<param name="TopicBindingName" value="topic/MyErrorsTopic"/>
</appender>
-->
<!-- Log events through SNMP
<appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="ImplementationClassName" value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
<param name="ManagementHost" value="127.0.0.1"/>
<param name="ManagementHostTrapListenPort" value="162"/>
<param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
<param name="LocalIPAddress" value="127.0.0.1"/>
<param name="LocalTrapSendPort" value="161"/>
<param name="GenericTrapType" value="6"/>
<param name="SpecificTrapType" value="12345678"/>
<param name="CommunityString" value="public"/>
<param name="ForwardStackTraceWithTrap" value="true"/>
<param name="Threshold" value="DEBUG"/>
<param name="ApplicationTrapOID" value="1.3.6.1.4.1.24.12.10.22.64"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d,%p,[%t],[%c],%m%n"/>
</layout>
</appender>
-->
<!-- Emit events as JMX notifications
<appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Threshold" value="WARN"/>
<param name="ObjectName" value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m"/>
</layout>
</appender>
-->
<!-- ================ -->
<!-- Limit categories -->
<!-- ================ -->
<!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
<category name="org.apache">
<priority value="INFO"/>
</category>
<!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
<category name="org.jgroups">
<priority value="WARN"/>
</category>
<!-- Limit jboss axis to INFO as its DEBUG is even more verbose -->
<category name="org.jboss.axis">
<priority value="INFO"/>
</category>
<!-- Limit JBoss categories
<category name="org.jboss">
<priority value="INFO"/>
</category>
-->
<!-- Limit the JSR77 categories -->
<category name="org.jboss.management">
<priority value="INFO"/>
</category>
<!-- Limit JBoss webservice category
<category name="org.jboss.webservice">
<priority value="DEBUG"/>
</category>
-->
<!-- Decrease the priority threshold for the org.jboss.varia category
<category name="org.jboss.varia">
<priority value="DEBUG"/>
</category>
-->
<!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
<category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
<priority value="TRACE" class="org.jboss.logging.XLevel"/>
</category>
-->
<!--
| An example of enabling the custom TRACE level priority that is used
| by the JBoss internals to diagnose low level details. This example
| turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
| subpackages. This will produce A LOT of logging output.
<category name="org.jboss.system">
<priority value="TRACE" class="org.jboss.logging.XLevel"/>
</category>
<category name="org.jboss.ejb.plugins">
<priority value="TRACE" class="org.jboss.logging.XLevel"/>
</category>
-->
<!--
| Logs these events to SNMP:
- server starts/stops
- cluster evolution (node death/startup)
- When an EJB archive is deployed (and associated verified messages)
- When an EAR archive is deployed
<category name="org.jboss.system.server.Server">
<priority value="INFO" />
<appender-ref ref="TRAP_LOG"/>
</category>
<category name="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
<priority value="INFO" />
<appender-ref ref="TRAP_LOG"/>
</category>
<category name="org.jboss.deployment.MainDeployer">
<priority value="ERROR" />
<appender-ref ref="TRAP_LOG"/>
</category>
<category name="org.jboss.ejb.EJBDeployer">
<priority value="INFO" />
<appender-ref ref="TRAP_LOG"/>
</category>
<category name="org.jboss.deployment.EARDeployer">
<priority value="INFO" />
<appender-ref ref="TRAP_LOG"/>
</category>
-->
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
<category name="XELLERATE.DDM">
<priority value="DEBUG"/>
</category>
<category name="Flat File Reconciliation">
<priority value="DEBUG"/>
</category>
<category name="XELLERATE">
<priority value="WARN"/>
</category>
<category name="com.nexaweb.server">
<priority value="WARN"/>
</category>
<root>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>
<!-- Clustering logging -->
<!-- Uncomment the following to redirect the org.jgroups and
org.jboss.ha categories to a cluster.log file.
<appender name="CLUSTER" class="org.jboss.logging.appender.RollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.home.dir}/log/cluster.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="500KB"/>
<param name="MaxBackupIndex" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
</layout>
</appender>
<category name="org.jgroups">
<priority value="DEBUG" />
<appender-ref ref="CLUSTER"/>
</category>
<category name="org.jboss.ha">
<priority value="DEBUG" />
<appender-ref ref="CLUSTER"/>
</category>
-->
</log4j:configuration> -
Why josso has no DataSource Credential Store?
Hello everyone,
Do you take care of studying the josso-gateway-config.xml and find the Credential Stroe block is lacking of a way to store the username/passport pairs by DataSource?
this is the josso-gateway-config.xml listed as below:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
~ Copyright (c) 2004-2006, Novascope S.A. and the JOSSO team
~ All rights reserved.
~ Redistribution and use in source and binary forms, with or
~ without modification, are permitted provided that the following
~ conditions are met:
~
~ * Redistributions of source code must retain the above copyright
~ notice, this list of conditions and the following disclaimer.
~
~ * Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in
~ the documentation and/or other materials provided with the
~ distribution.
~
~ * Neither the name of the JOSSO team nor the names of its
~ contributors may be used to endorse or promote products derived
~ from this software without specific prior written permission.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
~ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
~ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
~ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
~ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
~ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
~ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
~ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
~ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
~ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
~ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
~ POSSIBILITY OF SUCH DAMAGE.
-->
<domain>
<name>JOSSO</name>
<type>web</type>
<!--sso-web-config-->
<!-- Optional : The URL where the user will be redirected after a successfull login only if josso_back_to request parameter
is not present when accessing the login url
<loginBackToURL>http://localhost:8080/partnerapp/protected/</loginBackToURL>
-->
<!-- Optional : The URL where the user will be redirected after a logout only if josso_back_to is not present
when accessing the logout url
<logoutBackToURL>http://localhost:8080/partnerapp/protected/</logoutBackToURL>
-->
<!-- Session token properties -->
<!--session-token-->
<!-- Optional : Use a secure session token, a secure channel like SSL must be available for this to work
<secure>false</secure>
-->
<!--/session-token-->
<!--/sso-web-config-->
<authenticator>
<class>org.josso.auth.AuthenticatorImpl</class>
<authentication-schemes>
<!-- Basic Authentication Scheme -->
<authentication-scheme>
<name>basic-authentication</name>
<class>org.josso.auth.scheme.UsernamePasswordAuthScheme</class>
<!--
The message digest algorithm to be used when hashing passwords.
This must be an algorithm supported by the java.security.MessageDigest class
on your platform.
In J2SE 1.4.2 you can check :
Java Cryptography Architecture API Specification & Reference - Apendix B : Algorithms
Values are : MD2, MD5, SHA-1, SHA-256, SHA-384, SHA-512,etc.
To provide LDAP support, also CRYPT is available.
-->
<hashAlgorithm>MD5</hashAlgorithm>
<!-- Supported values are HEX, BASE64. Mandatory if hashAlgorithm was specified -->
<hashEncoding>HEX</hashEncoding>
<!-- Some hash algorithms, like CRYPT, use this property. The default value is 2.
<saltLength>2</saltLength>
-->
<ignorePasswordCase>false</ignorePasswordCase>
<ignoreUserCase>false</ignoreUserCase>
<!-- ========================================================= -->
<!-- JDBC Credential Store -->
<!-- -->
<!-- Always scape comma chars [,] in queries because -->
<!-- jakarta commons-configuration uses them to define arrays. -->
<!-- ========================================================= -->
<!--
<credential-store>
<class>org.josso.gateway.identity.service.store.db.JDBCIdentityStore</class>
<credentialsQueryString>
SELECT login AS username , password AS password FROM josso_user WHERE login = ?
</credentialsQueryString>
<connectionName>josso</connectionName>
<connectionPassword>josso</connectionPassword>
<connectionURL>jdbc:oracle:thin:@localhost:1521:josso_db</connectionURL>
<driverName>oracle.jdbc.driver.OracleDriver</driverName>
</credential-store>
<credential-store>
<class>org.josso.gateway.identity.service.store.db.DataSourceIdentityStore</class>
<credentialsQueryString>SELECT login AS username , password AS password FROM josso_user WHERE login = ?</credentialsQueryString>
<dsJndiName>java:jdbc/JossoSamplesDB</dsJndiName>
</credential-store>
-->
<!-- =============================================================== -->
<!-- LDAP Credential Store -->
<!-- -->
<!-- Chcek javadoc for configuration details : -->
<!-- org.josso.gateway.identity.service.store.ldap.LDAPIdentityStore -->
<!-- =============================================================== -->
<!--
<credential-store>
<class>org.josso.gateway.identity.service.store.ldap.LDAPIdentityStore</class>
<initialContextFactory>com.sun.jndi.ldap.LdapCtxFactory</initialContextFactory>
<providerUrl>ldap://ldaphost</providerUrl>
<securityPrincipal>cn=Manager,dc=my-domain,dc=com</securityPrincipal>
<securityCredential>secret</securityCredential>
<securityAuthentication>simple</securityAuthentication>
<ldapSearchScope>SUBTREE</ldapSearchScope>
<usersCtxDN>ou=People,dc=my-domain,dc=com</usersCtxDN>
<principalUidAttributeID>uid</principalUidAttributeID>
<rolesCtxDN>ou=Roles,dc=my-domain,dc=com</rolesCtxDN>
<uidAttributeID>uniquemember</uidAttributeID>
<roleAttributeID>cn</roleAttributeID>
<credentialQueryString>uid=username,userPassword=password</credentialQueryString>
<userPropertiesQueryString>mail=mail,cn=description</userPropertiesQueryString>
</credential-store>
-->
<!-- ================================================= -->
<!-- Memory Credential Store -->
<!-- ================================================= -->
<credential-store>
<class>org.josso.gateway.identity.service.store.MemoryIdentityStore</class>
<credentialsFileName>josso-credentials.xml</credentialsFileName>
</credential-store>
<!-- ================================================= -->
<!-- Credential Store Key adapter -->
<!-- ================================================= -->
<credential-store-key-adapter>
<class>org.josso.gateway.identity.service.store.SimpleIdentityStoreKeyAdapter</class>
</credential-store-key-adapter>
</authentication-scheme>
<!-- Strong Authentication Scheme -->
<authentication-scheme>
<name>strong-authentication</name>
<class>org.josso.auth.scheme.X509CertificateAuthScheme</class>
<!-- ========================================================= -->
<!-- JDBC Credential Store -->
<!-- -->
<!-- Always scape comma chars [,] in queries because -->
<!-- jakarta commons-configuration uses them to define arrays. -->
<!-- ========================================================= -->
<!--
<credential-store>
<class>org.josso.gateway.identity.service.store.db.JDBCIdentityStore</class>
<credentialsQueryString>
SELECT login AS username , password AS password FROM josso_user WHERE login = ?
</credentialsQueryString>
<connectionName>josso</connectionName>
<connectionPassword>josso</connectionPassword>
<connectionURL>jdbc:oracle:thin:@localhost:1521:josso_db</connectionURL>
<driverName>oracle.jdbc.driver.OracleDriver</driverName>
</credential-store>
-->
<!-- =============================================================== -->
<!-- LDAP Credential Store -->
<!-- -->
<!-- Chcek javadoc for configuration details : -->
<!-- org.josso.gateway.identity.service.store.ldap.LDAPIdentityStore -->
<!-- =============================================================== -->
<!--
<credential-store>
<class>org.josso.gateway.identity.service.store.ldap.LDAPIdentityStore</class>
<initialContextFactory>com.sun.jndi.ldap.LdapCtxFactory</initialContextFactory>
<providerUrl>ldap://ldaphost</providerUrl>
<securityPrincipal>cn=Manager,dc=my-domain,dc=com</securityPrincipal>
<securityCredential>secret</securityCredential>
<securityAuthentication>simple</securityAuthentication>
<ldapSearchScope>SUBTREE</ldapSearchScope>
<usersCtxDN>ou=People,dc=my-domain,dc=com</usersCtxDN>
<principalUidAttributeID>uid</principalUidAttributeID>
<rolesCtxDN>ou=Roles,dc=my-domain,dc=com</rolesCtxDN>
<uidAttributeID>uniquemember</uidAttributeID>
<roleAttributeID>cn</roleAttributeID>
<credentialQueryString>uid=username,userCertificate;binary=userCertificate</credentialQueryString>
<userPropertiesQueryString>mail=mail,cn=description</userPropertiesQueryString>
</credential-store>
-->
<!-- ================================================= -->
<!-- Memory Credential Store -->
<!-- ================================================= -->
<credential-store>
<class>org.josso.gateway.identity.service.store.MemoryIdentityStore</class>
<credentialsFileName>josso-credentials.xml</credentialsFileName>
</credential-store>
<!-- ================================================= -->
<!-- Credential Store Key adapter -->
<!-- ================================================= -->
<credential-store-key-adapter>
<class>org.josso.gateway.identity.service.store.SimpleIdentityStoreKeyAdapter</class>
</credential-store-key-adapter>
</authentication-scheme>
</authentication-schemes>
</authenticator>
<sso-identity-manager>
<class>org.josso.gateway.identity.service.SSOIdentityManagerImpl</class>
<!-- ========================================================= -->
<!-- DataSource Identity Store -->
<!-- -->
<!-- Always scape comma chars [,] in queries because -->
<!-- jakarta commons-configuration uses them to define arrays. -->
<!-- ========================================================= -->
<!--
<sso-identity-store>
<class>org.josso.gateway.identity.service.store.db.DataSourceIdentityStore</class>
<userQueryString>
SELECT login FROM josso_user WHERE login = ?
</userQueryString>
<userPropertiesQueryString>
SELECT 'user.description' AS name , description AS value FROM josso_user WHERE login = ?
UNION
SELECT name AS name , value AS value FROM josso_user_property WHERE login = ?
</userPropertiesQueryString>
<rolesQueryString>
SELECT josso_role.name FROM josso_role , josso_user_role , josso_user WHERE josso_user.login = ? AND josso_user.login = josso_user_role.login AND josso_role.name = josso_user_role.name
</rolesQueryString>
<dsJndiName>java:jdbc/JossoSamplesDB</dsJndiName>
</sso-identity-store>
-->
<!-- ========================================================= -->
<!-- JDBC Identity Store -->
<!-- -->
<!-- Always scape comma chars [,] in queries because -->
<!-- jakarta commons-configuration uses them to define arrays. -->
<!-- ========================================================= -->
<!--sso-identity-store>
<class>org.josso.gateway.identity.service.store.db.JDBCIdentityStore</class>
<userQueryString>
SELECT login FROM josso_user WHERE login = ?
</userQueryString>
You could use a UNION to select properties from different tables/columns :
SELECT 'user.lastName' AS name , lastName AS value FROM josso_user WHERE login = ?
UNION
SELECT 'user.name' AS name , name AS value FROM josso_user WHERE login = ?
UNION
SELECT name AS name , value AS value FROM josso_user_properties WHERE login = ?
<userPropertiesQueryString>
SELECT 'user.description' AS name , description AS value FROM josso_user WHERE login = ?
UNION
SELECT name AS name , value AS value FROM josso_user_property WHERE login = ?
</userPropertiesQueryString>
<rolesQueryString>
SELECT josso_role.name FROM josso_role , josso_user_role , josso_user WHERE josso_user.login = ? AND josso_user.login = josso_user_role.login AND josso_role.name = josso_user_role.name
</rolesQueryString>
<connectionName>josso</connectionName>
<connectionPassword>josso</connectionPassword>
<connectionURL>jdbc:oracle:thin:@localhost:1521:josso_db</connectionURL>
<driverName>oracle.jdbc.driver.OracleDriver</driverName>
</sso-identity-store-->
<!-- =============================================================== -->
<!-- LDAP Identity Store -->
<!-- -->
<!-- Chcek javadoc for configuration details : -->
<!-- org.josso.gateway.identity.service.store.ldap.LDAPIdentityStore -->
<!-- ================================================= -->
<!--
<sso-identity-store>
<class>org.josso.gateway.identity.service.store.ldap.LDAPIdentityStore</class>
<initialContextFactory>com.sun.jndi.ldap.LdapCtxFactory</initialContextFactory>
<providerUrl>ldap://ldaphost</providerUrl>
<securityPrincipal>cn=Manager,dc=my-domain,dc=com</securityPrincipal>
<securityCredential>secret</securityCredential>
<securityAuthentication>simple</securityAuthentication>
<ldapSearchScope>SUBTREE</ldapSearchScope>
<usersCtxDN>ou=People,dc=my-domain,dc=com</usersCtxDN>
<principalUidAttributeID>uid</principalUidAttributeID>
<rolesCtxDN>ou=Roles,dc=my-domain,dc=com</rolesCtxDN>
<uidAttributeID>uniquemember</uidAttributeID>
<roleAttributeID>cn</roleAttributeID>
<credentialQueryString>uid=username,userPassword=password</credentialQueryString>
<userPropertiesQueryString>mail=mail,cn=description</userPropertiesQueryString>
</sso-identity-store>
-->
<!-- ================================================= -->
<!-- Memory Identity Store -->
<!-- ================================================= -->
<sso-identity-store>
<class>org.josso.gateway.identity.service.store.MemoryIdentityStore</class>
<usersFileName>josso-users.xml</usersFileName>
</sso-identity-store>
<!-- ================================================= -->
<!-- Identity Store Key adapter -->
<!-- ================================================= -->
<sso-identity-store-key-adapter>
<class>org.josso.gateway.identity.service.store.SimpleIdentityStoreKeyAdapter</class>
</sso-identity-store-key-adapter>
</sso-identity-manager>
<sso-session-manager>
<class>org.josso.gateway.session.service.SSOSessionManagerImpl</class>
<!--
Set the maximum time interval, in minutes, between client requests before the SSO Service will invalidate
the session. A negative time indicates that the session should never time out.
-->
<maxInactiveInterval>30</maxInactiveInterval>
<!-- Max number of sessions per user, default 1
A negative value indicates that an unlimited number of sessions per user is allowed.
-->
<maxSessionsPerUser>-1</maxSessionsPerUser>
<!--
If true, when the max number of sessions per user is exceeded,
an already existing session will be invalidated to create a new one.
If false, when the max number of sessions per user is exceeded,
an exception is thrown and the new session is not created.
-->
<invalidateExceedingSessions>false</invalidateExceedingSessions>
<!--
Time interval, in milliseconds, between exired sessions cleanup.
-->
<sessionMonitorInterval>10000</sessionMonitorInterval>
<!-- =================================================================== -->
<!-- Serialized Session Store -->
<!-- -->
<!-- Session Store implementation which uses Java Serialization to -->
<!-- persist Single Sign-On user sessions. -->
<!-- It allows to reconstruct the session state after a system shutdown. -->
<!-- =================================================================== -->
<!--
<sso-session-store>
<class>org.josso.gateway.session.service.store.SerializedSessionStore</class>
file where serialized sessions will be stored (optional)
<serializedFile>/tmp/josso_sessions.ser</serializedFile>
</sso-session-store>
-->
<!-- =============================================================== -->
<!-- DataSource Session Store -->
<!-- -->
<!-- This store persists SSO sessions in a RDBMS, it's usefull for -->
<!-- example when multiple SSO servers must share session information-->
<!-- like in a cluster. -->
<!-- -->
<!-- NOTE :Remember to escape spetial chars like < with < , etc -->
<!-- -->
<!-- -->
<!-- Chcek javadoc for configuration details : -->
<!-- org.josso.gateway.session.service.store.db.DataSourceSessionStore -->
<!-- =============================================================== -->
<!--
<sso-session-store>
<class>org.josso.gateway.session.service.store.db.DataSourceSessionStore</class>
<dsJndiName>java:jdbc/JossoSamplesDB</dsJndiName>
<sizeQuery>SELECT COUNT(*) FROM JOSSO_SESSION</sizeQuery>
<keysQuery>SELECT session_id FROM JOSSO_SESSION</keysQuery>
<loadAllQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION</loadAllQuery>
<loadQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION WHERE session_id = ?</loadQuery>
<loadByUserNameQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION WHERE username = ?</loadByUserNameQuery>
<loadByLastAccessTimeQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION WHERE last_access_time < ?</loadByLastAccessTimeQuery>
<loadByValidQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION WHERE valid = ?</loadByValidQuery>
<deleteDml>DELETE FROM JOSSO_SESSION WHERE session_id = ?</deleteDml>
<deleteAllDml>DELETE FROM JOSSO_SESSION</deleteAllDml>
<insertDml>INSERT INTO JOSSO_SESSION (session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid) VALUES (?, ?, ?, ?, ?, ?, ?) </insertDml>
<dsJndiName>java:jdbc/JossoSamplesDB</dsJndiName>
</sso-session-store>
-->
<!-- =============================================================== -->
<!-- Jdbc Session Store -->
<!-- -->
<!-- This store persists SSO sessions in a RDBMS, it's usefull for -->
<!-- example when multiple SSO servers must share session information-->
<!-- like in a cluster. -->
<!-- -->
<!-- NOTE :Remember to escape spetial chars like < with < , etc -->
<!-- -->
<!-- Chcek javadoc for configuration details : -->
<!-- org.josso.gateway.session.service.store.db.JdbcSessionStore -->
<!-- =============================================================== -->
<!--
<sso-session-store>
<class>org.josso.gateway.session.service.store.db.JdbcSessionStore</class>
<connectionName>josso</connectionName>
<connectionPassword>josso</connectionPassword>
<connectionURL>jdbc:oracle:thin:@localhost:1521:josso_db</connectionURL>
<driverName>oracle.jdbc.driver.OracleDriver</driverName>
<sizeQuery>SELECT COUNT(*) FROM JOSSO_SESSION</sizeQuery>
<keysQuery>SELECT session_id FROM JOSSO_SESSION</keysQuery>
<loadAllQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION</loadAllQuery>
<loadQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION WHERE session_id = ?</loadQuery>
<loadByUserNameQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION WHERE username = ?</loadByUserNameQuery>
<loadByLastAccessTimeQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION WHERE last_access_time < ?</loadByLastAccessTimeQuery>
<loadByValidQuery>SELECT session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid FROM JOSSO_SESSION WHERE valid = ?</loadByValidQuery>
<deleteDml>DELETE FROM JOSSO_SESSION WHERE session_id = ?</deleteDml>
<deleteAllDml>DELETE FROM JOSSO_SESSION</deleteAllDml>
<insertDml>INSERT INTO JOSSO_SESSION (session_id, userName, creation_time, last_access_time, access_count, max_inactive_interval, valid) VALUES (?, ?, ?, ?, ?, ?, ?) </insertDml>
</sso-session-store>
-->
<!-- =============================================================== -->
<!-- Memory Session Store -->
<!-- =============================================================== -->
<sso-session-store>
<class>org.josso.gateway.session.service.store.MemorySessionStore</class>
</sso-session-store>
<sso-session-id-generator>
<class>org.josso.gateway.session.service.SessionIdGeneratorImpl</class>
<!--
The message digest algorithm to be used when generating session
identifiers. This must be an algorithm supported by the
java.security.MessageDigest class on your platform.
In J2SE 1.4.2 you can check :
Java Cryptography Architecture API Specification & Reference - Apendix A : Standard Names
Values are : MD2, MD5, SHA-1, SHA-256, SHA-384, SHA-512
-->
<algorithm>MD5</algorithm>
</sso-session-id-generator>
</sso-session-manager>
<!-- SSO Audit Manager compoment -->
<sso-audit-manager>
<class>org.josso.gateway.audit.service.SSOAuditManagerImpl</class>
<!--
List of handlers that will process this request
Every handler must have its own unique name.
-->
<handlers>
<!-- This handler logs all audit trails using Log4J, under the given category -->
<handler>
<class>org.josso.gateway.audit.service.handler.LoggerAuditTrailHandler</class>
<name>LoggerAuditTrailHandler</name>
<category>org.josso.gateway.audit.SSO_AUDIT</category>
</handler>
<!--
<handler>
<class>MyOtherHandler</class>
<name>MyOhterHandlerName</name>
<myProperty>value</myProperty>
</handler>
-->
</handlers>
</sso-audit-manager>
<!-- SSO Event Manager component -->
<sso-event-manager>
<class>org.josso.gateway.event.security.JMXSSOEventManagerImpl</class>
<!--
JMX Name of the EventManager MBean that will send SSO Events as JMX Notifications
The MBean will be registered by the MBeanComponentKeeper.
-->
<oname>josso:type=SSOEventManager</oname>
<!-- You can add your own listeners here : -->
<!-- Every listener should have a unique name -->
<!--
<listeners>
<listener>
<class>com.myCompany.MyEventListener</class>
<name>MyEventListener</name>
<property1>MyListenerProperty1Value</property1>
</listener>
<listener>
<class>com.myCompany.MyOtherEventListener</class>
<name>MyOtherEventListener</name>
<propertyA>MyOtherListenerPropertyAValue</propertyA>
</listener>
</listeners>
-->
</sso-event-manager>
</domain>
Is it means there is only way in Josso to save the username/passport by use of JDBC?
If you find the datasource can be used, plz tell me how?oH, sorry , I found it !
there is no problem here! -
Oracle DataSource configuration on JBoss3.x
Hello,
Can any1 plz help me in configuring Oracle 9i DataSource with JBoss 3.x?? I know JBoss 3.x comes with Hypersonic DB as a default DataBase.
I downloaded ejb examples from http://www.titan-books.com. This site contain examples from O'Reilly's Enterprise JavaBeans, Third Edition by Richard Monson-Haefel's book.Examples are server specific and its available for few application servers (e.g Weblogic, WebSphere,JBoss etc).I am able to deploy and run the example EJBs. It automatically creates tables in the DB. Its using default DB ie Hypersonic DataBase.
Now I want to see the database and different tables within that DB.How can i do that.Like i can see different tables in Oracle DB using SQLPlus and they can be quried too. I want something very similar for Hypersonic DataBase too. How can i do that?????
Well my second prob is, I want to configure oracle datasource and pool in JBoss 3.x Application server. How do i do that?? Lemme tell u what all I have done so far. I have copied oracle-service.xml file in D:\Jboss-3.0.3\server\default\deploy directory. changed the file according to my database's SID and pswd. Following is the oracle-service.xml file after modification. I restarted my application server.
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<server>
<!-- ==================================================================== -->
<!-- ConnectionManager setup for Oracle dbs -->
<!-- Build jmx-api (build/build.sh all) and view for config documentation -->
<!-- Thanks to Steven Coy -->
<!-- ==================================================================== -->
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=OracleDS">
<!-- Include a login module configuration named OracleDbRealm.
Update your login-conf.xml, here is an example for a
ConfiguredIdentityLoginModule:
<application-policy name = "OracleDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">yourprincipal</module-option>
<module-option name = "userName">yourusername</module-option>
<module-option name = "password">yourpassword</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
</login-module>
</authentication>
</application-policy>
NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
module-option name = "managedConnectionFactoryName"
must match the object name of the ConnectionManager you are configuring here.
-->
<!--uncomment out this line if you are using the OracleDbRealm above
<attribute name="SecurityDomainJndiName">OracleDbRealm</attribute>
-->
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=OracleDS">
<attribute name="JndiName">OracleDS</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@localhost:1521:jam</config-property>
<config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String"></config-property>
<config-property name="Password" type="java.lang.String"></config-property>
</properties>
</attribute>
<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=OracleDS">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)-->
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
<attribute name="TransactionManager">java:/TransactionManager</attribute>
<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>
</mbean>
</server>
Even after restarting my server i m getting errors like....
15:14:40,537 WARN [ServiceController] Problem starting service jboss.j2ee:jndiN
ame=CustomerHomeRemote,service=EJB
org.jboss.deployment.DeploymentException: Error: can't find data source: java:/O
racleDS; - nested throwable: (javax.naming.NameNotFoundException: OracleDS not b
ound)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.<init>(JDBCEnt
ityBridge.java:99)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBC
StoreManager.java:397)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
r.java:339)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
er.java:198)
at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
at org.jboss.ejb.Container.invoke(Container.java:756)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:976)
at $Proxy5.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:397)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy25.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:976)
at $Proxy5.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:397)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy11.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:394)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy4.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:427)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:553)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:212)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
loop(AbstractDeploymentScanner.java:225)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
run(AbstractDeploymentScanner.java:202)
Caused by: javax.naming.NameNotFoundException: OracleDS not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:456)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.<init>(JDBCEnt
ityBridge.java:96)
... 51 more
15:14:41,398 INFO [EjbModule] Started
15:14:41,408 INFO [MainDeployer] Deployed package: file:/D:/Softwares/Jboss-3.0
.3/server/default/deploy/titan.jar
15:14:41,428 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
ration 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
[org.jboss.deployment.DeploymentInfo@4e8000b0 { url=file:/D:/Softwares/Jboss-3.0
.3/server/default/deploy/oracle-service.xml }
deployer: org.jboss.deployment.SARDeployer@482923
status: Deployment FAILED reason: Trying to install an already registered mbea
n: jboss.jca:service=LocalTxCM,name=OracleDS
state: FAILED
watch: file:/D:/Softwares/Jboss-3.0.3/server/default/deploy/oracle-service.xml
lastDeployed: 1044524015691
lastModified: 1044524016000
mbeans:
]MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss.jca:service=LocalTxCM,name=OracleDS
state: CONFIGURED
I Depend On: jboss.jca:service=LocalTxDS,name=OracleDS
jboss.jca:service=LocalTxPool,name=OracleDS
jboss.jca:service=CachedConnectionManager
jboss.security:name=JaasSecurityManager
jboss.jca:service=RARDeployer
Depends On Me: , ObjectName: jboss.j2ee:jndiName=CustomerHomeRemote,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data
source: java:/OracleDS; - nested throwable: (javax.naming.NameNotFoundException
: OracleDS not bound)]
16:44:04,450 INFO [EJBDeployer] Creating
16:44:04,490 INFO [EJBDeployer] Created
16:47:16,767 INFO [jbossweb] Registered jboss.web:Jetty=0,HttpContext=0,context
=/
16:47:17,227 INFO [jbossweb] Started HttpContext[]
Can any one tell me what else i need to do to make it running. Do i need to make some other changes in some file??
Tx in advance
JameelI have done all of the above suggested, however, i still getting an error, not sure where the problem lies now.
Could anyone help please.
The following is just part of what's being printed hwen starting using run.sh.
at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:389)
at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:368)
at org.jboss.naming.Util.rebind(Util.java:108)
at org.jboss.naming.Util.rebind(Util.java:95)
at org.jboss.proxy.ejb.ProxyFactory.rebindHomeProxy(ProxyFactory.java:350)
at org.jboss.proxy.ejb.ProxyFactory.bindProxy(ProxyFactory.java:337)
at org.jboss.proxy.ejb.ProxyFactory.start(ProxyFactory.java:187)
at org.jboss.ejb.StatelessSessionContainer.start(StatelessSessionContainer.java:206)
at org.jboss.ejb.Container.invoke(Container.java:756)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
at $Proxy4.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:413)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy16.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
at $Proxy4.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:413)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy10.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:395)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy3.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDe
ploymentScanner.java:656)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:507)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
bstractDeploymentScanner.java:261)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:413)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy2.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:230)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:575)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:325)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:222)
at org.jboss.Main.boot(Main.java:148)
at org.jboss.Main$1.run(Main.java:381)
at java.lang.Thread.run(Thread.java:484)
17:52:02,911 INFO [EjbModule] Started
17:52:02,911 INFO [MainDeployer] Deployed package: file:/D:/jboss/jboss-3.0.6/server/default/deploy/jmx-ejb-adaptor.jar
17:52:02,911 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss/jboss-3.0.6/server/default/deploy/jmx-console.war/
17:52:03,001 INFO [Manager] cloning Manager: org.mortbay.j2ee.session.Manager@10832e
17:52:03,001 INFO [JBossWebApplicationContext] setDistributableSessionManager org.mortbay.j2ee.session.Manager@5e538e
17:52:03,252 INFO [jbossweb] Registered jboss.web:Jetty=0,JBossWebApplicationContext=1,context=/jmx-console
17:52:04,323 INFO [jbossweb] Started WebApplicationContext[jmx-console,file:/D:/jboss/jboss-3.0.6/server/default/deploy/jmx-console.war/]
17:52:04,394 INFO [jbossweb] successfully deployed file:/D:/jboss/jboss-3.0.6/server/default/deploy/jmx-console.war/ to /jmx-console
17:52:04,394 INFO [MainDeployer] Deployed package: file:/D:/jboss/jboss-3.0.6/server/default/deploy/jmx-console.war/
17:52:04,404 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
<none>
MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss:service=Webserver
state: FAILED
I Depend On:
Depends On Me: java.net.BindException: Address in use: JVM_Bind, ObjectName: jb
oss:service=invoker,type=jrmp
state: FAILED
I Depend On:
Depends On Me: java.rmi.ServerException: Could not bind JRMP invoker; nested ex
ception is:
java.rmi.server.ExportException: Port already in use: 4444; nested excep
tion is:
java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss.mq:s
ervice=InvocationLayer,type=OIL
state: FAILED
I Depend On: jboss.mq:service=Invoker
Depends On Me: java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss.mq:service=InvocationLayer,type=UIL
state: FAILED
I Depend On: jboss.mq:service=Invoker
Depends On Me: java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss.jca:service=LocalTxCM,name=OracleDS
state: CONFIGURED
I Depend On: jboss.jca:service=LocalTxDS,name=OracleDS
jboss.jca:service=LocalTxPool,name=OracleDS
jboss.jca:service=CachedConnectionManager
jboss.security:name=JaasSecurityManager
jboss.jca:service=RARDeployer
Depends On Me: , ObjectName: jboss.j2ee:jndiName=ejb/mgmt/MEJB,service=EJB
state: FAILED
I Depend On:
Depends On Me: java.rmi.ServerException: Could not bind home; nested exception is:
javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: object not exported], ObjectName: jboss.j2ee:jndiName=ejb/jmx/ejb
/Adaptor,service=EJB
state: FAILED
I Depend On:
Depends On Me: java.rmi.ServerException: Could not bind home; nested exception is:
javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: object not exported]]
17:52:04,424 INFO [URLDeploymentScanner] Started
17:52:04,424 INFO [MainDeployer] Deployed package: file:/D:/jboss/jboss-3.0.6/s
erver/default/conf/jboss-service.xml
17:52:04,424 ERROR [Server] start failed
Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
<none>
MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss:service=Webserver
state: FAILED
I Depend On:
Depends On Me: java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss:service=invoker,type=jrmp
state: FAILED
I Depend On:
Depends On Me: java.rmi.ServerException: Could not bind JRMP invoker; nested exception is:
java.rmi.server.ExportException: Port already in use: 4444; nested exception is:
java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss.mq:service=InvocationLayer,type=OIL
state: FAILED
I Depend On: jboss.mq:service=Invoker
Depends On Me: java.net.BindException: Address in use: JVM_Bind, ObjectName: jb
oss.mq:service=InvocationLayer,type=UIL
state: FAILED
I Depend On: jboss.mq:service=Invoker
Depends On Me: java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss.jca:service=LocalTxCM,name=OracleDS
state: CONFIGURED
I Depend On: jboss.jca:service=LocalTxDS,name=OracleDS
jboss.jca:service=LocalTxPool,name=OracleDS
jboss.jca:service=CachedConnectionManager
jboss.security:name=JaasSecurityManager
jboss.jca:service=RARDeployer
Depends On Me: , ObjectName: jboss.j2ee:jndiName=ejb/mgmt/MEJB,service=EJB
state: FAILED
I Depend On:
Depends On Me: java.rmi.ServerException: Could not bind home; nested exception
is:
javax.naming.CommunicationException [Root exception is java.rmi.NoSuchOb
jectException: object not exported], ObjectName: jboss.j2ee:jndiName=ejb/jmx/ejb
/Adaptor,service=EJB
state: FAILED
I Depend On:
Depends On Me: java.rmi.ServerException: Could not bind home; nested exception is:
javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: object not exported]]
at org.jboss.deployment.MainDeployer.checkIncompleteDeployments(MainDeployer.java:1134)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:594)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:575)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:325)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:222)
at org.jboss.Main.boot(Main.java:148)
at org.jboss.Main$1.run(Main.java:381)
at java.lang.Thread.run(Thread.java:484)
17:52:04,444 ERROR [STDERR] Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
<none>
MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss:service=Webserver
state: FAILED
I Depend On:
Depends On Me: java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss:service=invoker,type=jrmp
state: FAILED
I Depend On:
Depends On Me: java.rmi.ServerException: Could not bind JRMP invoker; nested exception is:
java.rmi.server.ExportException: Port already in use: 4444; nested exception is:
java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss.mq:service=InvocationLayer,type=OIL
state: FAILED
I Depend On: jboss.mq:service=Invoker
Depends On Me: java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss.mq:service=InvocationLayer,type=UIL
state: FAILED
I Depend On: jboss.mq:service=Invoker
Depends On Me: java.net.BindException: Address in use: JVM_Bind, ObjectName: jboss.jca:service=LocalTxCM,name=OracleDS
state: CONFIGURED
I Depend On: jboss.jca:service=LocalTxDS,name=OracleDS
jboss.jca:service=LocalTxPool,name=OracleDS
jboss.jca:service=CachedConnectionManager
jboss.security:name=JaasSecurityManager
jboss.jca:service=RARDeployer
Depends On Me: , ObjectName: jboss.j2ee:jndiName=ejb/mgmt/MEJB,service=EJB
state: FAILED
I Depend On:
Depends On Me: java.rmi.ServerException: Could not bind home; nested exception is:
javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: object not exported], ObjectName: jboss.j2ee:jndiName=ejb/jmx/ejb
/Adaptor,service=EJB
state: FAILED
I Depend On:
Depends On Me: java.rmi.ServerException: Could not bind home; nested exception is:
javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: object not exported]]
17:52:04,444 ERROR [STDERR] at org.jboss.deployment.MainDeployer.checkIncomp
leteDeployments(MainDeployer.java:1134)
17:52:04,444 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(Main
Deployer.java:594)
17:52:04,444 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(Main
Deployer.java:575)
17:52:04,444 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
17:52:04,444 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatc
her.invoke(ReflectedMBeanDispatcher.java:284)
17:52:04,444 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:517)
17:52:04,444 ERROR [STDERR] at org.jboss.system.server.ServerImpl.doStart(Se
rverImpl.java:325)
17:52:04,444 ERROR [STDERR] at org.jboss.system.server.ServerImpl.start(Serv
erImpl.java:222)
17:52:04,444 ERROR [STDERR] at org.jboss.Main.boot(Main.java:148)
17:52:04,454 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:381)
17:52:04,454 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484) -
Hi,
I want to know if I set a system property "-Dweblogic.ThreadPoolSize", how will the
WLS get to know that the pool size has been changed, at run time?
E.g. I pass -Dweblogic.ThreadPoolSize=30 from the command-line. Then if I change
the pool size to 40 at runtime by setting system property by calling System.setProperty(String,
String);, is there any event that I can fire for the change in property through APIs?
Thnx in advance.
Best Regards
AliMonitoring system properties for change can be done with JMX I think.
But for ThreadPoolSize in WLS 6.0, I don't think there is a documented JMX
MBean. (Maybe it exists but it's undocumented.)
In 6.1, 7.0, there's the concept of ExecuteQueue.
http://e-docs.bea.com/wls/docs70/javadocs/weblogic/management/configuration/
ExecuteQueueMBean.html
You can monitor a change by using the notification mechanism:
http://e-docs.bea.com/wls/docs70/jmx/notifications.html
Good luck,
Emmanuel
"Ali" <[email protected]> wrote in message
news:3d0d27a4$[email protected]..
>
Hi,
I want to know if I set a system property "-Dweblogic.ThreadPoolSize", howwill the
WLS get to know that the pool size has been changed, at run time?
E.g. I pass -Dweblogic.ThreadPoolSize=30 from the command-line. Then if Ichange
the pool size to 40 at runtime by setting system property by callingSystem.setProperty(String,
String);, is there any event that I can fire for the change in propertythrough APIs?
>
Thnx in advance.
Best Regards
Ali -
Hello,
I know everyone is caught up in the whirlwind of web services but could anyone explain when we should use them and an appropriate situation.
Bare in mind we already have several other services such as
JINI
JNDI
JXTA
RMI
EJB
JMX
JSF
CORBA
(Others I cannot remember perhaps)
that perform somewhat similar services. The choices are mind boggling to me sometimes. The sheer volume of utilities. Its impossible to choose the best solution on an informed decision for an enterprise or for a silly small projet even using j2ee.
I am curious to know if anyone else has this same problem and how they solve them?CORBA is making a comeback I hear ver 3.0? I am sceptical about these technologies. Look at things like JAIN another so called silver bullet.
I think web services are good do not get me wrong but for someone like myself that is just about knowledgable about the basics in Tomcat, Sevlets and JSPs its not too easy to learn without overcoming some barriers such as EJBs, XML schemas and various other configuration techniques that the tutorial for Web Services takes for granted.
I know the tutorial is very detailed but it would take me ages to use it for my current project. Even though it seems the best solution and after spending 2 days playing with it I have not been successful in completing it.
Can anyone reccomend an easier tutorial. I know that the one on this site is pretty comprehensive but it might take too long to do I need to do it in like 3 days.
Maybe you are looking for
-
Unable to delete email from trash bin. How do I do this? If I select and chose delete, it doesn't. What am I doing wrong? My grand daughte is using my iPad and I don't want her to see some of the mail there.
-
I am a new programmer, I got a question, hope get help from you. How to initialize Pin I/O of NI 6036E, e.g. set PFI 9 Low or High in DAQmx ANSI C ? Thanks
-
Screen Issues: Strip of extra brightness? Corners brighter than others?
I got my iMac back in August (just before the 24" came out, I'm kicking myself in the butt for it) and back then I noticed that the top-right corner and bottom-left corner were slightly brighter than the other two corners, but didn't think much of it
-
G/L Account Numbers printed on Cheque Stub
I have a client that wants their cheques printed with reqular invoice information on the cheque stub for their vendors and then another page (internal) with all the detailed invoice information and General Ledger Account information shown by detailed
-
Hi, I set the workflow for Bid Invitation as No -approval. while I am creating the Bid Invitation it throws an error as ' No approval is found,so inform administrator' . i cannot able to publish the bid invitation, How can i proceed further?? throw