Re: [JBoss-user] Strange MySQL JMS persistent behavior

2003-11-14 Thread Michael Klem
Thank you so much Adrian! I only spent about 6 hours performing 
various tests, configurations and interrogating my code before 
emailing the list. Just wanted to make sure I didn't miss anything so 
obvious. Seems like I did though. I think I got these sql properties 
from an old post on the JBoss forums.

At 1:49 AM + 11/14/03, Adrian Brock wrote:
Compare your properties with the one in docs/examples/jms in jboss 3.2.2
You'll find one of the deletes should be done through a join.
Regards,
Adrian
On Fri, 2003-11-14 at 00:13, Michael Klem wrote:
 Using:
 JBoss 3.0.8
 MySQL 4.0.14
 MySQL Driver mysql-connector-java-3.0.9-stable-bin.jar
 I found that when using MySQL as my JMS data store, my JMS messages
 are not persisted correctly. I can verify that the messages are
 persisted to the MySQL db. When I stop JBoss the messages are still
 in the db. When I start JBoss again, the messages are deleted when
 the PersistentManager gets started.
 I am using a transacted queue session to commit/rollback my JMS messages.

 I did more experimenting with this and verified the following:
 1. Using the file system as my data store, my messages are correctly
 persisted when JBoss is restarted.
 2. Using Oracle 8i as my data store, my messages are correctly
 persisted when JBoss is restarted.
 3. If I create messages with a non-transacted queue session,
 MySQL will persist these messages correctly when JBoss is restarted.
 4. If I create messages with a transacted queue session and stop JBoss, and
 modify the db records so the TXID column contains a null value,
 MySQL will persist these messages correctly when JBoss is restarted.
 MySQL Properties from jbossmq-service.xml

BLOB_TYPE = object_blob
INSERT_TX = insert into jms_transactions (txid) values(?)
 >INSERT_MESSAGE = insert into jms_messages (messageid, destination,
messageblob, txid, txop) values(?,?,?,?,?)
SELECT_ALL_UNCOMMITED_TXS = select txid from jms_transactions
SELECT_MAX_TX = select max(txid) from jms_messages
SELECT_MESSAGES_IN_DEST = select messageid, messageblob from
jms_messages where destination=?
SELECT_MESSAGE = select messageid, messageblob from jms_messages
where messageid=? and destination=?
MARK_MESSAGE = update jms_messages set txid=?, txop=? where
messageid=? and destination=?
UPDATE_MARKED_MESSAGES = update jms_messages set txid=?, txop=?
where txop=?
UPDATE_MARKED_MESSAGES_WITH_TX = update jms_messages set txid=?,
txop=? where txop=? and txid=?
DELETE_MARKED_MESSAGES_WITH_TX = delete from jms_messages where
txid is not null and txop=?
DELETE_TX = delete from jms_transactions where txid = ?
DELETE_MARKED_MESSAGES = delete from jms_messages where 
txid=? and txop=?
DELETE_MESSAGE = delete from jms_messages where messageid=? and
destination=?
CREATE_MESSAGE_TABLE = create table jms_messages ( messageid
integer not null, destination varchar(255) not null, txid integer,
txop char(1), messageblob object, primary key (messageid,
destination) )  type=innodb
CREATE_TX_TABLE = create table jms_transactions ( txid integer )
type=innodb

 My work around for now is to create and store my JMS messages until
 after the transaction. Then at the end of the transaction, use a non
 transacted queue session to create and send all my messages.
 Seems like a hack, but need to be able to switch between different
 data sources for testing. I have not tested this under 3.2.2 yet.
 Was wondering if others seen this before.
--

Adrian Brock
Director of Support
Back Office
JBoss Group, LLC



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Strange MySQL JMS persistent behavior

2003-11-13 Thread Michael Klem
Using:
JBoss 3.0.8
MySQL 4.0.14
MySQL Driver mysql-connector-java-3.0.9-stable-bin.jar
I found that when using MySQL as my JMS data store, my JMS messages 
are not persisted correctly. I can verify that the messages are 
persisted to the MySQL db. When I stop JBoss the messages are still 
in the db. When I start JBoss again, the messages are deleted when 
the PersistentManager gets started.

I am using a transacted queue session to commit/rollback my JMS messages.

I did more experimenting with this and verified the following:
1. Using the file system as my data store, my messages are correctly
   persisted when JBoss is restarted.
2. Using Oracle 8i as my data store, my messages are correctly
   persisted when JBoss is restarted.
3. If I create messages with a non-transacted queue session,
   MySQL will persist these messages correctly when JBoss is restarted.
4. If I create messages with a transacted queue session and stop JBoss, and
   modify the db records so the TXID column contains a null value,
   MySQL will persist these messages correctly when JBoss is restarted.
MySQL Properties from jbossmq-service.xml

  BLOB_TYPE = object_blob
  INSERT_TX = insert into jms_transactions (txid) values(?)
  INSERT_MESSAGE = insert into jms_messages (messageid, destination,
  messageblob, txid, txop) values(?,?,?,?,?)
  SELECT_ALL_UNCOMMITED_TXS = select txid from jms_transactions
  SELECT_MAX_TX = select max(txid) from jms_messages
  SELECT_MESSAGES_IN_DEST = select messageid, messageblob from
  jms_messages where destination=?
  SELECT_MESSAGE = select messageid, messageblob from jms_messages
  where messageid=? and destination=?
  MARK_MESSAGE = update jms_messages set txid=?, txop=? where
  messageid=? and destination=?
  UPDATE_MARKED_MESSAGES = update jms_messages set txid=?, txop=?
  where txop=?
  UPDATE_MARKED_MESSAGES_WITH_TX = update jms_messages set txid=?,
  txop=? where txop=? and txid=?
  DELETE_MARKED_MESSAGES_WITH_TX = delete from jms_messages where
  txid is not null and txop=?
  DELETE_TX = delete from jms_transactions where txid = ?
  DELETE_MARKED_MESSAGES = delete from jms_messages where txid=? and txop=?
  DELETE_MESSAGE = delete from jms_messages where messageid=? and
  destination=?
  CREATE_MESSAGE_TABLE = create table jms_messages ( messageid
  integer not null, destination varchar(255) not null, txid integer,
  txop char(1), messageblob object, primary key (messageid,
  destination) )  type=innodb
  CREATE_TX_TABLE = create table jms_transactions ( txid integer )
  type=innodb
My work around for now is to create and store my JMS messages until 
after the transaction. Then at the end of the transaction, use a non 
transacted queue session to create and send all my messages.

Seems like a hack, but need to be able to switch between different 
data sources for testing. I have not tested this under 3.2.2 yet.

Was wondering if others seen this before.

--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] JMS datasource shutting down question

2003-11-03 Thread Michael Klem
My app is currently using MySQL as the JMS datastore. I found that if 
I stop MySQL while the app is running and connected to it, JBoss will 
shutdown without any log info added to the server.log. It acts as if 
it has been killed.

Is this expected behaviour? I imagined that the app would generate 
errors when trying to use JMS, but not shutdown.

JBoss 3.0.8
MySQL 4.0.14
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] MySQL datastore question

2003-11-03 Thread Michael Klem
I am running my app on JBoss 3.0.8. I have 2 servers which each run 
an instance of my app. I use one server as a backup. It remains 
running but receives no input until I redirect the input to this 
server.

My app uses MySQL as a JMS datastore. I currently run an instance of 
MySQL on each server. I was wondering if it would be better to run 
MySQL on its own server and have each instance of my app use the same 
MySQL database as their datastore. Since only 1 app would be 
receiving input this should in theory work.

Has anyone done this before?
Is the JMS datastore meant to be used like this?
I have found some issues such as if the backup server is brought up 
first, it will process any stored messages, which makes sense. If my 
main server goes down, the only way I have found for the back up app 
to process any stored messages is to stop and restart it. When it 
comes up, it will then process any stored messages created by the 
previous app instance.

When running MySQL on each server, my remaining question is should I 
replicate the JMS datastore data to MySQL on the back up server? How 
much extra load would this create?

Thanks
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: FW: [JBoss-user] Problem integrating MySql with JBOSS

2003-10-07 Thread Michael Klem
Forgot to mention, my interpretation of what the docs said is that 
you no longer need to specify a table type. MySQL will treat the 
tables as InnoDB tables as a default.

Just my .02

At 9:50 PM -0700 10/7/03, Michael Klem wrote:
Just quoting from the MySQL docs. I will verify for myself too. I am 
using 4.0.14

At 9:12 PM -0400 10/7/03, Guy Rouillier wrote:
Michael Klem wrote:
 From MySQL version 4.0, InnoDB is enabled by default. So sql used 
to create a db table will default to being an InnoDB table. To 
explicitly create a table as InnoDB do this:
  CREATE TABLE CUSTOMER (A INT, B CHAR (20), INDEX (A)) TYPE = InnoDB;
That has not been my experience.  I have MySQL 4 on both Windows 
2000 and Linux, and if I don't specify a type, tables end up as 
MyISAM.
--
Guy Rouillier



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: FW: [JBoss-user] Problem integrating MySql with JBOSS

2003-10-07 Thread Michael Klem
Just quoting from the MySQL docs. I will verify for myself too. I am 
using 4.0.14

At 9:12 PM -0400 10/7/03, Guy Rouillier wrote:
Michael Klem wrote:
 From MySQL version 4.0, InnoDB is enabled by default. So sql used 
to create a db table will default to being an InnoDB table. To 
explicitly create a table as InnoDB do this:
  CREATE TABLE CUSTOMER (A INT, B CHAR (20), INDEX (A)) TYPE = InnoDB;
That has not been my experience.  I have MySQL 4 on both Windows 
2000 and Linux, and if I don't specify a type, tables end up as 
MyISAM.
--
Guy Rouillier



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: FW: [JBoss-user] Problem integrating MySql with JBOSS

2003-10-07 Thread Michael Klem
t; > > > > jboss.jca:
 > > > > > > > service=LocalTxDS,name=TestAppDb
 > > > > > > >  state: FAILED
 > > > > > > >  I Depend On:
 > > > > > > >  Depends On Me:   jboss.jca:service=LocalTxCM,name=TestAppDb
 > > > > > > > org.jboss.deployment.DeploymentException: No Attribute
 > > > > > found with name:
 > > > > > > > JndiName
 > > > > > > > ]
 > > > > > > > 16:21:21,673 INFO  [URLDeploymentScanner] Started
 > > > > > > >
 > > > > > > > I've scoured the archives and google to death, but can't
 > > > > > nail down the
 > > > > > > > problem ... here are my files. If anyone can see the
 > > > > > problem, please
 > > > > > > > let me know !
 > > > > > > >
 > > > > > > > I've added following to login-config.xml
 > > > > > > >
 > > > > > > > 
 > > > > > > >	
 > > > > > > >	
 > > > > > > >	
 > > > > > > >
 > > > > > "org.jboss.resource.security.ConfiguredIdentityLoginModule"
 > > > > > flag =
 > > > > > > > "required">
 > > > > > > >	
 > > > "principal">TestAppDbAdmin
 > > > > > > >	
 > > > "userName">TestAppDbAdmin
 > > > > > > >	eugenia
 > > > > > > >	
 > > > > > > >
 > > > > > "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,nam
 > > > > > e=Te
 > > > > > st
 > > > > > Ap
 > > > > > > > pDb
 > > > > > > > odule-option>
 > > > > > > >	
 > > > > > > >	
 > > > > > > >	
 > > > > > > >
 > > > > > > > Here is my mysql-service.xml:
 > > > > > > >
 > > > > > > > 
 > > > > > > > 
 > > > > > > > 
 > > > > > > code="org.jboss.resource.connectionmanager.LocalTxConnection
 > > > > > > > Mana
 > > > > > > ge
 > > > > > > r"
 > > > > > > > name="jboss.jca:service=LocalTxCM,name=TestAppDb">
 > > > > > > >  > > > > name="SecurityDomainJndiName">SecureTestAppDb
 > > > > > > >  > > > > > > optional-attribute-name="ManagedConnectionFactoryName">
 > > > > > > > 
 > > > > > > >  > > > > > > name="jboss.jca:service=LocalTxDS,name=TestAppDb">
 > > > > > > > TestAppDb
 > > > > > > > 
 > > > > > > > 
 > > > > > > >  > > > > > >
 > > > > > >
 > > > > > type="java.lang.String">jdbc:mysql://w2czz4ch03:3306/TestAppDb
 > > > > >  > > > > > > rty>
 > > > > > > >  > > > > > > type="java.lang.String">com.mysql.jdbc.Driver > > > > > > >
 > > > > > > > 
 > > > > > > > 
 > > > > > > > 
 > > > > > > > 
 > > > > > > >  > > > > > >
 > > > > > >
 > > > > > optional-attribute-name="OldRarDeployment">jboss.jca:service=R
 > > > > > > ARDeployment,n
 > > > > > > > ame=JBoss LocalTransaction JDBC Wrapper 
 > > > > > > >   > > > > > > optional-attribute-name="ManagedConnectionPool">
 > > > > > > > 
 > > > > > > >  > > > > > >
 > > > > > code="org.jboss.resource.connectionmanager.JBossManagedConnect
 > > > > > ionP
 > > > > > oo
 > > > > > l"
 > > > > > > > name="jboss.jca:service=LocalTxPool,name=TestAppDb">
 > > > > > > > 0  > > > > > > name="MaxSize">50  > > > > > > name="BlockingTimeoutMillis">5000
 > > > > > > > 15
 > > > > > > > ByContainer
 > > > > > > > 
 > > > > > > > 
 > > > > > > >  > > > > > >
 > > > > > >
 > > > > > optional-attribute-name="CachedConnectionManager">jboss.jca:se
 > > > > > rvice=CachedCo
 > > > > > > > nnectionManager
 > > > > > > >  > > > > > >
 > > > > > >
 > > > > > optional-attribute-name="JaasSecurityManagerService">jboss.sec
 > > > > > urity:service=
 > > > > > > > JaasSecurityManager
 > > > > > > >  > > > > name="TransactionManager">java:/TransactionManager
 > > > > > > > 
 > > > > > > > jboss.jca:service=RARDeployer
 > > > > > > > 
 > > > > > > > 
 > > > > > > >
 > > > > > > > I have replaced the exsiting lines in
 > > > > > standardjbosscmp-jdbc.xml and
 > > > > > > > standardjaws.xml with:
 > > > > > > > java:/TestAppDb
 > > > > > > > mySQL
 > > > > > > >
 > > > > > > > I've confirmed the username/password in MySql. Not sure
 > > > > > > > why
 > > > > > > > it's complaining about the JndiName.
 > > > > > > >
 > > > > > > > Seems that I have something mismatched ... any ideas ??
 > > > > > > >
 > > > > > > > Thx for the help !!
 > > > > > > >
 > > > > > > >
 > > > > > > > > Pierre Comtois
 > > > > > > > > Business Acceleration Services, Solutions Consulting
 > > > > > > > > 45 O'Connor Street, Suite 500*Ottawa, Ontario K1P
 1A4
 > > > > > > > > Ph: 613-787-4649  *  FAX: 613-567-6053  *  E-Mail:
 > > > > > > > > [EMAIL PROTECTED]
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > > ---
 > > > > > > > This sf.net email is sponsored by:ThinkGeek Welcome to
 > > > > > > > geek heaven. http://thinkgeek.com/sf
 > > > > > > > ___
 > > > > > > > > JBoss-user mailing list [EMAIL PROTECTED]
 > > > > > > > https://lists.sourceforge.net/lists/listinfo/jboss-user
 > > > > > --
 > > > > > 
 > > > > > Adrian Brock
 > > > > > Director of Support
 > > > > > Back Office
 > > > > > JBoss Group, LLC
 > > > > > 
 > > > > >
 > > > > >
 > > > > >
 > > > > > ---
 > > > > > This sf.net email is sponsored by:ThinkGeek
 > > > > > Welcome to geek heaven.
 > > > > > http://thinkgeek.com/sf
 > > > > > ___
 > > > > > JBoss-user mailing list [EMAIL PROTECTED]
 > > > > > https://lists.sourceforge.net/lists/listinfo/jboss-user
 > > > > >
 > > > >
 > > > >
 > > > > ---
 > > > > This sf.net email is sponsored by:ThinkGeek
 > > > > Welcome to geek heaven.
 > > > > http://thinkgeek.com/sf
 > > > > ___
 > > > > JBoss-user mailing list [EMAIL PROTECTED]
 > > > > https://lists.sourceforge.net/lists/listinfo/jboss-user
 > > > >
 > > > >
 > > > > ---
 > > > > This sf.net email is sponsored by:ThinkGeek
 > > > > > Welcome to geek heaven.
 > > > > http://thinkgeek.com/sf
 > > > > ___
 > > > > JBoss-user mailing list [EMAIL PROTECTED]
 > > > > https://lists.sourceforge.net/lists/listinfo/jboss-user
--

Adrian Brock
Director of Support
Back Office
JBoss Group, LLC



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Lack of disk space question

2003-10-02 Thread Michael Klem
Currently I have had issues where JBoss would not start because of a 
lack of disk space for log files. Also, while running and disk space 
runs out, no logs can be created.

How can I be alerted when either of these conditions are met? Was 
thinking of creating an MBean that checks every hour. The main 
problem is to get an error message when JBoss fails to start because 
of a lack of disk space.
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027

---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] MDB - stop service

2003-09-09 Thread Michael Klem
Title: Re: [JBoss-user] MDB - stop
service


I asked a similar question before and got this response:

> 1. Is it possible to disable/enable an MDB from receiving
messages
> from a queue via JMX?

There is an outstanding bug report (670068) where it
doesn't setup ENC correctly if you manually stop()/start()
the MDB container.

A simpler approach would be to register the JMSContainerInvoker
as an MBean, exposing the JMS connection stop()/start()


At 10:00 AM +0200 9/9/03, Stephane Nicoll wrote:
Hi to all,

I have a question regarding JMS and MDBs. Is it possible somehow to
'disable' an MDB. Clearly,  I would like a feature accessbile
through the JMX console or by invoking some session bean I would have
made that allows me to disable a queue.

Meaning queue is still available (we can post messages on it) but no
MDB receives pending requests. In the same way I would like the
ability to re-enabled it.

Any idea, comment?

Regards,

Stéphane


--

 Michael Klem <[EMAIL PROTECTED]>   
626-296-3027



[JBoss-user] JBoss 3.0.7 and maximum open cursors exceeded

2003-08-23 Thread Michael Klem
I have code in production which is currently running on JBoss 2.4.4 
and I finished migrating it to run under JBoss 3.0.7. It works but 
when I attempt to load test the app under JBoss 3.0.7 within 15 
minutes I get this exception:
   ORA-01000: maximum open cursors exceeded

Here is some data from my oracle-service.xml file:


  
  

20
40
5000
1

ByContainer
  


I can run the same stress testing code for as long as I want when the 
app is running on JB0ss 2.4.4. The database, ( Oracle 8i ) and the 
driver, ( classes12.zip ) are used by both versions of the app. The 
code base is the same too. The only glaring difference is the JBoss 
version.

My code closes the db connections and all PreparedStatements. I 
cannot see anything obvious there yet.

When I get this error, I can fix it temporarily by invoking the flush 
method on 
org.jboss.resource.connectionmanager.JBossManagedConnectionPool. 
Also, even when  the exception occurs, the AvailableConnectionCount 
remains close to my MaxSize.

I looked at the info from the mailing list and the forums but it 
looks like I am doing everything right.

Is this a known issue under JB0ss 3.0.7? I will try using JB0ss 3.2 
to see if it goes away.
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027

---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] JBoss 3.0.7 and maximum open cursors exceeded

2003-08-22 Thread Michael Klem
FYI: I changed my code to explicitly close all ResultSet objects and 
ran it under JBoss 3.0.7. I ran my load tests and it now works!!!

I have code in production which is currently running on JBoss 2.4.4 
and I finished migrating it to run under JBoss 3.0.7. It works but 
when I attempt to load test the app under JBoss 3.0.7 within 15 
minutes I get this exception:
   ORA-01000: maximum open cursors exceeded

Here is some data from my oracle-service.xml file:


  
  

20
40
5000
1

ByContainer
  


I can run the same stress testing code for as long as I want when 
the app is running on JB0ss 2.4.4. The database, ( Oracle 8i ) and 
the driver, ( classes12.zip ) are used by both versions of the app. 
The code base is the same too. The only glaring difference is the 
JBoss version.

My code closes the db connections and all PreparedStatements. I 
cannot see anything obvious there yet.

When I get this error, I can fix it temporarily by invoking the 
flush method on 
org.jboss.resource.connectionmanager.JBossManagedConnectionPool. 
Also, even when  the exception occurs, the AvailableConnectionCount 
remains close to my MaxSize.

I looked at the info from the mailing list and the forums but it 
looks like I am doing everything right.

Is this a known issue under JB0ss 3.0.7? I will try using JB0ss 3.2 
to see if it goes away.
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027

---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] JBoss 3.0.7 and maximum open cursors exceeded

2003-08-22 Thread Michael Klem
I have code in production which is currently running on JBoss 2.4.4 
and I finished migrating it to run under JBoss 3.0.7. It works but 
when I attempt to load test the app under JBoss 3.0.7 within 15 
minutes I get this exception:
   ORA-01000: maximum open cursors exceeded

Here is some data from my oracle-service.xml file:


  
  

20
40
5000
1

ByContainer
  


I can run the same stress testing code for as long as I want when the 
app is running on JB0ss 2.4.4. The database, ( Oracle 8i ) and the 
driver, ( classes12.zip ) are used by both versions of the app. The 
code base is the same too. The only glaring difference is the JBoss 
version.

My code closes the db connections and all PreparedStatements. I 
cannot see anything obvious there yet.

When I get this error, I can fix it temporarily by invoking the flush 
method on 
org.jboss.resource.connectionmanager.JBossManagedConnectionPool. 
Also, even when  the exception occurs, the AvailableConnectionCount 
remains close to my MaxSize.

I looked at the info from the mailing list and the forums but it 
looks like I am doing everything right.

Is this a known issue under JB0ss 3.0.7? I will try using JB0ss 3.2 
to see if it goes away.
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027

---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] How to get state of server

2003-07-31 Thread Michael Klem
Under certain conditions I want to shutdown the server while it is 
starting up. I noticed that the shutdown command will throw an 
illegal state exception if the server has not finished starting up. I 
check for an exception and then invoke the halt command.

I was wondering if there is a way to find out if the server is 
started or not? There is a started instance variable but is not 
exposed via jmx.

Would this be useful to expose?
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JMS usage and EJB rollback question

2003-07-16 Thread Michael Klem
I found a better solution. Use JMS transactions and commit the messages.

At 10:32 AM -0700 7/16/03, Michael Klem wrote:
I am using JMS to send a message from within an EJB and I have this question.

Inside my EJB I do the following:
  Add a row to table A
  Send a JMS message that table A has been modified
  Add a row to table B
  Add a row to table C
The problem is that if when adding data to tables B or C fails I 
rollback the entire transaction but the JMS message is still sent. 
Is there a way I can keep the messaging code in the same method that 
modifies table A and have it rollback too or should I just use flags 
and test them after all the db access is finished?

In that case my EJB code would look like this:

  Add a row to table A
Set flag to send a message that table A has been modified
  Add a row to table B
  Add a row to table C
  if the table A flag is true
Send a JMS message that table A has been modified
  This way the message only get sent if all db access succeeds but 
my code is a little bit more complicated.

Suggestions?
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] JMS usage and EJB rollback question

2003-07-16 Thread Michael Klem
I am using JMS to send a message from within an EJB and I have this question.

Inside my EJB I do the following:
  Add a row to table A
  Send a JMS message that table A has been modified
  Add a row to table B
  Add a row to table C
The problem is that if when adding data to tables B or C fails I 
rollback the entire transaction but the JMS message is still sent. Is 
there a way I can keep the messaging code in the same method that 
modifies table A and have it rollback too or should I just use flags 
and test them after all the db access is finished?

In that case my EJB code would look like this:

  Add a row to table A
Set flag to send a message that table A has been modified
  Add a row to table B
  Add a row to table C
  if the table A flag is true
Send a JMS message that table A has been modified
  This way the message only get sent if all db access succeeds but my 
code is a little bit more complicated.

Suggestions?
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Dynamic MDB generation

2003-06-25 Thread Michael Klem
I am creating queues dynamically in my app. Is it possible to 
dynamically create an MDB for those queues?
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027

---
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Message Driven Bean questions

2003-06-25 Thread Michael Klem
1. Is it possible to disable/enable an MDB from receiving messages 
from a queue via JMX?

2. Is it possible to dynamically change the pool size of a MDB via JMX?

--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] JMS publisher/subscriber question

2003-06-24 Thread Michael Klem
Is it considered ok to create a queue session to be the publisher and 
subscriber to the same queue?

I receive messages on one queue (A) and move them to another queue 
(B). When a message arrives on B, the message listener acts on the 
message. The queue object I use for B is the publisher and subscriber 
for queue B. Are there any issues with this?
--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027

---
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] RE: JBoss web site

2003-06-24 Thread Michael Klem
Title: RE: JBoss web site


I cannot log into
the JBoss web site and I cannot retrieve my password because of the
following error:

  Module
lostpassword has not been found


-- 

 Michael Klem <[EMAIL PROTECTED]>   
626-296-3027



Re: [JBoss-user] show memory usage

2003-03-03 Thread Michael Klem
If you want to do it programmatically, use JMX and query the JBoss 
app server that way. In my app I display how much total and free 
memory are available and do it this way.

String _jbossMemoryString = (String)jmxMgr.invoke( 
"DefaultDomain:service=Info", "listMemoryUsage" );

The string contains HTML tags so I strip all that out.

At 1:04 PM +0100 03/03/2003, Rafal Kedziorski wrote:
hi,

in WebLogic there is a possibility to obsere the memory usage thru 
an applet console. Knowns anybody the same possibility for JBoss. or 
have I to implement this?

Best Regards,
Rafal


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--
 Michael Klem <[EMAIL PROTECTED]>626-296-3027
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] JMX Unregister question

2002-09-04 Thread Michael Klem

This may be a dumb question:

Why would you ever want to unregister an MBean from the jmx console?
-- 
"If I beat Mr. Burns--I mean really wallop him good I'm sure to get 
that big promotion I've been gunning for!" - Homer


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] JMX question

2002-08-30 Thread Michael Klem

>Hello Michael,
>
>Friday, August 30, 2002, 2:34:33 AM, you wrote:
>MK> What is the correct process to unregister all my MBeans when I
>MK> redeploy my application code?
>
>MK> Currently, if there are any of my app specific MBeans registered and
>MK> I redploy the software, I get the following error:
>
>MK> javax.management.InstanceAlreadyExistsException
>
>What MBeans aren't deregistered?

All my app specific ModelMBeans are not deregisterded. I always get 
an javax.management.InstanceAlreadyExistsException when I redeploy 
and try to create a new MBean. If I start the stop and restart the 
server everything works.

BTW: I am using 2.4.4

Each of my managed objects has a corresponding MBean wrapper. So 
whenever a managed object gets instantiate, the wrapper gets created 
and registered on the MBean server.

I have a feeling that the way I am using the MBeans may be my problem.

My solution for now will be to unregister every ap specific MBean in 
my startup code.


>There is, AFAIK, a "harmless" bug with deregistration of
>JCAConnectionFactory. No matter whether it's deployed with a sar or
>*-service.xml. Redeployment of the service drops the exception saying
>something like "trying to register an already existent service" (it's
>not a quote). But nevertheless redeployment is successfull and the
>service can be used.
>Is it that case you faced?
>
>MK> Is there a way to unregister my MBeans when the app gets redployed?
>
>This should be done itself.
>
>MK> The only way to get around this for now is to stop, redeploy and
>MK> restart the server.
>
>--
>Best regards,
>  Alex Loubyansky
>
>
>
>
>---
>This sf.net email is sponsored by: OSDN - Tired of that same old
>cell phone?  Get a new here for FREE!
>https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 
"If I beat Mr. Burns--I mean really wallop him good I'm sure to get 
that big promotion I've been gunning for!" - Homer


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] JMX question

2002-08-29 Thread Michael Klem
Title: RE: [JBoss-user] JMX question


Two questions:

1. Would this work for 2.4.4?

2. I am currently using ModelMBeans for all of my management and
they only get created when the managed resources are used. Therefore I
don't know if the sar file would work for me. Should I be creating my
MBeans at startup? Can I using ModelMBeans? I don't see how since the
objects being managed are Java objects and not ejbs.

Thanks

I have my MBean in a .sar
inside a .jar and it
gets deregistered when I redeploy.  Actually
we
have the .sar in a .jar inside and .ear now
and
it still gets deregistered on redeploy.

JD

-Original
Message-----
From: Michael Klem [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 29, 2002 4:35 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] JMX question


What is the correct
process to unregister all my MBeans when I
redeploy my application code?

Currently, if there are
any of my app specific MBeans registered and
I redploy the software, I get the following
error:

javax.management.InstanceAlreadyExistsException


Is there a way to
unregister my MBeans when the app gets redployed?
The only way to get around this for now is to stop,
redeploy and
restart the server.
--
"If I beat Mr. Burns--I mean really wallop him
good I'm sure to get
that big promotion I've been gunning for!" -
Homer


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 

"If I beat Mr. Burns--I mean really wallop him good I'm sure
to get that big promotion I've been gunning for!" - Homer



RE: [JBoss-user] JMX question

2002-08-29 Thread Michael Klem
Title: RE: [JBoss-user] JMX question


I've been hearing about .sar files but cannot find info about
them. Where do I look?


I have my MBean in a .sar
inside a .jar and it
gets deregistered when I redeploy.  Actually
we
have the .sar in a .jar inside and .ear now
and
it still gets deregistered on redeploy.

JD

-Original
Message-
From: Michael Klem [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 29, 2002 4:35 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] JMX question


What is the correct
process to unregister all my MBeans when I
redeploy my application code?

Currently, if there are
any of my app specific MBeans registered and
I redploy the software, I get the following
error:

javax.management.InstanceAlreadyExistsException


Is there a way to
unregister my MBeans when the app gets redployed?
The only way to get around this for now is to stop,
redeploy and
restart the server.
--
"If I beat Mr. Burns--I mean really wallop him
good I'm sure to get
that big promotion I've been gunning for!" -
Homer


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 

"If I beat Mr. Burns--I mean really wallop him good I'm sure
to get that big promotion I've been gunning for!" - Homer



[JBoss-user] JMX question

2002-08-29 Thread Michael Klem

What is the correct process to unregister all my MBeans when I 
redeploy my application code?

Currently, if there are any of my app specific MBeans registered and 
I redploy the software, I get the following error:

javax.management.InstanceAlreadyExistsException


Is there a way to unregister my MBeans when the app gets redployed? 
The only way to get around this for now is to stop, redeploy and 
restart the server.
-- 
"If I beat Mr. Burns--I mean really wallop him good I'm sure to get 
that big promotion I've been gunning for!" - Homer


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] One more JMX question

2002-08-21 Thread Michael Klem

I wrote some rough JMX code so that for each EJB called, an EJB 
related MBean keeps track of how many times each ejb was called etc. 
My question is that my code currently makes calls to the MBeans in 
order to keep them updated. However, it seems that I would want the 
Mbeans to call the ejbs or other appropriate object only when the 
Mbeans are being viewed on the browser.

My reasoning is that this would avoid any JMX related overhead. It 
doesn't seem to make sense to constantly update the MBeans when they 
aren't being viewed.

I think I want regular Java objects to hold onto my ejb related 
statistic data and then have an MBean send it messages in order to 
get the data or reset the data.

BTW: I am using JBoss 2.4.4 and am still reading thru the JBoss JMX book.
-- 
"If something is too hard, give up. The moral my boy is to never try 
anything." - Homer


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JMX & JBoss question

2002-08-21 Thread Michael Klem

I am using JMX with JBoss 2.4.4 and came across a confusing 
situation. I want to use JMX to monitor how many times each ejb is 
called and how long each ejb takes to process a specific command.

It seems that to make this work easily I would have to create one 
mbean for each ejb. For example, EJB1MBean, EJB2MBean, EJB3MBean. 
This is not good since the code in each MBean would be identical. 
This will, however, allow me to view the data in my browser.

I would prefer to have an MBean that uses a hashmap to contain an 
MBean for each ejb. If I do this, I cannot view the MBeans contained 
in the hashmap.

I am currently reading about dynamic MBeans. Any ideas?
-- 
"If something is too hard, give up. The moral my boy is to never try 
anything." - Homer


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Startup class

2002-08-15 Thread Michael Klem

Oh good idea. Seems simpler and cleaner too.

>mbeans work well for this.
>
>david jencks
>On 2002.08.15 13:11:40 -0400 "Kim, Yong" wrote:
>>  Is there any way I can do something like "startup classes"?  I want
>>  something nice and simple ;-)
>>  There are some classes that I want them to be loaded into memory when
>>  JBoss
>>  restarts.
>>
>>  Thanks.
>>
>>  Mitchell
>>
>>
>>  ---
>>  This sf.net email is sponsored by: OSDN - Tired of that same old
>>  cell phone?  Get a new here for FREE!
>>  https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
>>  ___
>>  JBoss-user mailing list
>>  [EMAIL PROTECTED]
>>  https://lists.sourceforge.net/lists/listinfo/jboss-user
>>
>>
>
>
>---
>This sf.net email is sponsored by: OSDN - Tired of that same old
>cell phone?  Get a new here for FREE!
>https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 
"It's not easy to juggle a pregnant wife and a troubled child, but 
somehow I managed to fit in eight hours of TV a day." - Homer


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Startup class

2002-08-15 Thread Michael Klem

What I did was to create a servlet class and in its init method I 
added code that runs upon startup.


>Is there any way I can do something like "startup classes"?  I want
>something nice and simple ;-)
>There are some classes that I want them to be loaded into memory when JBoss
>restarts.
>
>Thanks.
>
>Mitchell
>
>
>---
>This sf.net email is sponsored by: OSDN - Tired of that same old
>cell phone?  Get a new here for FREE!
>https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 
"It's not easy to juggle a pregnant wife and a troubled child, but 
somehow I managed to fit in eight hours of TV a day." - Homer


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Threading question

2002-08-14 Thread Michael Klem

I am creating a simple caching object that will be used by multiple 
EJBs. Is each EJB handled by a different thread? I need to know if I 
need to make my caching object thread safe.
-- 
"It's not easy to juggle a pregnant wife and a troubled child, but 
somehow I managed to fit in eight hours of TV a day." - Homer


---
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] .sar file info

2002-06-04 Thread Michael Klem

What is a .sar file? I have not been able to find anything conclusive 
about it. I come across "Store Archive" and "Search Archive". Where 
can I find how to construct one.

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Log4J Problem!!! Please HELP ME

2002-06-03 Thread Michael Klem

That works perfectly. Now I can leave the 
jboss/conf/tomcat/log4j.properties alone and encapsulate the app 
specific log properties cleanly. I didn't use this code I used what 
was mentioned in the log4 manual.

>I usually do something like this... put a log4j properties file in your
>application e/j/war file, and somewhere in the initialization of the
>application do this:
>
>(sorry for the poor formatting)
>
>private void init(){
>   ResourceBundle bundle = ResourceBundle.getBundle("com.kcp.sso.log4j");
>   Properties props = new Properties();
>   String tempKey = null;
>   for (Enumeration resourceKeys = bundle.getKeys();
>resourceKeys.hasMoreElements();) {
>   tempKey = (String)resourceKeys.nextElement();
>   props.setProperty(tempKey, bundle.getString(tempKey));
>   } // end of for ()
>   bundle = null;
>   tempKey = null;
>
>   PropertyConfigurator.configure(props);
>}
>
>
>That way, as long as log4j is in the classpath of the app server, the
>application can configure itself.
>
>Tim
>
>On Mon, 2002-06-03 at 11:39, [EMAIL PROTECTED]
>wrote:
>>
>>
>>  It seems like it would be easier, from a developer's point of view,
>>  to deploy your J2EE package without requiring the user to modify
>>  files outside of your ear, war or jar package. It would be nice for
>>  each app to include their own log4.properties files in their package.
>>  This way I should in theory just be able give my package to my
>>  customers and they just need to add it to their deploy directories.
>>
>>
>>
>>  >hth,
>>  >danch
>>  >
>>  >[EMAIL PROTECTED] wrote:
>>  >>I have a problem in JBoss2-4.4. I have several bean that use log4j to log
>>  >>some aplication event. Thats beans work fine in JBoss-2.2, but when I try
>>  >>to use JBoss-2.4.4 I get an error:
>>  >>"java.rmi.ServerException: RemoteException occurred in server thread;
>>  >>nested exception is:
>>  >> java.rmi.ServerException: Transaction rolled
>>  >>back:org/apache/log4j/Category
>>  >>java.rmi.ServerException: Transaction rolled
>>  >>back:org/apache/log4j/Category"
>>  >>I try to enable and disable the Log4jService but nothing happen.
>>  >>I used my own category file.
>>  >>
>>  >>Operation System: HP-UX 11
>>  >>JDK: 1.3
>>  >>
>>  >>What can I do to solve my problem? I need to solve it quickly.
>>  >>
>>  >>Please Help.
>  > >>Regards.
>  > >>Alejandro
>  > >>
>  > >>
>  > >>
>  > >>___
>  > >>
>  > >>Don't miss the 2002 Sprint PCS Application Developer's Conference
>  > >>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>>  >>
>>  >>___
>>  >>JBoss-user mailing list
>>  >>[EMAIL PROTECTED]
>>  >>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>  >>
>>  >
>>  >
>>  >
>>  >--
>>  >
>>  >=
>>  >Disclaimer:
>>  >All statements are my own, personal opinions and have nothing to do
>>  >with the opinions of employer, wife, or cat. They may not have anything
>>  >to do with objective reality, as a matter of fact. Your Milage May
>>  >Vary, Excludes Delivery Charges, etc.
>>  >=
>>  >
>>  >
>>  >___
>>  >
>>  >Don't miss the 2002 Sprint PCS Application Developer's Conference
>>  >August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>>  >
>>  >___
>>  >JBoss-user mailing list
>>  >[EMAIL PROTECTED]
>>  >https://lists.sourceforge.net/lists/listinfo/jboss-user
>>
>>
>>  ___
>>
>>  Don't miss the 2002 Sprint PCS Application Developer's Conference
>>  August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>>
>>  ___
>>  JBoss-user mailing list
>>  [EMAIL PROTECTED]
>>  https://lists.sourceforge.net/lists/listinfo/jboss-user
>>
>--
>Timothy Freund
>IT System Engineer
>Honeywell Federal Manufacturing & Technologies
>
>
>___
>
>Don't miss the 2002 Sprint PCS Application Developer's Conference
>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Log4J Problem!!! Please HELP ME

2002-06-03 Thread Michael Klem

>
>2) IMHO, what level gets logged and to where (file, rolling file, 
>email, etc.) is very much a concern of the administrator of a site, 
>moreso than the developer at that point.
>As an administrator with multiple apps to worry about, I would want 
>centralized control over all logging of all deployed apps, which is 
>what you get with how JBoss uses log4j.
>Why would you want to put log4j config'ing deep in an .*ar file 
>where an admin can't reach it without cracking it open?

OK, if I use the single log4j.properties file in jboss/conf/tomcat 
how do you specify which app logs to which log file? I am able to 
filter messages from specific packages to specific log files but that 
won't help when the same packages are used in multiple apps.

For example:

# This filters everything from foo.bar into the myLog file.
# How do you specify everything from App1 to be logged to App1.log?
log4j.category.foo.bar=ALL,A3
log4j.appender.A3=org.apache.log4j.FileAppender
log4j.appender.A3.File=../log/myLog.log
log4j.appender.A3.Append=false
log4j.appender.A3.layout=org.apache.log4j.PatternLayout
log4j.appender.A3.layout.ConversionPattern=%5r %-5p [%t] %c{2} - %m%n


>Michael Klem wrote:
>>Oops! I meant JBoss 2.4.2
>>
>>>>I believe one of the changes from 2.2 to 2.4 was that 2.4 
>>>>includes log4j. What you're seeing is probably from a 
>>>>ClassCastException where there are two copies of 
>>>>org.apache.log4j.Category - one in your application and one in 
>>>>JBoss' lib/ext directory.
>>>
>>>
>>>Does this mean that we are forced to use the version of log4j that 
>>>JBoss 3.2.3 uses?
>>>
>>>>Try taking all log4j classes out of your application. You'll also 
>>>>want to set up your categories in the log4j.properties in the 
>>>>JBoss conf subdirectory that corresponds to the configuration 
>>>>you're running.
>>>
>>>
>>>
>>>It seems like it would be easier, from a developer's point of 
>>>view, to deploy your J2EE package without requiring the user to 
>>>modify files outside of your ear, war or jar package. It would be 
>>>nice for each app to include their own log4.properties files in 
>>>their package. This way I should in theory just be able give my 
>>>package to my customers and they just need to add it to their 
>>>deploy directories.
>>>
>>>>hth,
>>>>danch
>>>>
>>>>[EMAIL PROTECTED] wrote:
>>>>
>>>>>I have a problem in JBoss2-4.4. I have several bean that use log4j to log
>>>>>some aplication event. Thats beans work fine in JBoss-2.2, but when I try
>>>>>to use JBoss-2.4.4 I get an error:
>>>>>"java.rmi.ServerException: RemoteException occurred in server thread;
>>>>>nested exception is:
>>>>> java.rmi.ServerException: Transaction rolled
>>>>>back:org/apache/log4j/Category
>>>>>java.rmi.ServerException: Transaction rolled
>>>>>back:org/apache/log4j/Category"
>>>>>I try to enable and disable the Log4jService but nothing happen.
>>>>>I used my own category file.
>>>>>
>>>>>Operation System: HP-UX 11
>>>>>JDK: 1.3
>>>>>
>>>>>What can I do to solve my problem? I need to solve it quickly.
>>>>>
>>>>>Please Help.
>>>>>Regards.
>>>>>Alejandro
>>>>>
>>>>>
>>>>>
>>>>>___
>>>>>
>>>>>Don't miss the 2002 Sprint PCS Application Developer's Conference
>>>>>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>>>>>
>>>>>___
>>>>>JBoss-user mailing list
>>>>>[EMAIL PROTECTED]
>>>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>>>>
>>>>
>>>>
>>>>
>>>>--
>>>>
>>>>=
>>>>Disclaimer:
>>>>All statements are my own, personal opinions and have nothing to do
>>>>with the opinions of employer, wife, or cat. They may not have anything
>>>>to do with objective reality, as a matter of fact. Your Milage 
>>>>May Vary, Excludes Delivery Charges, etc.
>>>>==

Re: [JBoss-user] Log4J Problem!!! Please HELP ME

2002-06-03 Thread Michael Klem

Oops! I meant JBoss 2.4.2

>>I believe one of the changes from 2.2 to 2.4 was that 2.4 includes 
>>log4j. What you're seeing is probably from a ClassCastException 
>>where there are two copies of org.apache.log4j.Category - one in 
>>your application and one in JBoss' lib/ext directory.
>
>Does this mean that we are forced to use the version of log4j that 
>JBoss 3.2.3 uses?
>
>>Try taking all log4j classes out of your application. You'll also 
>>want to set up your categories in the log4j.properties in the JBoss 
>>conf subdirectory that corresponds to the configuration you're 
>>running.
>
>
>It seems like it would be easier, from a developer's point of view, 
>to deploy your J2EE package without requiring the user to modify 
>files outside of your ear, war or jar package. It would be nice for 
>each app to include their own log4.properties files in their 
>package. This way I should in theory just be able give my package to 
>my customers and they just need to add it to their deploy 
>directories.
>
>
>>hth,
>>danch
>>
>>[EMAIL PROTECTED] wrote:
>>>I have a problem in JBoss2-4.4. I have several bean that use log4j to log
>>>some aplication event. Thats beans work fine in JBoss-2.2, but when I try
>>>to use JBoss-2.4.4 I get an error:
>>>"java.rmi.ServerException: RemoteException occurred in server thread;
>>>nested exception is:
>>> java.rmi.ServerException: Transaction rolled
>>>back:org/apache/log4j/Category
>>>java.rmi.ServerException: Transaction rolled
>>>back:org/apache/log4j/Category"
>>>I try to enable and disable the Log4jService but nothing happen.
>>>I used my own category file.
>>>
>>>Operation System: HP-UX 11
>>>JDK: 1.3
>>>
>>>What can I do to solve my problem? I need to solve it quickly.
>>>
>>>Please Help.
>>>Regards.
>>>Alejandro
>>>
>>>
>>>
>>>___
>>>
>>>Don't miss the 2002 Sprint PCS Application Developer's Conference
>>>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>>>
>>>___
>>>JBoss-user mailing list
>>>[EMAIL PROTECTED]
>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>>
>>
>>
>>
>>--
>>
>>=
>>Disclaimer:
>>All statements are my own, personal opinions and have nothing to do
>>with the opinions of employer, wife, or cat. They may not have anything
>>to do with objective reality, as a matter of fact. Your Milage May 
>>Vary, Excludes Delivery Charges, etc.
>>=
>>
>>
>>___
>>
>>Don't miss the 2002 Sprint PCS Application Developer's Conference
>>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>>
>>___
>>JBoss-user mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>___
>
>Don't miss the 2002 Sprint PCS Application Developer's Conference
>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Log4J Problem!!! Please HELP ME

2002-06-03 Thread Michael Klem

>I believe one of the changes from 2.2 to 2.4 was that 2.4 includes 
>log4j. What you're seeing is probably from a ClassCastException 
>where there are two copies of org.apache.log4j.Category - one in 
>your application and one in JBoss' lib/ext directory.

Does this mean that we are forced to use the version of log4j that 
JBoss 3.2.3 uses?

>Try taking all log4j classes out of your application. You'll also 
>want to set up your categories in the log4j.properties in the JBoss 
>conf subdirectory that corresponds to the configuration you're 
>running.


It seems like it would be easier, from a developer's point of view, 
to deploy your J2EE package without requiring the user to modify 
files outside of your ear, war or jar package. It would be nice for 
each app to include their own log4.properties files in their package. 
This way I should in theory just be able give my package to my 
customers and they just need to add it to their deploy directories.



>hth,
>danch
>
>[EMAIL PROTECTED] wrote:
>>I have a problem in JBoss2-4.4. I have several bean that use log4j to log
>>some aplication event. Thats beans work fine in JBoss-2.2, but when I try
>>to use JBoss-2.4.4 I get an error:
>>"java.rmi.ServerException: RemoteException occurred in server thread;
>>nested exception is:
>> java.rmi.ServerException: Transaction rolled
>>back:org/apache/log4j/Category
>>java.rmi.ServerException: Transaction rolled
>>back:org/apache/log4j/Category"
>>I try to enable and disable the Log4jService but nothing happen.
>>I used my own category file.
>>
>>Operation System: HP-UX 11
>>JDK: 1.3
>>
>>What can I do to solve my problem? I need to solve it quickly.
>>
>>Please Help.
>>Regards.
>>Alejandro
>>
>>
>>
>>___
>>
>>Don't miss the 2002 Sprint PCS Application Developer's Conference
>>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>>
>>___
>>JBoss-user mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>
>
>
>
>--
>
>=
>Disclaimer:
>All statements are my own, personal opinions and have nothing to do
>with the opinions of employer, wife, or cat. They may not have anything
>to do with objective reality, as a matter of fact. Your Milage May 
>Vary, Excludes Delivery Charges, etc.
>=
>
>
>___
>
>Don't miss the 2002 Sprint PCS Application Developer's Conference
>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBoss & log4j question

2002-06-01 Thread Michael Klem

I would like each of my J2EE apps to use their own log4j.properties 
file in order to specify application specific logging options. Is 
this possible with JBoss? Since JBoss is using log4j I assume that 
each J2EE app will have to include there own log4j.properties file.

Has anyone had luck using Apache's commons-logging package with 
JBoss? I am working with an ear file which contains my application 
jar file and commons-logging jar file.

It appears that JBoss' logging mechanism intercepts my output. I am 
able to create log4j and simple log objects in my EJBs but their 
output always end up in the JBoss console and server.log file.

I also cannot get the commons-logging package to find my 
commons-logging.properties file unless I do some hacking.

I need to regroup since it is 4 am and I may be rambling.

Thanks for your time.

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] MBeans location for J2EE Deployment

2002-06-01 Thread Michael Klem

I am new to JMX and after running some JMX sample apps wondered where 
is the correct location for deploying MBeans with my J2EE app. I get 
the impression from reading some documentation that they need to 
reside on the server side.

Can I add MBeans to my ear files?


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user