Re: [JBoss-user] Advice: how to periodically scan a database table

2003-02-07 Thread Ken Whitaker
 Hi guys,
 I'm REALLY interested in how to do this too! I know
 practically nothing
 about
 MBeans but would love to know if they are the
 recommended way of
 periodically
 polling a database for changes, or if as you
 suggested Guy, using a timer
 service
 to access an ejb to check the database is a good
 approach.
 

We are using JBoss 3.0.4.  We built an MBean that
exposes a JMX function.  Then configure the JBoss
Scheduler to periodically call that JMX function. 
Very simple to do.  The jboss docs tell you how to set
up the scheduler to call the jmx function.  Doing it
this way avoids any jboss dependencies in your code
base.

The only little pain was setting up an abstract mbean
class; we didn't want to extend the canned one from
jboss for the same reason (vendor specific
dependencies).  That took under a day's work for one
developer.

The concrete mbean implementations are very thin. 
They get a reference to the EJB that does the actual
work.

The only small problem we have is that the scheduler
kicks off before the mbean is ready to take the call
causing an error at startup.  I have seen posts on how
to avoid this -- just haven't taken the time to do it.


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBoss MQ durable subscribers

2003-01-30 Thread Ken Whitaker
Using JBoss 3.0.4 and JBossMQ.

We have a problem if the durable subscriber client
attempts to reconnect after an abnormal connection
using the same Client ID, the exception is raised:

javax.jms.InvalidClientIDException: This
loggedOnClientIds is already registered !
at
org.jboss.mq.sm.AbstractStateManager.addLoggedOnClientId(AbstractStateManager.java:237)

How do we tell JBossMQ that the Client ID is no longer
connected?

In searching through the forums, I saw the suggestion
to use a different Client ID on reconnect, but that
does not make sense as the client will miss any
messages that published during the time it is down. 

Thanks,

Ken Whitaker

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] JBoss MQ durable subscribers

2003-01-30 Thread Ken Whitaker
--- Ken Whitaker [EMAIL PROTECTED] wrote:
 Using JBoss 3.0.4 and JBossMQ.
 
 We have a problem if the durable subscriber client
 attempts to reconnect after an abnormal connection
 using the same Client ID, the exception is raised:
 
 javax.jms.InvalidClientIDException: This
 loggedOnClientIds is already registered !

Is it safe to call: 

   public void removeLoggedOnClientId(String ID)

on the StateManager instance for a client that has
abnormally exited?




__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Database failure

2002-11-25 Thread Ken Whitaker
In 3.0.x, is there a way to tell the pool to
invalidate all connections?

--- David Jencks [EMAIL PROTECTED]
wrote:
 The problem is that there is no standard way of
 distinguishing say a index
 violation exception from a total db crash.  I tried
 closing connections on
 any exception, but it didn't work very well.  You
 can reenable it if you
 wish with I think a single line change in
 BaseWrapperManagedConnection (3.2
 and 4) or LocalManagedConnection in 3.0.x.
 
 I thought it would be good to write db-specific
 wrappers that could
 interpret the exceptions from that db and take
 appropriate action, but so
 far no one, including me, has done so.
 
 david jencks
 
 On 2002.11.25 18:36:19 -0500 Bill Burke wrote:
  In 2.4 we had the feature to remove a connection
 from pool if the
  connection
  caused an exception.  I don't think 3.x has this. 
 David Jencks?
  
  
  Bill Burke
  Chief Architect
  JBoss Group, LLC
  
  
  
-Original Message-
From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On
 Behalf Of Giles, Mick
Sent: Monday, November 25, 2002 5:20 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Database failure
  
  
A little background.
  
We're using JBOSS 3.0.3 with an Oracle 902 RAC
 database.
  
  
  
The question is, when the database fails, or the
 network fails, or
  whatever other event that can cause the
 connections in the pool to close
  is
  there a way for JBOSS to know that the connections
 are no longer valid
  and
  reconnect them? What is the default behavior when
 you lose the db and
  what
  are the alternative behaviors?
  
  
  
Ideally JBOSS would reconnect the pool once the
 db was available again.
  Is
  this possible?
  
  
  
  
  
Thanks!
  
  
  
  
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0
 Transitional//EN
  HTMLHEAD
  META http-equiv=Content-Type content=text/html;
 charset=us-ascii
  META content=MSHTML 6.00.2600.0 name=GENERATOR
  STYLE@page Section1 {size: 8.5in 11.0in; margin:
 1.0in 1.25in 1.0in
  1.25in; }
  P.MsoNormal {
  FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt;
 FONT-FAMILY: Times New
  Roman
  }
  LI.MsoNormal {
  FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt;
 FONT-FAMILY: Times New
  Roman
  }
  DIV.MsoNormal {
  FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt;
 FONT-FAMILY: Times New
  Roman
  }
  A:link {
  COLOR: blue; TEXT-DECORATION: underline
  }
  SPAN.MsoHyperlink {
  COLOR: blue; TEXT-DECORATION: underline
  }
  A:visited {
  COLOR: purple; TEXT-DECORATION: underline
  }
  SPAN.MsoHyperlinkFollowed {
  COLOR: purple; TEXT-DECORATION: underline
  }
  SPAN.EmailStyle17 {
  COLOR: windowtext; FONT-FAMILY: Arial
  }
  DIV.Section1 {
  page: Section1
  }
  /STYLE
  /HEAD
  BODY lang=EN-US vLink=purple link=blue
  DIVSPAN class=897053523-25112002FONT
 face=Arial color=#ff
  size=2In 2.4 
  we had the feature to remove a connection from
 pool if the connection
  caused an 
  exception.nbsp; I don't think 3.x has this.nbsp;
 David 
  Jencks?/FONT/SPAN/DIV
  DIVSPAN class=897053523-25112002FONT
 face=Arial color=#ff 
  size=2/FONT/SPANnbsp;/DIV
  DIVSPAN class=897053523-25112002
  PFONT size=2BRBill
 BurkeBRChief
  ArchitectBRJBoss 
  Group,
 LLCBRBR/FONT/P/SPAN/DIV
  BLOCKQUOTE dir=ltr 
  style=PADDING-LEFT: 5px; MARGIN-LEFT: 5px;
 BORDER-LEFT: #ff 2px
  solid; MARGIN-RIGHT: 0px
DIV class=OutlookMessageHeader dir=ltr
 align=leftFONT face=Tahoma 
size=2-Original
 Message-BRBFrom:/B 
[EMAIL PROTECTED] 
   
 [mailto:[EMAIL PROTECTED]]BOn
 Behalf Of
  /BGiles, 
MickBRBSent:/B Monday, November 25, 2002
 5:20 PMBRBTo:/B 
   
 [EMAIL PROTECTED]BRBSubject:/B
 [JBoss-user]
  Database 
failureBRBR/FONT/DIV
DIV class=Section1
P class=MsoNormalFONT face=Arial size=2SPAN
 
style=FONT-SIZE: 10pt; FONT-FAMILY: ArialA
 little background… 
/SPAN/FONT/P
P class=MsoNormalFONT face=Arial size=2SPAN
 
style=FONT-SIZE: 10pt; FONT-FAMILY:
 ArialWe’re using JBOSS
  3.0.3 with an 
Oracle 902 RAC database./SPAN/FONT/P
P class=MsoNormalFONT face=Arial size=2SPAN
 
style=FONT-SIZE: 10pt; FONT-FAMILY:
 Arial/SPAN/FONTnbsp;/P
P class=MsoNormalFONT face=Arial size=2SPAN
 
style=FONT-SIZE: 10pt; FONT-FAMILY: ArialThe
 question is, when the
  database 
fails, or the network fails, or whatever other
 event that can cause the
  
connections in the pool to close is there a way
 for JBOSS to know that
  the 
connections are no longer valid and reconnect
 them? What is the default
  
behavior when you lose the db and what are the
 alternative 
behaviors?/SPAN/FONT/P
P class=MsoNormalFONT face=Arial size=2SPAN
 
style=FONT-SIZE: 10pt; FONT-FAMILY:
 Arial/SPAN/FONTnbsp;/P
P class=MsoNormalFONT face=Arial size=2SPAN
 
style=FONT-SIZE: 10pt; FONT-FAMILY:
 ArialIdeally JBOSS would
 
=== message truncated ===



Re: [JBoss-user] JBoss 3.0.1 and Oracle-XA

2002-09-23 Thread Ken Whitaker

  2. I change the line with URL=jdbc:oracle:oci8:@tc
 to URL=jdbc:oracle:oci8:@banklab3:1521:ora8

Try jdbc:oracle:oci8:@banklab3 assuming banklab3 is
the name of your db instance (does tnsping banklab3
work?).  Also, the OCI8 drivers use native libraries;
you must have the Oracle 8 client installed on this
box.


__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com


---
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] Connection.autoCommit() being reset to false after local ejb call.

2002-08-01 Thread Ken Whitaker

Using JBoss 3.0 release.

I have two session beans: one that is very simple, but
has some basic business logic (EJB1).  

The second session bean performs a database
transaction (EJB2).  

The transaction tag in the descriptor for both beans
is set to Bean.  

We are using Oracle JDBC data source from the using a
local transaction pool.  We are not using Oracle's XA
driver yet.

Because the transaction is handled locally, the
autoCommit() state for the connection in EJB2 is set
to false.  During EJB2's database transaction it makes
a call to EJB1 to get a value.  The call to EJB1 does
not use the database at all during the call.  BUT,
when EJB2 returns from the call to EJB1, the
autoCommit() is set back to true.  Of course, this is
a problem for the database transaction.

Am I breaking the rules by calling another ejb method
during a local database transaction?

Thanks for any input!







__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com


---
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