[JBoss-user] Handle.getEJBObject() bug in jboss 3.2.3 - fixed.

2004-02-11 Thread Russell Chan
FYI,

Attached is a small patch which fixes the problem that I found earlier.
(See prior posts from me with the subject:Handle.getEJBObject().
This patch fixes the problem where a serialized handle to an stateful session
bean was being used to get back to the remote bean instance.  This call, in
jboss 3.2.3 resulted in an extra reflock on the stateful bean, thus causing a problem
when the container went to passivate the bean (Unable to passivate blah blah).
Once again, this patch is for jboss 3.2.3.



Regards,
Russ
--
--
Russell Chan,
Navaho Networks Inc.
416 542 1590 x108
Index: server/src/main/org/jboss/ejb//StatefulSessionContainer.java
===
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/StatefulSessionContainer.java,v
retrieving revision 1.49.2.9
diff -c -r1.49.2.9 StatefulSessionContainer.java
*** server/src/main/org/jboss/ejb//StatefulSessionContainer.java25 Oct 2003 
15:08:03 -  1.49.2.9
--- server/src/main/org/jboss/ejb//StatefulSessionContainer.java11 Feb 2004 
17:57:52 -
***
*** 613,618 
--- 613,619 
  
// Does the session still exist?
InstanceCache cache = getInstanceCache();
+ log.trace(getEJBObject() - getting lock);
BeanLock lock = getLockManager().getLock(id);
lock.sync();
try
***
*** 622,627 
--- 623,631 
}
finally
{
+   //RMC : new - release the lock!!
+   log.trace(getEJBObject() - releasing lock);
+getLockManager().removeLockRef(id);
   lock.releaseSync();
}
  


Re: [JBoss-user] Unable to passivate due to ctx lock

2004-02-04 Thread Russell Chan
Marek,

You aren't perchance using Handle.getEJBObject() in your client app/webapp are you?

If so, search this mailing lists archive for my prior post about Handle.getEJBObject().

I think that there may be a new bug introduced in the 3.2 series that causes an 
additional
extra ref lock on the stateful bean.
If you're not using that call, then there is likely a chance that some ivars of 
your
session bean can't be serialized...
Regards,
Russ Chan
Marek Lange wrote:
After switching from 3.0.6 to 3.2.3 we experience warning messages in 
our logfiles:

WARN  [org.jboss.ejb.plugins.AbstractInstanceCache] Unable to passivate 
due to ctx lock, id=127.0.0.1:1099:dq6o9s7q-x

This seems to be a problem to passivate (a stateful session?) bean. 
Looking into the code, the context of the bean seems to be locked:

protected boolean canPassivate(EnterpriseContext ctx)
{
   if (ctx.isLocked())
   {
  // The context is in the interceptor chain
  return false;
   }
...
Is there a way to discover what is holding the lock on the context? What 
is the impact of that warning for our application?

Thanks,

-marek



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
--
--
Russell Chan,
Navaho Networks Inc.
416 542 1590 x108


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] How to change: jboss.bind.address

2004-02-03 Thread Pitre, Russell








How do I change the jboss.bind.address 
Im using version 3.2.3 w/ Tomcat.



I found this:



Using 3.2.2 or greater use the --host switch. In 3.2.2 you must remove snmp-adapter.sar from your deploy or it will generate bind errors. Example: run.bat -c default --host localhost





But, what if I have to different wepapps that I want to
listen on two different IPs. Can I set this address in jboss-service.xml
file with the Tomcat .sar??









Thanx in advance

Russ








[JBoss-user] Re: Possible bug in Handle.getEJBObject() - Jboss 3.2.3

2004-01-30 Thread Russell Chan
Hi Scott,

As requested, I've added this issue and these emails to the existing bug 780746, 
however,
I don't think that these bugs are quite exactly the same.  The other user wasn't even 
using the
Handle.getEJBObject() call, which appears to be the cause of my woes.
Anyways, take a look at the info I added in there, and if you deem it necessary, I'll file a new bug.

If you need anything else, just holler.

Russ





Scott M Stark wrote:
This is related to an issue: [ 780746 ] Unable to passivate due
that has not had a good testcase. Provide this info in that bug
report and I'll look into it again. 


Scott Stark
Chief Technology Officer
JBoss Group, LLC
 
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Russell
Chan
Sent: Friday, January 23, 2004 12:37 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Possible bug in Handle.getEJBObject() - Jboss
3.2.3

Hi,

I've been wrestling with this problem for a little while.

Environment: JBoss 3.2.3, Sun JDK 1.4.2_01 on linux (debian)

I have a stateful bean which appears to work fine for the most part.
I can generally do some operations on it, within a transaction, and then
remove the bean.  I've set the passivation time very low (20 secs) as
well as the expiry times on the bean as below:
remover-period10/remover-period
overager-period10/overager-period
max-bean-life60/max-bean-life
max-bean-age20/max-bean-age
I've found one case however, where this can cause a problem.  If I get a
handle from the stateful bean, in order to use it ( possibly to put in
an HTTPSession, or someother) that works fine.
Restoring the bean (and possibly activating it) from the container also
works fine.  HOWEVER, I have found that if the remote stub does that,
OUTSIDE of a transaction context, there is a ref lock left on the
stateful session bean, and from there it won't passivate properly - is
this proper behaviour??  (BTW, I haven't yet tried this within a
UserTransaction).
Lots of warning like this:

15:20:32,559 WARN  [AbstractInstanceCache] Unable to passivate due to
ctx lock, id=dpsp9lca-7
15:20:52,597 WARN  [AbstractInstanceCache] Unable to passivate due to
ctx lock, id=dpsp9lca-7
15:21:12,639 WARN  [AbstractInstanceCache] Unable to passivate due to
ctx lock, id=dpsp9lca-7
There's some more detail in the  snippet of log attached.



--
--
Russell Chan,
Navaho Networks Inc.
416 542 1590 x108


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Possible bug in Handle.getEJBObject() - Jboss 3.2.3

2004-01-28 Thread Russell Chan
Hi,

I've been wrestling with this problem for a little while.

Environment: JBoss 3.2.3, Sun JDK 1.4.2_01 on linux (debian)

I have a stateful bean which appears to work fine for the most part.
I can generally do some operations on it, within a transaction, and then 
remove the bean.  I've set the passivation time very low (20 secs) as 
well as the expiry times on the bean as below:

   remover-period10/remover-period
   overager-period10/overager-period
   max-bean-life60/max-bean-life
   max-bean-age20/max-bean-age
I've found one case however, where this can cause a problem.  If I get a 
handle from the stateful bean, in order to use it ( possibly to put in 
an HTTPSession, or someother) that works fine.

Restoring the bean (and possibly activating it) from the container also 
works fine.  HOWEVER, I have found that if the remote stub does that, 
OUTSIDE of a transaction context, there is a ref lock left on the 
stateful session bean, and from there it won't passivate properly - is 
this proper behaviour??  (BTW, I haven't yet tried this within a 
UserTransaction).

Lots of warning like this:

15:20:32,559 WARN  [AbstractInstanceCache] Unable to passivate due to 
ctx lock, id=dpsp9lca-7
15:20:52,597 WARN  [AbstractInstanceCache] Unable to passivate due to 
ctx lock, id=dpsp9lca-7
15:21:12,639 WARN  [AbstractInstanceCache] Unable to passivate due to 
ctx lock, id=dpsp9lca-7

There's some more detail in the  snippet of log attached.



--
--
Russell Chan,
Navaho Networks Inc.
416 542 1590 x108
2004-01-23 15:20:06,567 DEBUG [org.jboss.ejb.plugins.LogInterceptor] InvokeHome: 
getEJBObject(dpsp9lca-7)
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current 
transaction in MI is null
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for 
getEJBObject
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in 
with tx null
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx 
TransactionImpl:XidImpl [FormatId=257, GlobalId=blade//41, BranchQual=]
2004-01-23 15:20:06,567 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] HOMEMETHOD coming in 
2004-01-23 15:20:06,567 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] public abstract 
javax.ejb.EJBObject javax.ejb.Handle.getEJBObject() throws java.rmi.RemoteException
2004-01-23 15:20:06,567 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] HOMEMETHOD coming in 
hashcode1665852439
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] HOMEMETHOD coming in 
classloader12546448
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] CONTAINS true
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] HOMEMETHOD m public 
javax.ejb.EJBObject 
org.jboss.ejb.StatefulSessionContainer.getEJBObject(org.jboss.invocation.Invocation) 
throws java.rmi.RemoteException
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] public abstract 
test.TestSFSB test.TestSFSBHome.create(java.lang.Integer) throws 
javax.ejb.CreateException,java.rmi.RemoteException
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] -1419501933
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] 4521906
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] equals false false
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] public abstract 
test.TestSFSBLocal test.TestSFSBLocalHome.create(java.lang.Integer) throws 
javax.ejb.CreateException
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] 625404838
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] 4521906
2004-01-23 15:20:06,568 TRACE 
[org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] equals false false
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.BeanLockManager] Created lock: [EMAIL 
PROTECTED], bean=TestSFSB, id=dpsp9lca-7, refs=0, tx=null, synched=null, timeout=5000, 
queue=[]
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.BeanLockManager] Added ref to lock: 
[EMAIL PROTECTED], bean=TestSFSB, id=dpsp9lca-7, refs=1, tx=null, synched=null, 
timeout=5000, queue=[]
2004-01-23 15:20:06,569 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] 
TxInterceptorCMT: In finally
2004-01-23 15:20:06,569 TRACE [org.jboss.ejb.plugins.LogInterceptor] End 
method=getEJBObject
2004-01-23 15:20:32,559 TRACE [org.jboss.ejb.BeanLockManager] Added ref to lock: 
[EMAIL PROTECTED], bean=TestSFSB, id=dpsp9lca-7, refs=2, tx=null, synched=null, 
timeout=5000, queue=[]
2004-01-23 15:20:32,559 WARN  [org.jboss.ejb.plugins.AbstractInstanceCache] Unable to 
passivate

[JBoss-user] Re: Possible bug in Handle.getEJBObject() - Jboss 3.2.3

2004-01-28 Thread Russell Chan
Some more info... This behaviour happens regardless of being in a 
transaction...

If I run a jython (python in a java interpreter - useful for testing!)
connecting to the jboss server, I get the Unable to passivate message 
as soon as I call handle.getEJBObject() from the remote client, and the 
passivation thread runs.

The jboss management console just shows the statefulSessionInstanceCache 
for the stateful bean growing larger and larger as more instances of the 
stateful bean are created.

The pool management works fine, however.

Russ



Russell Chan wrote:
Hi,

I've been wrestling with this problem for a little while.

Environment: JBoss 3.2.3, Sun JDK 1.4.2_01 on linux (debian)

I have a stateful bean which appears to work fine for the most part.
I can generally do some operations on it, within a transaction, and then 
remove the bean.  I've set the passivation time very low (20 secs) as 
well as the expiry times on the bean as below:

   remover-period10/remover-period
   overager-period10/overager-period
   max-bean-life60/max-bean-life
   max-bean-age20/max-bean-age
I've found one case however, where this can cause a problem.  If I get a 
handle from the stateful bean, in order to use it ( possibly to put in 
an HTTPSession, or someother) that works fine.

Restoring the bean (and possibly activating it) from the container also 
works fine.  HOWEVER, I have found that if the remote stub does that, 
OUTSIDE of a transaction context, there is a ref lock left on the 
stateful session bean, and from there it won't passivate properly - is 
this proper behaviour??  (BTW, I haven't yet tried this within a 
UserTransaction).

Lots of warning like this:

15:20:32,559 WARN  [AbstractInstanceCache] Unable to passivate due to 
ctx lock, id=dpsp9lca-7
15:20:52,597 WARN  [AbstractInstanceCache] Unable to passivate due to 
ctx lock, id=dpsp9lca-7
15:21:12,639 WARN  [AbstractInstanceCache] Unable to passivate due to 
ctx lock, id=dpsp9lca-7

There's some more detail in the  snippet of log attached.







2004-01-23 15:20:06,567 DEBUG [org.jboss.ejb.plugins.LogInterceptor] InvokeHome: getEJBObject(dpsp9lca-7)
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for getEJBObject
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=blade//41, BranchQual=]
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] HOMEMETHOD coming in 
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] public abstract javax.ejb.EJBObject javax.ejb.Handle.getEJBObject() throws java.rmi.RemoteException
2004-01-23 15:20:06,567 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] HOMEMETHOD coming in hashcode1665852439
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] HOMEMETHOD coming in classloader12546448
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] CONTAINS true
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] HOMEMETHOD m public javax.ejb.EJBObject org.jboss.ejb.StatefulSessionContainer.getEJBObject(org.jboss.invocation.Invocation) throws java.rmi.RemoteException
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] public abstract test.TestSFSB test.TestSFSBHome.create(java.lang.Integer) throws javax.ejb.CreateException,java.rmi.RemoteException
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] -1419501933
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] 4521906
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] equals false false
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] public abstract test.TestSFSBLocal test.TestSFSBLocalHome.create(java.lang.Integer) throws javax.ejb.CreateException
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] 625404838
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] 4521906
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor] equals false false
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.BeanLockManager] Created lock: [EMAIL PROTECTED], bean=TestSFSB, id=dpsp9lca-7, refs=0, tx=null, synched=null, timeout=5000, queue=[]
2004-01-23 15:20:06,568 TRACE [org.jboss.ejb.BeanLockManager] Added ref to lock: [EMAIL PROTECTED], bean

[JBoss-user] Throwing exception question....

2004-01-14 Thread Pitre, Russell








Hello All-



Using: jboss3.2.3-tomcat



I have a class that will throw a user defined exception.



My method:

public ArrayList getPersistableObjects (String className,
String keys) {

if(cachelessKeyValues.length() 
MAX_NUMBER_OF_REQUESTS) {

throw new
MaxNumberOfRequestsException(Request exceeds maximum number of requests
( + MAX_NUMBER_OF_REQUESTS + ));

}else{

 .do
my stuff 

}

}



I am wrapping this class with an ejb. I want to force
my front end developers to use a try catch statement to catch this exception in
their jsps. I have the remote interface and the bean class itself
throwing the exception up the line.



BEAN CLASS:



public ArrayList getPersistableObjects(String className,
String keys) throws MaxNumberOfRequestsException{

return
Mule.getInstance().getPersistableObjects(className, keys);

}

INTERFACE:



public ArrayList getPersistableObjects (String className,
String keys) throws MaxNumberOfRequestsException, java.rmi.RemoteException;





Everything compiles and works fine except that when the jsp
compiles, it does not force you to catch MaxNumberOfRequestsException





Any ideas? Ive been banging my head all day
with this..

Russ








RE: [JBoss-user] Throwing exception question....

2004-01-14 Thread Pitre, Russell
Right!but doesn't...

Here's what the jsp looks like..
%
InitialContext context = new InitialContext(); 

Object ref = context.lookup(ejb/FactoryBean);

FactoryHome factoryHome = (FactoryHome) PortableRemoteObject.narrow (
ref, FactoryHome.class);

Factory factory = factoryHome.create();

String ObjectString = 601645,601647,601649;

ArrayList list = new ArrayList();

list =  factory.getPersistableObjects(com.shawmut.model.Address,
ObjectString);
%


This should not compile



The Factory interface and its corresponding bean implementation both
throw MaxRequestObjectsException...


Thanx-
Russ

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rod
Macpherson
Sent: Wednesday, January 14, 2004 4:50 PM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] Throwing exception question

The JSP compile should fail in that case. 

-Original Message-
From: Pitre, Russell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 12:38 PM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] Throwing exception question


Yah, I have my MaxNumberOfRequestsException class extending Exception
already..still not sure what it is

Still baffled!

Russ



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adrian
Brock
Sent: Wednesday, January 14, 2004 2:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Throwing exception question

You'll need:

public class MaxNumberOfRequestsException extends Exception rather than
extends RuntimeException 
or whatever you are using to avoid declaring it as being thrown.

RuntimeExceptions and Errors do not need to be handled.

Regards,
Adrian

On Wed, 2004-01-14 at 19:07, Pitre, Russell wrote:
 Hello All-
 
  
 
 Using: jboss3.2.3-tomcat
 
  
 
 I have a class that will throw a user defined exception.
 
  
 
 My method:
 
 public ArrayList getPersistableObjects (String className, String keys)

 {
 
 if(cachelessKeyValues.length()  MAX_NUMBER_OF_REQUESTS) {
 
 throw new MaxNumberOfRequestsException(Request exceeds maximum number

 of requests ( + MAX_NUMBER_OF_REQUESTS + ));
 
 }else{
 
 do my stuff
 
 }
 
 }
 
  
 
 I am wrapping this class with an ejb.  I want to force my front end 
 developers to use a try catch statement to catch this exception in 
 their jsp's.  I have the remote interface and the bean class itself 
 throwing the exception up the line
 
  
 
 BEAN CLASS:
 
  
 
 public ArrayList getPersistableObjects(String className, String keys) 
 throws MaxNumberOfRequestsException{
 
 return Mule.getInstance().getPersistableObjects(className, keys);
 
 }
 
 INTERFACE:
 
  
 
 public ArrayList getPersistableObjects (String className, String keys)

 throws MaxNumberOfRequestsException, java.rmi.RemoteException;
 
  
 
  
 
 Everything compiles and works fine except that when the jsp compiles, 
 it does not force you to catch MaxNumberOfRequestsException
 
  
 
  
 
 Any ideas?  I've been banging my head all day with this.
 
 Russ
-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] rmi security manager....

2004-01-06 Thread Pitre, Russell








I have coded an rmi server for my j2ee appl for Jboss and
wish to use the rmi security manager.How can I supply the
following argument at runtime.For now I have been starting JBoss with
run.bat but in the production I will be running Jboss as a service..If
someone supply me with a hint for both solutions that would be greatHere
is the argument I need to pass:



-Djava.security.policy=mypolicyfile
















[JBoss-user] Exclude a class from being logged to the appender

2004-01-06 Thread Pitre, Russell








Does anyone know how I can EXCLUDE a certain class from
being logged to the console appender. This class logs a ping message
every 5 seconds and I dont want to see the messages on the console
during development. 





Any help is greatly appreciated 



appender name=CONSOLE
class=org.apache.log4j.ConsoleAppender

 param name=Target value=System.out/

 !-- CHANGE Value to debug, info,
warn, etc...--

 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





Thanx Russ-
















RE: [JBoss-user] Exclude a class from being logged to the appender

2004-01-06 Thread Pitre, Russell
That doesn't solve my problem..

I took a look at log4j.xml and I didn't find an example of I'm trying to
dohere's my log4j.xml file...if you take a look at the
Userdefined Categories you'll notice where I'm using the
additivity=false value to eliminate logs being sent to the console.
Well, that's what I'm trying to do at least.I've googled all day
long but to no availso frustratingand I can't find anything
within the Jboss docs either.(I have the CS subscription, and I'll
reserve my comments about their documentation)..So if anyone can
help me out I would really appreciate it..


==
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
param name=File value=${jboss.server.home.dir}/log/server.log/
param name=Append value=false/
param name=Threshold value=info/

!-- Rollover at midnight each day --
param name=DatePattern value='.'-MM-dd/

!-- Rollover at the top of each hour
param name=DatePattern value='.'-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


  !-- == --
  !-- Append messages to the console --
  !-- == --

  appender name=CONSOLE class=org.apache.log4j.ConsoleAppender
param name=Target value=System.out/
!-- CHANGE Value to debug, info, warn, etc...--
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
  
  appender name=JSR77 class=org.apache.log4j.FileAppender
param name=Append value=false/
param name=File value=${jboss.server.home.dir}/log/jsr77.log/
layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d{ABSOLUTE} %-5p [%c{1}]
%m%n/
/layout
  /appender 

  !-- = --
  !--  User Defined Appenders   --
  !-- = --

  appender name=SCHEDULER
class=org.jboss.logging.appender.RollingFileAppender
param name=File value=${jboss.server.home.dir}/log/guyute.log/
param name=Threshold value=debug/
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


  !-- == --
  !--  User Defined Categories   --
  !-- == --

category name=com.shawmut.portal.scheduler
priority value=INFO/
appender-ref ref=SCHEDULER/
/category

category name=com.shawmut.portal.scheduler
additivity=false
priority value=INFO/
appender-ref ref=CONSOLE/
/category

  !-- === --
  !-- Setup the Root category --
  !-- === --

  root
priority value=debug/
appender-ref ref=CONSOLE/
appender-ref ref=FILE/
  /root
  
/log4j:configuration


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nicholas
Sent: Tuesday, January 06, 2004 12:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Exclude a class from being logged to the
appender

You can raise the priority of the specific class:

category name=com.x.mynoisyclass
additivity=false
 priority value=ERROR/
/category

//Nicholas

--- Pitre, Russell [EMAIL PROTECTED] wrote:
 Does anyone know how I can EXCLUDE a certain class
 from being logged to
 the console appender.  This class logs a ping
 message every 5 seconds
 and I don't want to see the messages on the console
 during development.
 
 
  
 
  
 
 Any help is greatly appreciated...  
 
  
 
 appender name=CONSOLE
 class=org.apache.log4j.ConsoleAppender
 
 param name=Target value=System.out/
 
 !-- CHANGE Value to debug, info,
 warn, etc...--
 
 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

Re: [JBoss-user] Selecting large datasets using CMP

2003-09-10 Thread Russell Chan
Thanks for you reply Eric.

I suspected this was so, but was hoping for someone else
to come up with a nice elegant solution for me.
I want to take advantage of oracle cursors, so in this case,
it looks like I have to use the raw jdbc.
Russ



Eric J Kaplan wrote:
Russ

I don't know exactly what you need to do in this app (just reading,
updating as well) but there's nothing wrong with straight jdbc from the
session bean for very large queries.  This has been a J2EE design
principal for a while.  Especially if it's read only.
On the other hand, if you get CMP to work with this on jboss as well as
a straight query from a session bean, I'd be very interested to know.
We have an app that deals with very large data sets.
Regards

Eric

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Russell
Chan
Sent: Tuesday, September 09, 2003 3:53 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Selecting large datasets using CMP
Hi,

In our application we currently have a need (don't ask) to periodically
go through a very large dataset.
We are using jboss 3.2.1, with an oracle 9i back-end, using CMP2.

On my first attempts to do this, with a read-ahead strategy of 
on-load, with a page size of 10, (in a transaction),
the cmp engine executes the query, and appears to try to load up the 
primary keys for the resultset.

Unforunately, the amount of keys alone causes jboss on my developer 
machine to give me an OutOfMemoryException.  It hasn't even started to 
preload the beans or anything (so, AFAIK, the read-ahead is immaterial).

Am I stuck with BMP for this? Is there any way to tune the CMP 2 engine 
so that it doesn't try to load in all of the primary keys, and THEN, 
load up the entities?

Thanks,
Russ Chan




---
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
--
--
Russell Chan,
Navaho Networks Inc.
416 542 1590 x108


---
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] Selecting large datasets using CMP

2003-09-10 Thread Russell Chan
Thanks Scott,

I don't think this will help though.  I need to ensure that the dataset 
hasn't changed during invocations of the call, and I don't think that
using multiple calls to this query (to iterate through the WHOLE 
dataset) will guarantee that - even WITH a SELECT FOR UPDATE, as another 
insert or update may slip in while jboss is loading up the beans 
(read-ahead strategy or not).

If the CMP engine used a scrollable cursor or something like that, it 
would be ideal.

I suspect that I will have to use raw JDBC from a session bean like Eric 
has suggested.  I was just hoping for some magic which might have 
alleviated the pain. :-)

Russ

Scott M Stark wrote:
Use the jboss-ql limit offset feature if your db supports it.

ejb-jar.xml:
  query
 query-method
method-namefindWithLimitOffset/method-name
method-params
   method-paramint/method-param
   method-paramint/method-param
/method-params
 /query-method
 ejb-ql!-- define in jbosscmp --/ejb-ql
  /query
jbosscmp-jdbc.xml:
  query
 query-method
method-namefindWithLimitOffset/method-name
method-params
   method-paramint/method-param
   method-paramint/method-param
/method-params
   /query-method
 jboss-qlSELECT OBJECT(o) FROM OrderX o OFFSET ?1 LIMIT 
?2/jboss-ql
  /query

--
--
Russell Chan,
Navaho Networks Inc.
416 542 1590 x108


---
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] Possible to dynamically change datasource information?

2003-09-09 Thread Russell Chan
Hi,

Is it possible to manipulate a datasource programmatically, to change 
the characteristics of a datasource on the fly?

Here's what we'd like to do:

There are occasions, where we need to swap out our normal database to a 
replicated database, and we'd like to do this as smoothly, and in as 
controlled a fashion as possible.  (The main reason for this is to 
upgrade the database software with patches, and the like).  Our
production system needs to run uninterrupted.

I was hoping that I would be able to change the jdbc url and connections
settings via JMX, and tell jboss to flush the connection cache.  Is this
possible currently?
Also, is it possible to get transactions to block?  Once again, this 
would be to allow our DBA to do some quick fix, while the database is 
on hold and then release it.  The catch is that we don't want to lose
any transactions in the meantime.  We'd like them to block up, wait for 
a connection before continuing.  I had thought that maybe I could reduce 
the connection pool size programmatically to zero, then reset it back to 
normal once the db operation was done.  Provided that I can do this, and
we can turn the pools back on before the transactions time out, is this 
feasible?
--
--
Russell Chan,



---
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] Selecting large datasets using CMP

2003-09-09 Thread Russell Chan
Hi,

In our application we currently have a need (don't ask) to periodically
go through a very large dataset.
We are using jboss 3.2.1, with an oracle 9i back-end, using CMP2.

On my first attempts to do this, with a read-ahead strategy of 
on-load, with a page size of 10, (in a transaction),
the cmp engine executes the query, and appears to try to load up the 
primary keys for the resultset.

Unforunately, the amount of keys alone causes jboss on my developer 
machine to give me an OutOfMemoryException.  It hasn't even started to 
preload the beans or anything (so, AFAIK, the read-ahead is immaterial).

Am I stuck with BMP for this? Is there any way to tune the CMP 2 engine 
so that it doesn't try to load in all of the primary keys, and THEN, 
load up the entities?

Thanks,
Russ Chan




---
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] Re: Possible to dynamically change datasource information?

2003-09-09 Thread Russell Chan
Oops... I forgot to mention versions:

We're using jboss 3.2.1 under linux, sun jdk 1.4.1

Russell Chan wrote:
Hi,

Is it possible to manipulate a datasource programmatically, to change 
the characteristics of a datasource on the fly?

Here's what we'd like to do:

There are occasions, where we need to swap out our normal database to a 
replicated database, and we'd like to do this as smoothly, and in as 
controlled a fashion as possible.  (The main reason for this is to 
upgrade the database software with patches, and the like).  Our
production system needs to run uninterrupted.

I was hoping that I would be able to change the jdbc url and connections
settings via JMX, and tell jboss to flush the connection cache.  Is this
possible currently?
Also, is it possible to get transactions to block?  Once again, this 
would be to allow our DBA to do some quick fix, while the database is 
on hold and then release it.  The catch is that we don't want to lose
any transactions in the meantime.  We'd like them to block up, wait for 
a connection before continuing.  I had thought that maybe I could reduce 
the connection pool size programmatically to zero, then reset it back to 
normal once the db operation was done.  Provided that I can do this, and
we can turn the pools back on before the transactions time out, is this 
feasible?


---
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] Stored procedures and session beans

2003-08-14 Thread Russell Chan
Hi,

I've looked through the documentation, but haven't really found an 
answer to my question yet, so I'll try here.

I have a case where some legacy functionality is wrapped up in an
oracle stored procedure.  I have a session bean which needs to do some 
lookups/updated, call this stored procedure, and do further lookups/updates.

The session bean is currently implemented using CMT.  Is it possible to 
get the stored procedure to run in the same database connection as the 
transaction? (Otherwise, my data lookups could be skewed because of the 
stored proc).  If so, how do I get the connection?

I've managed to get a database connection inline but it is probably not 
part of the current transaction, so I'm worried about dirty reads.

Thanks,
Russ


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


[JBoss-user] Clustering and failover

2003-07-27 Thread Russell Chan
Hi,

I'm trying to currently get a two node cluster and a client work only in
a failover setup.  I'm using jboss-3.2.1.
my jboss.xml file has entries such as:

  clusteredtrue/clustered
  cluster-config
  partition-nameTestEJBPartition/partition-name
home-load-balance-policyorg.jboss.ha.framework.interfaces.FirstAvailable/home-load-balance-policy

bean-load-balance-policyorg.jboss.ha.framework.interfaces.FirstAvailable/bean-load-balance-policy
  /cluster-config
And, my client code has jndi.properties that look like:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming
java.naming.provider.url=172.23.254.12:20100,172.23.254.11:20100
(20100 is the HA-JNDI port for these two machines).



The behaviour that I'd like is for the client to use just the first host 
(172.23.254.12) until it fails, and then failover to host 2 
(172.23.254.11).  However, no matter what I try, the client seems to 
round-robin the calls.  I've read through the purchased clustering docs, 
and I'm failing to see something simple here.

The clustering DOES appear to work flawlessly, as I have stateful, 
stateless, and entity beans all in this partition, which work.  My 
problem is that I want fail-over really, not clustering per se.

Any pointers?

Thanks,
Russ Chan


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


[JBoss-user] Failover problem...

2003-07-25 Thread Russell Chan
Hi,

I'm trying to currently get a two node cluster and a client work only in
a failover setup.  I'm using jboss-3.2.1.
my jboss.xml file has entries such as:

  clusteredtrue/clustered
  cluster-config
  partition-nameTestEJBPartition/partition-name
home-load-balance-policyorg.jboss.ha.framework.interfaces.FirstAvailable/home-load-balance-policy

bean-load-balance-policyorg.jboss.ha.framework.interfaces.FirstAvailable/bean-load-balance-policy
  /cluster-config
And, my client code has jndi.properties that look like:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming
java.naming.provider.url=172.23.254.12:20100,172.23.254.11:20100
(20100 is the HA-JNDI port for these two machines).



The behaviour that I'd like is for the client to use just the first host 
(172.23.254.12) until it fails, and then failover to host 2 
(172.23.254.11).  However, no matter what I try, the client seems to 
round-robin the calls.  I've read through the purchased clustering docs, 
and I'm failing to see something simple here.

The clustering DOES appear to work flawlessly, as I have stateful, 
stateless, and entity beans all in this partition, which work.  My 
problem is that I want fail-over really, not clustering per se.

Any pointers?

Thanks,
Russ Chan
--
--
Russell Chan,
Navaho Networks Inc.
416 542 1590 x108


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


[JBoss-user] cmp-field and cmr-field mapped to same database column

2003-06-12 Thread Russell Chan
Hi,

I'm trying to find out if I can have a CMP EJB with a cmp-field
accessors and cmr-field accessors mapping to the same database
column/foreign key.

I'm using jboss-3.2.1 with cmp2 (and xdoclet-1.2b)

In my case, the actual foreign key is enough for some circumstances, and
I don't want to trigger off another database read just to get the
foreign key that's already in the table and that the cmp engine should
already know about. 

Having traced through the sql being generated, if I include accessors on
the column as cmp-fields and a cmr-relation on the same field, the CMP
engine appears to be including the column twice in the generated sql. 
I'm also worried about the effect this will have on updates/inserts.

Is there any way to properly do this in jboss-3.2.1?

I've searched through the archives, and noticed a couple of people
asking this same question.  The answer at the time was not yet
supported, but soon, but that was way back in December 2002.

Thanks,
Russ





---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] cmp-field and cmr-field mapped to same databasecolumn

2003-06-12 Thread Russell Chan
)
at
com.navahonetworks.ejb.entity.EventQueueCMP.getEventQueueTreeValue(EventQueueCMP.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1059)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:95)
at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:301)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:82)
at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:174)
at
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
at
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)






On Thu, 2003-06-12 at 12:27, Alexey Loubyansky wrote:
 Hello Russell,
 
 it should work properly. Try to upgrade your JBoss version. If the
 issue is still there then submit a bug report.
 
 alex
 
 Thursday, June 12, 2003, 5:29:05 PM, Russell Chan wrote:
 
 RC Hi,
 
 RC I'm trying to find out if I can have a CMP EJB with a cmp-field
 RC accessors and cmr-field accessors mapping to the same database
 RC column/foreign key.
 
 RC I'm using jboss-3.2.1 with cmp2 (and xdoclet-1.2b)
 
 RC In my case, the actual foreign key is enough for some circumstances, and
 RC I don't want to trigger off another database read just to get the
 RC foreign key that's already in the table and that the cmp engine should
 RC already know about. 
 
 RC Having traced through the sql being generated, if I include accessors on
 RC the column as cmp-fields and a cmr-relation on the same field, the CMP
 RC engine appears to be including the column twice in the generated sql. 
 RC I'm also worried about the effect this will have on updates/inserts.
 
 RC Is there any way to properly do this in jboss-3.2.1?
 
 RC I've searched through the archives, and noticed a couple of people
 RC asking this same question.  The answer at the time was not yet
 RC supported, but soon, but that was way back in December 2002.
 
 RC Thanks,
 RC Russ
 
 
 
 ---
 This SF.NET email is sponsored by: eBay
 Great deals on office technology -- on eBay now! Click here:
 http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 




---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Can I store a Local Entity Bean in my HttpSession?

2003-03-15 Thread Russell Black



Can I store a Local Entity Bean in my HttpSession? 
That is, will it be valid on subsequent requests? Something like 
this?session.setAttribute("foo", 
beanLocalHome.findByPrimaryKey(key));Thanks,Russell


Re: [JBoss-user] Debugging JSPs with eclipse

2003-01-13 Thread Russell Black



Never mind, I figured it out. I had another 
jasper compiler jar in my classpath that was getting used. I deleted 
everything from the classpath except the JBoss stuff and it worked. 


  - Original Message - 
  From: 
  Russell Black 
  To: [EMAIL PROTECTED] 
  
  Sent: Sunday, January 12, 2003 8:36 
  PM
  Subject: [JBoss-user] Debugging JSPs with 
  eclipse
  
  I've got eclipse debugging JSP's, with the help 
  of the Lomboz plugin. Actually I'm only stepping through the generated 
  java file, not the actual JSP. 
  
  Anyway, I'd like the JSP class files to be 
  compiled with debug so I can see local variables when I'm debugging. 
  I've tried setting the classdebuginfo parameter to true in 
  server/default/deploy/jbossweb.sar/webdefault.xml, but they're still being 
  generated without debug info. 
  
  Has anyone had any luck debugging 
  JSPs?
  
  Thanks, 
  Russell


[JBoss-user] Debugging JSPs with eclipse

2003-01-12 Thread Russell Black



I've got eclipse debugging JSP's, with the help of 
the Lomboz plugin. Actually I'm only stepping through the generated java 
file, not the actual JSP. 

Anyway, I'd like the JSP class files to be compiled 
with debug so I can see local variables when I'm debugging. I've tried 
setting the classdebuginfo parameter to true in 
server/default/deploy/jbossweb.sar/webdefault.xml, but they're still being 
generated without debug info. 

Has anyone had any luck debugging 
JSPs?

Thanks, 
Russell


RE: [JBoss-user] Problems migrating from JBoss_2.4.4-Tomcat_4.0.1 to JBoss_2.4.7-Tomcat_4.0.4

2002-07-04 Thread Russell Giebelhaus

Bundle your web application into a war file and drop it into the
/jboss/deploy directory.

We run JBoss-2.4.4_Tomcat-4.0.1 and haven't done anything in the catalina
directory - any configuration changes and deployments are all done in the
/jboss directory (ie. /jboss/conf/catalina and /jboss/deploy respectively)

Hope this helps,
Russell Giebelhaus


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]
 Sent: Thursday, July 04, 2002 12:47 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Problems migrating from JBoss_2.4.4-Tomcat_4.0.1
 to JBoss_2.4.7-Tomcat_4.0.4


 I run my application on JBoss 2.4.4 and Tomcat 4.0.1, running JBoss ant
 Tomcat separately (i didn't manage to run the bundle), and
 everything works
 right.

 Now I've tried to migrate to JBoss_2.4.7-Tomcat_4.0.4. I deploy
 my app, run
 the bundle, and then try to access to my app, but all I get is an error.
 The message is The requested resource (/myapp/index.htm) is not
 available.The index.htm file is in the myapp folder, which is in
 JBoss-2.4.7_Tomcat-4.0.4/catalina/webapps.

 Has anyone faced this problem or can tell me why this happens?

 Thanks beforehand,
 Ruben





 ---
 This sf.net email is sponsored by:ThinkGeek
 Caffeinated soap. No kidding.
 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
Caffeinated soap. No kidding.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] transaction timed out

2002-06-26 Thread David Russell

Yes,  this has presented a number of problems for me in the past.  I haven't found a 
good work around other than simply not using a transaction of the long-running session 
bean.  You can push the timeout WAY up, but if you don't know what a reasonable time 
to set the transaction timeout to would be...



David P. Russell
Lead Technical Consultant
Idea Integration
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(585) 249-2600
(585) 273-7728

 [EMAIL PROTECTED] 06/26/02 12:16PM 
Would a method in a session bean that initiates a transaction (let's say one
create
on a bean that is Required) timeout if the method took a very long time to
run?
In other words it's something like

{
home.create(key,...);
runforalongtime();
}

eric

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]On Behalf Of David Jencks
Sent: Wednesday, June 26, 2002 11:13 AM
To: [EMAIL PROTECTED] 
Subject: Re: [JBoss-user] transaction timed out


If you insert that many beans in one tx, it  might timeout.  You could use
more tx or increase the tx timeout.

david jencks

On 2002.06.26 10:25:29 -0400 Eric Kaplan wrote:
 I got the following:

 [WARN] [TxCapsule] Transaction XidImpl [FormatId=257,
 GlobalId=ARMANTAC2//1,
 BranchQual=] timed out. status=STATUS_ACTIVE

 This was in the midst of creating about 11000 beans, I got this one
 error.
 Can anyone tell me what I should investigate?

 Thanks

 Eric Kaplan
 Armanta, Inc.
 55 Madison Ave.
 Morristown, NJ  07960
 Phone: (973) 326-9600




---
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members!
JabberConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn 
___
JBoss-user mailing list
[EMAIL PROTECTED] 
https://lists.sourceforge.net/lists/listinfo/jboss-user 



---
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members! 
JabberConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn 
___
JBoss-user mailing list
[EMAIL PROTECTED] 
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members!
JabberConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Re: JBoss-user digest, Vol 1 #2508 - 10 msgs

2002-06-21 Thread David Russell

I'm not sure that I see a difference between using straight SQL in the session bean 
versus finding the appropriate entity bean and querying it for the current inventory.  
The advantage to using the entity bean is, of course, the portability that you 
mention.  I would think that two methods on the session bean - checkInventory and 
reserveInventory would do the trick.  Each would look up the appropriate entity and 
query for available inventory and reserve would reduce inventory if available.  They 
would both be marked as requiring a transaction.  Assuming that transactions are 
deferred to the underlying database, separate servers should play nicely together.  
Using a transaction isolation level of repeatable read or serializable (ugh) would 
then keep the data consistent within each transaction.

Ultimately, unless the entity bean is marked as read-only, writing SQL in the session 
bean to look up inventory vs. using the entity bean shouldn't make a difference wrt 
transactions.

David

 [EMAIL PROTECTED] 06/21/02 11:54AM 
Thanks Marc for the reply.

The issue with your solution is that the inventory checks are for different
users than the where we are updating inventory.  Each time an item is 
displayed on a page, the server checks inventory to see if it is still in
stock.  This is required because the data keeps changing.  If the user wants
the item then they will click add-to-cart and that process will lock the inventory,
double check that there is still one available and reserve a copy all in one
transaction.

Lets say user A on one JBoss presses the add-to-cart button.  The record is
locked and checked to see if there is one.  User B on a different JBoss requests
a page that has the same item on it.  The system selects back the value for user B.
User A finishes the transaction and commits.  User B finishes the transaction.  JBoss
does the safety check for User B, determines that the record has changed, and 
throws an exception.  This may not seem very likely, but in my experience it can
happen at high volume, especially as the DB starts slowing down because of a 
great many requests.  Also keep in mind that there will probably be 100 User Bs to
1 User A.

I think I have two options at this point. Make the User B queries lock the row
so that all users wait in line for access and nobody gets an error.  Or, make the
inventory query from a session bean using SQL.  I posted this to see if someone
knew of a better solution that uses CMP so that code is portable.  For now,
I am going with the direct SQL option because it is fast.  I have also made the
User A requests lock the rows so they play nice with each other.

 From: Marc Zampetti [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] 
 Subject: Re: [JBoss-user] Trying to get outside a transaction
 Reply-To: [EMAIL PROTECTED] 


 I think you are over-thinking the problem. All you need to do is have a
 Session Bean method that performs the inventory check, and mark the
 method as Requires Transaction (or Requires New). Then, when you check
 the inventory, reserve a copy at that time. Thus, the check is the
 reserve, and either it works, or it doesn't. If it works, you have the
 copy reserved, and it doesn't, you know that it is not avaiable, and can
 display the appropriate message to the user. The DB locking should
 ensure that multile jBoss servers can't be caught in a race condiction.
 On the db side, you would do something like this:

 begin tran

 update table, reduce inventory by 1

 select info back that you need.

 commit transaction.

 The update will reduce the eventory, and hold a lock on the page or row
 (depending upon the db setup). Then your select will return the info you
 need to determine if the inventory was still available.

 If you are using an Entity Bean, then the ejbLoad should be called when
 the transaction starts. I'm not sure how jBoss does it, but you would
 want to set the isolation level to REPEATABLE_READ, which basically
 locks the db page or row with the select and holds it. In this case, you
 must make sure that the entity is releases quickly, otherwise you are
 holding locks in the database for a long time, which will grind your
 system to a halt.


---
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/ 
___
JBoss-user mailing list
[EMAIL PROTECTED] 
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] unpacked deployment under3.0

2002-06-11 Thread Mike Russell

Under Jboss 3.0 release with Jetty, how do I deploy an
exploded directory that follows the correct war
structure?  

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

___

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

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



Re: [JBoss-user] jbosscmp-jdbc.xml DTD?

2002-06-07 Thread David Russell

The final DTD has key-fields and key-field respectively as opposed to the 
foreign-key-field versions.  Just spent a little time finding that one myself.

David


David P. Russell
Lead Technical Consultant
Idea Integration
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(585) 249-2600
(585) 273-7728

 [EMAIL PROTECTED] 06/07/02 02:07PM 
I am looking at %JBOSS_HOME%/docs/dtd/jbosscmp-jdbc_3_0.dtd, is this the correct
one?

If so, the example with the CMP docs has the following excerpt:

   foreign-key-fields
  foreign-key-field
 field-nameuserId/field-name
 column-nameUSER_ID/column-name
  /foreign-key-field
   /foreign-key-fields

But there is no string matching foreign-key-field in that dtd.  Am I doing
something wrong?  I'm willing to accept that!! :)

  [knitterb@zoot ~]$ grep foreign-key-field
~/progs/jboss-3.0.0/docs/dtd/jbosscmp-jdbc_3_0.dtd
  0.010u 0.000s 0:00.00 0.0%  0+0k 0+0io 118pf+0w
  [knitterb@zoot ~]$ 

Thanks,

-- 
-bk


Quoting Dain Sundstrom [EMAIL PROTECTED]:

 The old docs are OLD.  The correct dtd to use is the one included with 
 the release in docs/dtd.  Also type-mapping was changed to 
 datasource-mapping between alpha and beta 2.
 
 -dain
 
 Brandon Knitter wrote:
 
  I added the following to the top of my jbosscmp-jdbc.xml file and was met
 with
  TONS of errors, including errors from things I copied from the cmp2
 commerce
  example:
  
  
  !DOCTYPE jbosscmp-jdbc PUBLIC -//JBoss//DTD JBOSSCMP-JDBC 3.0//EN
  http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd;
  
  
  I did check out the patch for cmp documentation updates in another email
 (just
  visually patched it), and even those may not meet the dtd that comes with
 jboss
  3.0?  Is this known?
  
  An example would be that the commerce example which comes with the cmp
  documentation has the following excerpt in the jbosscmp-jdbc.xml file:
  
  
 defaults
datasourcejava:/DefaultDS/datasource
type-mappingHypersonic SQL/type-mapping
debugtrue/debug
create-tabletrue/create-table
remove-tabletrue/remove-table
read-onlyfalse/read-only
time-out300/time-out
select-for-updatefalse/select-for-update
pk-constrainttrue/pk-constraint
relation-mapping-styleforeign-key/relation-mapping-style
read-aheadtrue/read-ahead
 /defaults
  
  
  But according to the dtd, the field type-mapping isn't allowed.
  
  
  !--
  The optional defaults elements contains the default values for 
  entities, and relationships.
  --
  !ELEMENT defaults ((datasource, datasource-mapping)?, create-table?, 
   remove-table?, read-only?, read-time-out?, row-locking?, 
   pk-constraint?, fk-constraint?, preferred-relation-mapping?, 
   read-ahead?, list-cache-max?)
  
  
  
  Sorry if this is a duplicate question, but I'm trying everything to see if
 I
  messed up my files...I'm still having my weird relationship problem.
  
  Thanks,
  
  
 
 
 
 ___
 
 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



[JBoss-user] CMP Generated SQL Problem

2002-06-06 Thread David Russell

OK, so I'm a little impatient and posted this question in a longer form two days ago.  
Hopefully I won't annoy too many people by adding to the already significant deluge of 
mail associated with this list.

Any thoughts on why the generated SQL for an EJB-QL query of the form:

SELECT OBJECT(o)
FROM EgadGenomeBean AS o

would end up generating SQL that looks like this:

SELECT  FROM EGAD.GENOME t0_o

The missing selected columns cause a missing element exception when I actually try 
to use the finder method for this EJB.

Thanks,

David

David P. Russell
Lead Technical Consultant
Idea Integration
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(585) 249-2600
(585) 273-7728


___

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] CMP Generated SQL Problem

2002-06-06 Thread David Russell

Thanks for your response, dain, your comment prodded me to notice my own stupidity.

I had managed to leave out the primkey-field in the ejb-jar.xml file.  I would have 
expected that to have caused some type of deployment exception.

What are the plans to support java.lang.Object primary key types as outlined in the 
spec.?  (Not that I've actually come up with a use for it, just wondering)

David

 [EMAIL PROTECTED] 06/06/02 10:32AM 
Are you trying to use an unknown primary key (java.lang.Object)?  If you 
are, it is not supported.  If you are not you have some funky 
configuration, and you will need to post a bug report (with only the 
simple entity and query).

-dain

David Russell wrote:

 OK, so I'm a little impatient and posted this question in a longer form two days 
ago.  Hopefully I won't annoy too many people by adding to the already significant 
deluge of mail associated with this list.
 
 Any thoughts on why the generated SQL for an EJB-QL query of the form:
 
 SELECT OBJECT(o)
 FROM EgadGenomeBean AS o
 
 would end up generating SQL that looks like this:
 
 SELECT  FROM EGAD.GENOME t0_o
 
 The missing selected columns cause a missing element exception when I actually try 
to use the finder method for this EJB.
 
 Thanks,
 
 David
 
 David P. Russell
 Lead Technical Consultant
 Idea Integration
 [EMAIL PROTECTED] 
 [EMAIL PROTECTED] 
 (585) 249-2600
 (585) 273-7728
 
 
 ___
 
 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



[JBoss-user] CMP Field Mapping and Query

2002-06-04 Thread David Russell
 Oracle datasources configured, and this bean references a one while all of 
the other beans reference the other.



David P. Russell
Lead Technical Consultant
Idea Integration
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(585) 249-2600
(585) 273-7728

___

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] Accessing ejb from IAS container

2001-07-10 Thread Russell


 Hi all , I am using jdk1.2.2 , jboss2.1 and  jbuilder3.5.

 I have a session ejb bean which is deployed in jboss2.1
container.However  I need to access methods in ejb bean in ias
container.

 How to do that in jboss2.1 ?? Anybody have any ideas ??

 Thanks

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



[JBoss-user] Postgres Datasource problems

2001-06-18 Thread Russell Chan
=InvalidateOnErrorfalse/attribute
attribute name=TimestampUsedfalse/attribute
attribute name=Blockingtrue/attribute
attribute name=GCInterval12/attribute
attribute name=IdleTimeout180/attribute
attribute name=IdleTimeoutEnabledfalse/attribute
attribute name=LoggingEnabledtrue/attribute
attribute name=MaxIdleTimeoutPercent1.0/attribute
attribute name=MinSize3/attribute
  /mbean


And, here are my jaws.xml overrides:
jaws
datasourcejava:/LeaseoutDS/datasource
type-mappingPostgreSQL/type-mapping
debugtrue/debug
default-entity
create-tabletrue/create-table
remove-tabletrue/remove-table
tuned-updatesfalse/tuned-updates
read-onlyfalse/read-only
time-out300/time-out
select-for-updatefalse/select-for-update
/default-entity
enterprise-beans
entity
ejb-nameForumMessage/ejb-name
table-nameFORUMMESSAGE/table-name
cmp-field
field-nameid/field-name
column-nameID/column-name
/cmp-field
cmp-field
field-namesubjectId/field-name
column-nameSUBJECT_ID/column-name
/cmp-field
cmp-field
field-namesubjectType/field-name
column-nameSUBJECT_TYPE/column-name
/cmp-field
cmp-field
field-namemessageSubject/field-name
column-nameMSUBJECT/column-name
/cmp-field
cmp-field
field-namemessageBody/field-name
column-namemBody/column-name
/cmp-field
cmp-field
field-namemessageDate/field-name
column-namemDate/column-name
/cmp-field
finder
namefindBySubjectIdAndType/name
querySUBJECT_ID = {0} and SUBJECT_TYPE = {1}/query
orderID/order
/finder

/entity
/enterprise-beans
/jaws



I'm guessing that this is more a postgresql problem as I think it works when I use the
default datastore...

Anyways, any help at this point would be useful...

-- 
Russell Chan
Stable Network Technologies Inc.
PO Box 86079 
Oakville, Ontario, Canada
L6H 5V6

Email: [EMAIL PROTECTED]
Mobile: 416 822 5200
Fax: 416 867 7170

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



[JBoss-user] Weird error in Jboss container

2001-05-17 Thread Russell


 Hi all , i am using RedHat6.1 , jdk1.3 , postgresql7.0.1 and jBoss2.1 .

 The weird error are :

   I have deploy my ejb which included 3 entity and 1 session bean. 
   The session bean is facade to the entity bean.

   When i run jboss container and called a method from session for
example SearchByLikeProjectTitle() in my pc , it will display records in
the database.
   All the method is execute ok in my PC .

   However when i try to execute the method in different PC , it did not
display correct records.
   All the method is not execute correctly.If i call ejbcreate , it did
not display my any error , but the records is not display in the table.
And when i tried to use findByPrimaryKey() to find records which exists
in the database  , it display ObjectNotFoundException error eventhough
the records exists in the table.
  
   Anybody have any idea why i tried to run jboss in different PC , it
give me different results ?

   Thanks.

   public ArrayList searchByLikeProjectTitle(String projectitle) throws
RemoteException,FinderException{

   ArrayList result = new ArrayList();
   System.out.println(projectinfohome + projectinfohome);
   Collection collection =
projectinfohome.findByLikeProjectName(projectitle);

   System.out.println(size + collection.size());
   Iterator iterator = collection.iterator();
   while(iterator.hasNext()){
 ProjectInfo projectinfo =
(ProjectInfo)javax.rmi.PortableRemoteObject.narrow(
iterator.next(),ProjectInfo.class);
 ProjectInfoJB projectinfojb = projectinfo.getProjectInfoJB();
 result.add(projectinfojb);
}
   return result;
 }

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



Re: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class

2001-05-16 Thread Russell

Hi Vincent  ,

  I have only 1 session bean and many entity bean in different
jar.(session bean facade model).

  I did not why . I can remove entity bean without any error before.
  I have tried it in jboss2.2.1 and jboss2.1 and hit the same error
message.

  I did not know why. My guess is that something to do with ClassLoader.

   Thanks wt.

Vincent Harcq wrote:
 
 I am pretty sure there is a problem in the instances pool somewhere, I also
 receive something similar to that.
 The trick is tio call any dummy remote method before calling remove.
 Please help me figure out what happen :
 Do you play with 2 session beans in 2 different ejb jar here ?
 Thanks.
 
  -Message d'origine-
  De : [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]De la part de Russell
  Envoye : mercredi 16 mai 2001 7:02
  A : [EMAIL PROTECTED]
  Objet : Re: [JBoss-user] java.lang.Illegal.Argument Exception : object
  is not instance of the class
 
 
  Hi Toby ,  Thanks
 
The complete exception is below :
 
   java.rmi.ServerException: RemoteException occurred in server thread;
  nested exception is:
javax.transaction.TransactionRolledbackException: Load
  failed; nested
  exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class; nested exception is:
java.rmi.ServerException: Load failed; nested exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class; nested exception is:
javax.transaction.TransactionRolledbackException: Load
  failed; nested
  exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class; nested exception is:
java.rmi.ServerException: Load failed; nested exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class
  javax.transaction.TransactionRolledbackException: Load failed; nested
  exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class; nested exception is:
java.rmi.ServerException: Load failed; nested exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class; nested exception is:
javax.transaction.TransactionRolledbackException: Load
  failed; nested
  exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class; nested exception is:
java.rmi.ServerException: Load failed; nested exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class
  javax.transaction.TransactionRolledbackException: Load failed; nested
  exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class; nested exception is:
java.rmi.ServerException: Load failed; nested exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class
  java.rmi.ServerException: Load failed; nested exception is:
java.lang.IllegalArgumentException: object is not an instance of
  declaring class
  java.lang.IllegalArgumentException: object is not an instance of
  declaring class
at
  sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Str
  eamRemoteCall.java:245)
at
  sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at
  org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown
  Source)
at
  org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke
  (StatelessSessionProxy.java:188)
at $Proxy1.adminDeleteCompany(Unknown Source)
at
  com.cesma.ecommerce.pmg.pmgprocess.Untitled1.main(Untitled1.java:38)
 
 
 
 
  Toby Allsopp wrote:
  
   On Wed, May 16, 2001 at 11:21:57AM +0800, Russell wrote:
   
 Hi all ,
   
   I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1.
   
   When i tried to remove entity , i have the error below :
   
java.lang.Illegal.Argument Exception : object is not
  instance of the
class...
  
   Please, when reporting exceptions, use copy and paste and include THE
   ENTIRE STACKTRACE.  Sorry for shouting, but this really gets on ones
   nerves after a while.
  
   And the code is :
   
  Remote r = home.findByPrimaryKey(new HomePK(3));
  r.remove() -- error here.
  
   That looks reasonable to me.  The complete stacktrace might shed some
   more light on the matter.
  
   Toby.
  
  Anybody have any idea why like that ?? Is this a bug in jboss ??
  
   ___
   JBoss-user mailing list
   [EMAIL PROTECTED]
   http://lists.sourceforge.net/lists/listinfo/jboss-user
 
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
  http://lists.sourceforge.net/lists/listinfo/jboss-user

[JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of theclass

2001-05-15 Thread Russell


 Hi all , 

   I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1.

   When i tried to remove entity , i have the error below :

java.lang.Illegal.Argument Exception : object is not instance of the
class...

   And the code is :

  Remote r = home.findByPrimaryKey(new HomePK(3));
  r.remove() -- error here.

  Anybody have any idea why like that ?? Is this a bug in jboss ?? 


 Thanks

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



Re: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class

2001-05-15 Thread Russell

Hi Toby ,  Thanks
   
  The complete exception is below :  

 java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is: 
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class
java.lang.IllegalArgumentException: object is not an instance of
declaring class
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown
Source)
at
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:188)
at $Proxy1.adminDeleteCompany(Unknown Source)
at com.cesma.ecommerce.pmg.pmgprocess.Untitled1.main(Untitled1.java:38)




Toby Allsopp wrote:
 
 On Wed, May 16, 2001 at 11:21:57AM +0800, Russell wrote:
 
   Hi all ,
 
 I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1.
 
 When i tried to remove entity , i have the error below :
 
  java.lang.Illegal.Argument Exception : object is not instance of the
  class...
 
 Please, when reporting exceptions, use copy and paste and include THE
 ENTIRE STACKTRACE.  Sorry for shouting, but this really gets on ones
 nerves after a while.
 
 And the code is :
 
Remote r = home.findByPrimaryKey(new HomePK(3));
r.remove() -- error here.
 
 That looks reasonable to me.  The complete stacktrace might shed some
 more light on the matter.
 
 Toby.
 
Anybody have any idea why like that ?? Is this a bug in jboss ??
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



[JBoss-user] How to get IP address from ejb

2001-05-11 Thread Russell

 
  Hi all , 

I am using RedHat6.1 , jdk1.3 and jboss2.1 .

Can i get the computer IPAddress which accessed the ejb and stored
in the ipaddress in table ?

  Thanks

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



[JBoss-user] Weird error in jboss2.1.1

2001-05-10 Thread Russell


  Hi all , I am using RedHat6.1 , jdk1.3 and jboss2.1 .

  I have an entity bean , method below is the implementation code is
most important which to increase ejb performance using value object: 

   public ProjectInfoJB getProjectInfoJB() throws RemoteException{

  projectinfojb.setAgreementdate(this.agreementdate);
  projectinfojb.setClient(this.client);
  projectinfojb.setCommencementdate(this.commencementdate);
  projectinfojb.setComments(this.comments);
  projectinfojb.setCompanyid(this.companyid);
  projectinfojb.setCompletedate(this.completedate);
  projectinfojb.setContractor(this.contractor);
  projectinfojb.setContractorperiod(this.contractorperiod);
  projectinfojb.setContractvalue(this.contractvalue);
  projectinfojb.setCountry(this.country);
  projectinfojb.setInchargedp(this.inchargedp);
  projectinfojb.setInchargeperson(this.inchargeperson);
  projectinfojb.setOthersconsultant(this.othersconsultant);
  projectinfojb.setProjectid(this.projectid);
  projectinfojb.setProjectname(this.projectname);
  projectinfojb.setProjectno(this.projectno);
  projectinfojb.setProjecttype(this.projecttype);
  projectinfojb.setServicescope(this.servicescope);
  projectinfojb.setStatus(this.status);

return projectinfojb;
  
}

 And i have a method in stateless session bean :
 
 private ProjectInfoHome projectinfohome;
 private ProjectInfo projectinfo;

 public ProjectInfoJB getProjectInfoJB(int projectid) throws
RemoteException{

try{
 projectinfo = projectinfohome.findByPrimaryKey(new
ProjectInfoPK(projectid));
}
catch(Exception e){}
return projectinfo.getProjectInfoJB(); --get value object

  }
 
 This method is giving me some problems. It can find the record without
any problems.
 However when the first time i called the method for example below:


  1st time : 
ProjectInfoJB jb = getProjectInfo(2) --2 is exist in table so it
can find the records.
System.out.println(jb.getProjectid()) -- display projectid = 2 is
correct.

   But then when run the second time , 

ProjectInfoJB jb = getProjectInfo(9) -- 9 is not exist in
the table, did not throw me nay exception
System.out.println(jb.getProjectid()) --- is display projectid = 2
, which is wrong

  Anybody why jboss behaviour like that ?? Any suggestions ? Thanks wt

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



Re: [JBoss-user] Weird error in jboss2.1.1

2001-05-10 Thread Russell

Hi David ,
  
  If i ignoring the exception , didn't the method will throw null
pointer exception to client.
  I have do a testing and found that because my session is stateless
bean , instance variable is not specific for all client.
  If i change the session to stateful , the method will throw null
pointer exception.

  Am I correct to said that ?

 Thanks 
  

David Jencks wrote:
 
 Hi,
   I doubt your code as reported is complete.  From what you show us, the
 object returned from getProjectInfoJB is never created.
 
 The no exception is presumably from your trapping and ignoring the
 FinderException when you look for your bean.  I suspect what is happening
 is that jboss is reusing the same session bean for your two calls, and
 since ejb attributes don't get reset by the container, it still has the
 reference to the first bean.  The finder exception from looking for a
 nonexistent bean skips the assignment of projectinfo, so you call the 2
 bean getProjectInfoJB().
 
 david jencks
 
 On 2001.05.10 04:39:11 -0400 Russell wrote:
 
Hi all , I am using RedHat6.1 , jdk1.3 and jboss2.1 .
 
I have an entity bean , method below is the implementation code is
  most important which to increase ejb performance using value object:
 
 public ProjectInfoJB getProjectInfoJB() throws RemoteException{
 
projectinfojb.setAgreementdate(this.agreementdate);
projectinfojb.setClient(this.client);
projectinfojb.setCommencementdate(this.commencementdate);
projectinfojb.setComments(this.comments);
projectinfojb.setCompanyid(this.companyid);
projectinfojb.setCompletedate(this.completedate);
projectinfojb.setContractor(this.contractor);
projectinfojb.setContractorperiod(this.contractorperiod);
projectinfojb.setContractvalue(this.contractvalue);
projectinfojb.setCountry(this.country);
projectinfojb.setInchargedp(this.inchargedp);
projectinfojb.setInchargeperson(this.inchargeperson);
projectinfojb.setOthersconsultant(this.othersconsultant);
projectinfojb.setProjectid(this.projectid);
projectinfojb.setProjectname(this.projectname);
projectinfojb.setProjectno(this.projectno);
projectinfojb.setProjecttype(this.projecttype);
projectinfojb.setServicescope(this.servicescope);
projectinfojb.setStatus(this.status);
 
  return projectinfojb;
 
  }
 
   And i have a method in stateless session bean :
 
   private ProjectInfoHome projectinfohome;
   private ProjectInfo projectinfo;
 
   public ProjectInfoJB getProjectInfoJB(int projectid) throws
  RemoteException{
 
  try{
   projectinfo = projectinfohome.findByPrimaryKey(new
  ProjectInfoPK(projectid));
  }
  catch(Exception e){}
  return projectinfo.getProjectInfoJB(); --get value object
 
}
 
   This method is giving me some problems. It can find the record without
  any problems.
   However when the first time i called the method for example below:
 
 
1st time :
  ProjectInfoJB jb = getProjectInfo(2) --2 is exist in table so it
  can find the records.
  System.out.println(jb.getProjectid()) -- display projectid = 2 is
  correct.
 
 But then when run the second time ,
 
  ProjectInfoJB jb = getProjectInfo(9) -- 9 is not exist in
  the table, did not throw me nay exception
  System.out.println(jb.getProjectid()) --- is display projectid = 2
  , which is wrong
 
Anybody why jboss behaviour like that ?? Any suggestions ? Thanks wt
 
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
  http://lists.sourceforge.net/lists/listinfo/jboss-user
 
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] Cannot start jBoss2.2.1 container

2001-05-02 Thread Russell

Hi Jonathan , thanks for your info. 

  I tried to run using jdk1.3 , I also have similar problem. 
  I did not changed anything in the shell script. The # character is
added by jboss developer.

  Thanks

Jonathan Ackerman wrote:
 
 You say that you are using jdk1.3, yet the log is showing that you are using
 jdk.1.2.2
 
 I had some problems running JBoss under JDK 1.2, they went away when I
 switched to JDK1.3
 
 Also I noticed that you had some # characters in the name of some of your
 classes in the shell script (i.e. Docume#ntBuilderFactoryImpl and
 SAXPa#rserFactoryImpl).
 
 Was that just a cut and paste (into the email) error ?
 
 Jonathan
 
 -Original Message-
 From: Russell [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 2 May 2001 5:37 p.m.
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Cannot start jBoss2.2.1 container
 
 
   Hi all ,
   I am using RedHat6.1 , jdk1.3 and jBoss2.2.1.Recently i just
 download
   jBoss2.2.1 to my PC .
   When i tried to run the using java -jar run.jar , it gave me the
 error below :
 
 [Info] Java version: 1.2.2,Sun Microsystems Inc.
 [Info] Java VM: Classic VM 1.2.2,Sun Microsystems Inc.
 [Info] System: Linux 2.2.13-0.13,i386
 [Classpath extension] Added
 directory:file:/mnt/fileserv/wt/JBoss-2.2.1/tmp/
 [Classpath extension] Added
 directory:file:/mnt/fileserv/wt/JBoss-2.2.1/db/
 [Shutdown] Could not add shutdown hook
 [Service Control] Registered with server
 [Default] javax.xml.parsers.FactoryConfigurationError:
 java.lang.ClassNotFoundException:
 org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
 [Default]   at
 javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.
 java:118)
 [Default]   at org.jboss.Main.init(Main.java:192)
 [Default]   at org.jboss.Main$1.run(Main.java:107)
 [Default]   at java.security.AccessController.doPrivileged(Native
 Method)
 [Default]   at org.jboss.Main.main(Main.java:103)
 
  I have read through all jboss archived and follow some method like run
 using run.sh
  Before startup jboss , i run the script. However it still give me the
 error. below is my run.sh.
  Do i need to change the script below to success startup jboss ??
 
  Thanks
 
  #!/bin/sh
 
 # Minimal jar file to get JBoss started.
 
 JBOSS_CLASSPATH=$JBOSS_CLASSPATH:run.jar:../lib/crimson.jar
 
 # Add all login modules for JAAS-based security
 # and all libraries that are used by them here
 JBOSS_CLASSPATH=$JBOSS_CLASSPATH
 
 # Add the XML parser jars and set the JAXP factory names
 # Crimson parser JAXP setup(default)
 JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/crimson.jar
 JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.Docu
 me#ntBuilderFactoryImpl
 JAXP=$JAXP
 -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXPa#rserFacto
 ryImpl
 
 echo JBOSS_CLASSPATH=$JBOSS_CLASSPATH
 
 java -server $JAXP -classpath $JBOSS_CLASSPATH org.jboss.Main $@
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] Cannot start jBoss2.2.1 container

2001-05-02 Thread Russell

Hi all ,

   I am using RedHat6.1 , jdk1.3 and jboss2.2.1 .

   When i tried to execute ./run.sh script , it give me the error
message below :
   Unrecoginzed option:  -server
   Could not create the Java virtual machine. Below is my run.sh script.

   I have no problem running jboss2.1 using java -jar run.jar. What is
happening here ?? Thanks
   
   #!/bin/sh

# Minimal jar file to get JBoss started.

JBOSS_CLASSPATH=$JBOSS_CLASSPATH:run.jar

# Add all login modules for JAAS-based security
# and all libraries that are used by them here
JBOSS_CLASSPATH=$JBOSS_CLASSPATH

# Add the XML parser jars and set the JAXP factory names
# Crimson parser JAXP setup(default)
JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/crimson.jar
JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
JAXP=$JAXP
-Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl

echo JBOSS_CLASSPATH=$JBOSS_CLASSPATH
java -server $JAXP -classpath $JBOSS_CLASSPATH org.jboss.Main $@
 
   
  


Russell wrote:
 
 Hi Jonathan , thanks for your info.
 
   I tried to run using jdk1.3 , I also have similar problem.
   I did not changed anything in the shell script. The # character is
 added by jboss developer.
 
   Thanks
 
 Jonathan Ackerman wrote:
 
  You say that you are using jdk1.3, yet the log is showing that you are using
  jdk.1.2.2
 
  I had some problems running JBoss under JDK 1.2, they went away when I
  switched to JDK1.3
 
  Also I noticed that you had some # characters in the name of some of your
  classes in the shell script (i.e. Docume#ntBuilderFactoryImpl and
  SAXPa#rserFactoryImpl).
 
  Was that just a cut and paste (into the email) error ?
 
  Jonathan
 
  -Original Message-
  From: Russell [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, 2 May 2001 5:37 p.m.
  To: [EMAIL PROTECTED]
  Subject: [JBoss-user] Cannot start jBoss2.2.1 container
 
 
Hi all ,
I am using RedHat6.1 , jdk1.3 and jBoss2.2.1.Recently i just
  download
jBoss2.2.1 to my PC .
When i tried to run the using java -jar run.jar , it gave me the
  error below :
 
  [Info] Java version: 1.2.2,Sun Microsystems Inc.
  [Info] Java VM: Classic VM 1.2.2,Sun Microsystems Inc.
  [Info] System: Linux 2.2.13-0.13,i386
  [Classpath extension] Added
  directory:file:/mnt/fileserv/wt/JBoss-2.2.1/tmp/
  [Classpath extension] Added
  directory:file:/mnt/fileserv/wt/JBoss-2.2.1/db/
  [Shutdown] Could not add shutdown hook
  [Service Control] Registered with server
  [Default] javax.xml.parsers.FactoryConfigurationError:
  java.lang.ClassNotFoundException:
  org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
  [Default]   at
  javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.
  java:118)
  [Default]   at org.jboss.Main.init(Main.java:192)
  [Default]   at org.jboss.Main$1.run(Main.java:107)
  [Default]   at java.security.AccessController.doPrivileged(Native
  Method)
  [Default]   at org.jboss.Main.main(Main.java:103)
 
   I have read through all jboss archived and follow some method like run
  using run.sh
   Before startup jboss , i run the script. However it still give me the
  error. below is my run.sh.
   Do i need to change the script below to success startup jboss ??
 
   Thanks
 
   #!/bin/sh
 
  # Minimal jar file to get JBoss started.
 
  JBOSS_CLASSPATH=$JBOSS_CLASSPATH:run.jar:../lib/crimson.jar
 
  # Add all login modules for JAAS-based security
  # and all libraries that are used by them here
  JBOSS_CLASSPATH=$JBOSS_CLASSPATH
 
  # Add the XML parser jars and set the JAXP factory names
  # Crimson parser JAXP setup(default)
  JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/crimson.jar
  JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.Docu
  me#ntBuilderFactoryImpl
  JAXP=$JAXP
  -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXPa#rserFacto
  ryImpl
 
  echo JBOSS_CLASSPATH=$JBOSS_CLASSPATH
 
  java -server $JAXP -classpath $JBOSS_CLASSPATH org.jboss.Main $@
 
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
  http://lists.sourceforge.net/lists/listinfo/jboss-user
 
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
  http://lists.sourceforge.net/lists/listinfo/jboss-user
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



[JBoss-user] Cannot start jBoss2.2.1 container

2001-05-01 Thread Russell

  
  Hi all , 
  I am using RedHat6.1 , jdk1.3 and jBoss2.2.1.Recently i just
download 
  jBoss2.2.1 to my PC . 
  When i tried to run the using java -jar run.jar , it gave me the
error below :
 
[Info] Java version: 1.2.2,Sun Microsystems Inc.
[Info] Java VM: Classic VM 1.2.2,Sun Microsystems Inc.
[Info] System: Linux 2.2.13-0.13,i386
[Classpath extension] Added
directory:file:/mnt/fileserv/wt/JBoss-2.2.1/tmp/
[Classpath extension] Added
directory:file:/mnt/fileserv/wt/JBoss-2.2.1/db/
[Shutdown] Could not add shutdown hook
[Service Control] Registered with server
[Default] javax.xml.parsers.FactoryConfigurationError:
java.lang.ClassNotFoundException:
org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
[Default]   at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:118)
[Default]   at org.jboss.Main.init(Main.java:192)
[Default]   at org.jboss.Main$1.run(Main.java:107)
[Default]   at java.security.AccessController.doPrivileged(Native Method)
[Default]   at org.jboss.Main.main(Main.java:103)

 I have read through all jboss archived and follow some method like run
using run.sh
 Before startup jboss , i run the script. However it still give me the
error. below is my run.sh.
 Do i need to change the script below to success startup jboss ??
 
 Thanks

 #!/bin/sh

# Minimal jar file to get JBoss started.

JBOSS_CLASSPATH=$JBOSS_CLASSPATH:run.jar:../lib/crimson.jar

# Add all login modules for JAAS-based security
# and all libraries that are used by them here
JBOSS_CLASSPATH=$JBOSS_CLASSPATH

# Add the XML parser jars and set the JAXP factory names
# Crimson parser JAXP setup(default)
JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/crimson.jar
JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.Docume#ntBuilderFactoryImpl
JAXP=$JAXP
-Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXPa#rserFactoryImpl

echo JBOSS_CLASSPATH=$JBOSS_CLASSPATH

java -server $JAXP -classpath $JBOSS_CLASSPATH org.jboss.Main $@

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



Re: [JBoss-user] Null pointer/Server exception when int column null in db

2001-04-30 Thread Russell

Hi Jim , 

  Use primitives wrapper class . for example if field is int , use
Integer class.

Thanks



Jim Cheesman wrote:
 
 I'm getting a NullPointerException (wrapped up in a
 TransactionRolledbackException, in turn wrapped up in a ServerException...)
 when I try to read a column with null data in an int field. Is there any
 work around for this with a CMP entity bean, or is BMP the only way forward?
 
 The db is DB2 over JDBC:ODBC, which I've finally managed to get working.
 The data is legacy and cannot be changed...
 
 Jim
 
 --
 
*   Jim Cheesman   *
  Trabajo:
 [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
Personal:
 [EMAIL PROTECTED] (34) 606 770 244
 Prepositions are not words
 to end sentences with.
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



[JBoss-user] Get Database connection from Jndi

2001-04-25 Thread Russell

 

  Hi all ,

   I am using RedHat6.1 , jdk1.3 and jboss2.1. 
   Recently i have been trying to access database connection from
binding datasource in jboss.
   The error is NamingNotFoundException error
   
   Can we accessed jndi that binding in jboss outside ejb bean ?? Thanks
wt

   below is my code :

   public static void main(String [] args){
 
 try{  
  Properties props = new Properties();
  props.put(Context.INITIAL_CONTEXT_FACTORY,
org.jnp.interfaces.NamingContextFactory);
  props.put(Context.PROVIDER_URL, localhost:1099);  
  Context ctx = new InitialContext();

  ds = (DataSource)ctx.lookup(java:comp/env/jdbc/PostgresDS);
 }
 catch(Exception e){}   
  
}

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



Re: [JBoss-user] Get Database connection from Jndi

2001-04-25 Thread Russell

Hi Guy ,

  I am trying to access dbconnection from jboss connection pool outside
of 
  JBoss.
  
  Can it be done ?? 

  Thanks 
  

Guy Rouillier wrote:
 
 What do you mean by Can we accessed jndi that binding in jboss outside ejb
 bean ??  There have been numerous discussions on this list over the last
 two weeks concerning the use of a DB connection from a JBoss connection pool
 outside of JBoss (can't be done.)  But your message sounds like you are
 doing something else (in jboss outside ejb).  Explain what you are trying to
 do.
 
 - Original Message -
 From: Russell [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, April 25, 2001 10:09 PM
 Subject: [JBoss-user] Get Database connection from Jndi
 
 
 
Hi all ,
 
 I am using RedHat6.1 , jdk1.3 and jboss2.1.
 Recently i have been trying to access database connection from
  binding datasource in jboss.
 The error is NamingNotFoundException error
 
 Can we accessed jndi that binding in jboss outside ejb bean ?? Thanks
  wt
 
 below is my code :
 
 public static void main(String [] args){
 
 
 
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
  org.jnp.interfaces.NamingContextFactory);
props.put(Context.PROVIDER_URL, localhost:1099);
Context ctx = new InitialContext();
 
ds = (DataSource)ctx.lookup(java:comp/env/jdbc/PostgresDS);
   }
   catch(Exception e){}
 
  }
 
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
  http://lists.sourceforge.net/lists/listinfo/jboss-user
 
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] Get Database connection from Jndi

2001-04-25 Thread Russell


Thanks Guy for your info.

   I know this out of scope  I would like to create connection pool
in my servlet.
   The new jdbc2.0 have new classes javax.sql.* which can create
connection pooling.

   Do you know how to do it ? I am using postgresql7.0.1 database.

  Thanks

Guy Rouillier wrote:
 
 Assuming when you say outside of JBoss you mean in a different JVM, no.
 
 - Original Message -
 From: Russell [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, April 26, 2001 12:30 AM
 Subject: Re: [JBoss-user] Get Database connection from Jndi
 
  Hi Guy ,
 
I am trying to access dbconnection from jboss connection pool outside
  of
JBoss.
 
Can it be done ??
 
Thanks
 
 
  Guy Rouillier wrote:
  
   What do you mean by Can we accessed jndi that binding in jboss outside
 ejb
   bean ??  There have been numerous discussions on this list over the
 last
   two weeks concerning the use of a DB connection from a JBoss connection
 pool
   outside of JBoss (can't be done.)  But your message sounds like you are
   doing something else (in jboss outside ejb).  Explain what you are
 trying to
   do.
  
   - Original Message -
   From: Russell [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Wednesday, April 25, 2001 10:09 PM
   Subject: [JBoss-user] Get Database connection from Jndi
  
   
   
  Hi all ,
   
   I am using RedHat6.1 , jdk1.3 and jboss2.1.
   Recently i have been trying to access database connection from
binding datasource in jboss.
   The error is NamingNotFoundException error
   
   Can we accessed jndi that binding in jboss outside ejb bean ??
 Thanks
wt
   
   below is my code :
   
   public static void main(String [] args){
   
   
  
  Properties props = new Properties();
  props.put(Context.INITIAL_CONTEXT_FACTORY,
org.jnp.interfaces.NamingContextFactory);
  props.put(Context.PROVIDER_URL, localhost:1099);
  Context ctx = new InitialContext();
   
  ds = (DataSource)ctx.lookup(java:comp/env/jdbc/PostgresDS);
 }
 catch(Exception e){}
   
}
   
___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
   
  
   ___
   JBoss-user mailing list
   [EMAIL PROTECTED]
   http://lists.sourceforge.net/lists/listinfo/jboss-user
 
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
  http://lists.sourceforge.net/lists/listinfo/jboss-user
 
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



[JBoss-user] Create class in the ejb bean.

2001-04-24 Thread Russell


  Hi all  , 
 
 I am using RedHat6.1 , postgresql7.0.1 , jdk1.3 and jboss2.1.

 It is valid to create class within ejb bean , for example in the
session bean code below :
  
 class Test{
   }

 public void ejbCreate(){}
 public void...{}


 Anybody have any ideas ?? Thanks

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



[JBoss-user] javax.ejb.FinderException : Find failed Exception

2001-04-23 Thread Russell



  Hi all , I am using RedHat6.1 , jboss2.1 and jdk1.3.
  I have created entity bean and deployed to jboss container.
  
  The problems that i have facing is that when i create my own finder
method :

  findByUser(String loginid) throws RemoteException,FinderException.

  When i tried to call the find method , i hit the error below :
   
  javax.ejb.FinderException: Find failed
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown
Source)
at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:248)
at $Proxy0.findByUsers(Unknown Source)
at com.cesma.ecommerce.pmg.user.Untitled1.main(Untitled1.java:23)

  What is happening here ??? Anybody have any idea ? Calling
findByPrimaryKey method is ok.

  Thanks wt.

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



[JBoss-user] Some question about jboss

2001-04-20 Thread Russell


  Hi all , i am using RedHat6.1 , jdk1.3 and jboss2.1.

  I have came across a document regarding jboss container. 
  The url is //www2.theserverside.com/reviews/thread.jsp?thread_id=2918

  The title is "Can JBoss be a BEA better" .
  And about pros an cons of JBoss.
  One of cons that i have most concern is the clustering support in
jboss.
  It stated that jboss did not support clustering.
  Is current Jboss support clustering ??? More info please.

  Maybe some jboss people can elaborate about this.

 Thanks wt.

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



[JBoss-user] Ref:Generate unique key in ejb

2001-04-20 Thread Russell

 
 Hi all , 

   I am using RedHat6.1 , jdk1.3 , jbuilder3.5 and jboss2.1.

   I have the code below :

   public ProjectMngUserPK ejbCreate(ProjectMngUserJB projectmnguserjb)
throws CreateException {

this.pm_userid = projectmnguserjb.getUserid();
this.companyid = new Integer(projectmnguserjb.getCompanyid());
this.email = projectmnguserjb.getEmail();
this.password = projectmnguserjb.getPassword();
this.canapproved = projectmnguserjb.isCanapproved();
this.ishomeowner = projectmnguserjb.isIshomeowner();
this.issalesexec = projectmnguserjb.isIssalesexec();
this.isprojectexec = projectmnguserjb.isIsprojectexec();
this.isadmin = projectmnguserjb.isIsAdmin();
this.name = projectmnguserjb.getName();

//must generate unique login id for user
this.loginid = projectmnguserjb.getLoginid();

return null;
  }


  My question is that i need to generate a unique key for loginid.
  Anybody have any ideas how to do it ? Thanks wt.

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



[JBoss-user] No resource manager found

2001-04-18 Thread Russell


  Hi all ,

   I am using RedHat6.1 , postgresql7.0.1 ,jboss2.1 and jdk.1.3.

   Do i need to worry if where start the jboss , i have the error below
:

   [Container-Factory]No resource manager found for jdbc/PostgresDS

  However , when i called ejb create , the records is inserted in my
table and did not give me any error.

  Are this jboss bugs ?

 Thanks wt.

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



Re: [JBoss-user] No resource manager found

2001-04-18 Thread Russell

Hi Toby  ,

   First of all , I did not deploy the ejb jars with jboss.xml(from
documentation is optional).
   And the records are inserted into my table , i can see it in my
database.

 Thanks.
   

Toby Allsopp wrote:
 
 On Wed, Apr 18, 2001 at 08:19:31PM +0800, Russell wrote:
 
Hi all ,
 
 I am using RedHat6.1 , postgresql7.0.1 ,jboss2.1 and jdk.1.3.
 
 Do i need to worry if where start the jboss , i have the error below
  :
 
 [Container-Factory]No resource manager found for jdbc/PostgresDS
 
 Yes. This means that you haven't successfully mapped the bean-local name,
 "java:comp/env/jdbc/PostgresDS" to the global name of the DataSource you
 want.
 
However , when i called ejb create , the records is inserted in my
  table and did not give me any error.
 
 I think you'll find that they haven't been inserted in your table, but in
 someone else's.  JBoss defaults to java:/DefaultDS in this situation, which
 is the bundled HypersonicSQL database by default.
 
 You need to check your jboss.xml to make sure the mapping is set up
 correctly.
 
Are this jboss bugs ?
 
 It's not the clearest error message in the world.  You might like to log
 a feature request at SourceForge for it to be improved.
 
 Toby.
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] No resource manager found

2001-04-18 Thread Russell
 jdbc-typeFLOAT/jdbc-type
   sql-typeFLOAT/sql-type
 /mapping
   /type-mapping
  /type-mappings
   /jaws
 
 

 Thanks
  

Toby Allsopp wrote:
 
 On Thu, Apr 19, 2001 at 11:08:27AM +0800, Russell wrote:
 
  Hi Toby,
 
I have did not see any DefaultDS in my jboss.jcml.
And for second question , i did not why it can inserted record into
  table even i have the warning from jboss.
Thanks
 
Below is my jboss.jcml file :
 
 Yep, there's no DefaultDS there. That's fine, but it leaves the question of
 why you're getting the right DataSource.
 
 Does your code say something like:
 
 DataSource ds = (DataSource) new InitialContext().lookup("java:/PostgresDS");
 
 by any chance?
 
 If not, what does it say?
 
 Toby.
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] Ejb Extrenal References

2001-04-17 Thread Russell


Hi Rajender , 

 Are you are trying to call ejb bean from different jar files in the
same container ?
 If yes , you need to set ejb-ref in ejb-jar.xml like below :

  ejb-ref
ejb-ref-nameejb/Sequencekeys/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homecom.cesma.sequence.SequencekeysHome/home
remotecom.cesma.sequence.Sequencekeys/remote
ejb-link/ejb-link //-- no ejb-link for different jars in same
containers
   /ejb-ref 

 You need to import the home,remote classes to ejb jar that accessed the
ejb.

 Thanks wt.

Rajender A wrote:
 
 Here i am facing problems with Ejb Extrenal refrences.
 I am trying to call Cmpeb from StatefulSB within same Jboss server different
 jar files.
 
 Problem getting while running client is
 
 Javax.naming.CommunicationException(RootException is
 java.lang.ClassnotFoundException : EntityHome)
 
 But same examples i have tried with internal references igot the result.
 
 Is there any configuration needed for this problem?
 
 Please send a solution as early as possible.
 
 With Regards
 Raj
 CSIS Ltd.
 Hyderabad,India.
 
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] Connection pooling

2001-04-17 Thread Russell

Hi Toby  ,

   Yes I am after some negative remarks from you . :) just kidding.

   BTW , I have another question . 
   I need to accessed the Connection pooling from servlet/jsp , can i do
that ??
 
   Can i code like below : 

InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/DB");

  Thanks 

   

Toby Allsopp wrote:
 
 On Wed, Apr 18, 2001 at 12:08:29PM +0800, Russell wrote:
 
Hi all , i am using RedHat6.1 ,jdk1.3,postgresql7.0.1 and jboss2.1.
 
 Hi. Good to see you have the hang of the Linux/RedHat naming thing, now :-)
 
 Oh, BTW, please upgrade to JBoss 2.2 at your earliest convenience.
 
I need some advice regarding the code below which in stateless session
  bean :
My question is that if the connection below created are pooled ???
  Thanks wt.
 
 
 ...
private Connection getConnection() throws SQLException{
 DataSource ds = null;
  try{
Context ctx = new InitialContext();
ds = (DataSource)ctx.lookup("java:comp/env/jdbc/PostgresDS");
  }
  catch(NamingException ne){
   ne.printStackTrace();
  }
 return ds.getConnection();
}
 
 Yes, this is the correct way to obtain a connection from a pool. Whether
 or not pooling is actually happening depends on the specific implementation
 of DataSource that you obtain from JNDI. If you have bound in a Minerva
 connection pool, then you have connection pooling.
 
 Toby.
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] What is BlackBox Datasources ??

2001-04-10 Thread Russell

Hi Toby  ,

   Thanks for your info. Please forgive me , i am a amature in Linux.

   When we will using "Black box" , didn't in xml files , there are
already some 
   resources tag for JDBC connection.

   What is the main usage of "Black box" ??

  Thanks 


Toby Allsopp wrote:
 
 On Tue, Apr 10, 2001 at 09:01:34AM +0800, Russell wrote:
 
Hi all ,  I am using Linux6.1 , jbos2.1  and tomcat3.2.1.
 
 I've told you before, and I'll keep telling you: there is no such thing
 as "Linux6.1". I assume you mean RedHat 6.1.
 
May i know what is BlackBox Datasources ?? What is the purposes ??
Any documentation regarding Black Box DS ??
 
 "Black Box" is the name Sun gave to the example resource adapters that they
 shipped with early access versions of their JCA reference implementation.
 
 They are resource adapters that provide JDBC connections. You can find
 information on using them with JBoss in the "JBossCX Configuration" section
 of the manual.
 
 Toby.
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



[JBoss-user] What is BlackBox Datasources ??

2001-04-09 Thread Russell


  Hi all ,  I am using Linux6.1 , jbos2.1  and tomcat3.2.1.

  May i know what is BlackBox Datasources ?? What is the purposes ??
  Any documentation regarding Black Box DS ??

  Thanks wt

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



[JBoss-user] Error in the Jboss

2001-04-05 Thread Russell


 Hi all , i am using JBoss2.1 , Tomcat3.2.1 and jdk1.3 .

 I have a module which session ejb bean that will create company : below
is the code

 public void addCompanyUsers(int adminid,UserCompanyJB usercompanyJB
  ) throws RemoteException,FinderException,CreateException,UserException
{

   seqkey = seqkeyHome.create(); - this is the session bean which will
autogenerate primary keys

   if(isUserIsAdmin(adminid)){
  int k = seqkey.executeSQLStatement
   ("Select NEXTVAL('usercompany_seq') from usercompany_seq");

   usercompanyJB.setCompanyid(k);
   usercompanyHome.create(usercompanyJB);
}
else throw new UserException("Only Admin can add new company");
  }

 When the users create the company over and over again , the web browser
will have not response.
 below is the message in jboss :

 Transaction
XidImpl[FormatId=257,GlobalId=point6.cesma.com.sg//37,BranchQual=]
timeout.Status =STATUS_ACTIVE.

 What is happening in jboss ? I have include my ejb jar also.

 Anybody have any ideas ?? Thanks wt
 sequencekey.jar
 userproject.jar


Re: [JBoss-user] Error in the Jboss

2001-04-05 Thread Russell

Yes u are correct. I forget to close the connection.

Thanks


[EMAIL PROTECTED] wrote:

 
 I think my previous suggestion did not apply.
 
 It seems like you are retrieving more connection from the connection pool
 than returning to it. When the server runs out of connections, it will hang
 until
 connections become available again. After you are done with the connection
 that have retrieved from the connection pool, you must return it to the
 pool by calling connection.close().
 
 Thomas Kirsch
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



[JBoss-user] Finder method in Jboss is not working

2001-04-05 Thread Russell


 Hi all ,
   I am using JBoss2.1 , jdk1.3 and Tomcat3.2.1.

   I have CMP fields as below :

public int id;
public String name;
public String country

   I have added a finder method in the home interface as below :

findByName() throws RemoteException,FinderException;
findByCountry() throws RemoteException,FinderException;

  When I tried to access the finder in the client , it give
javax.ejb.FinderException : Find Failed.
  I did not added anything in the xml file. Do i need to ? Didn't jboss
will do automatically ?

  Thanks wt

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



Re: [JBoss-user] Explicit commit and rollback in EJB

2001-03-28 Thread Russell

Hi Dan ,

  Thanks for your info. 
  
  Out of topic ,
  I am trying to MessageDriveBean ejb , below is the list question
regarding MDB :
  1) What is MDB ?
  2) What is the purpose of MDB ? 
  3) In what way can i use MDB ? To communicate between ejb bean ?
  4) How to setup MDB in jboss ?

  BTW , our Asian counterparts are very curious how jboss developers can
develop such a good products.
  What incentives that you all achieved  ? Where you all get capital
from ? 
  How you all doing it ? 

  Thanks wt.


danch wrote:
 
 Russell wrote:
 
  Hi Dan ,
 
Thanks for u info. Read document regarding transaction in javasoft.com
  and i found out that what i done it in CMP is
wrong.
 
BTW , can i know why i must set the fetching key as RequiresNew ??
 
 That isn't a 'must', it just shortens the time that the sequence might be
 
 locked in the database. On the other hand, Oracle for one allows simultanious
 
 access to sequences from different transactions at the cost of potential 'holes'
 in the sequence. Postgres might do the same thing, but I'm not
 sure offhand.
 
 danch
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] How to Lookup a bean from another bean (separate jars)?

2001-03-27 Thread Russell

Hi alex ,

  From accessing ejb bean from separate jar,you did not need to specify
the ejblink tag.Maybe that is u problems.
  Specify ejb-link for accessing ejb bean in the same jar.

  I test to accessing ejb bean in separate jar using jboss without any
problems.Furthermore in jboss , is very simple than
  other ejb container.

  Hope that help. wt
 

alex zhanov wrote:
 
 Hello,
 I tried to follow instructions from jboss manual with no apparent success.
 One bean(A) points to and uses another bean(B), what is suppose to go into bean(A) 
under ejb-ref
 to make it to work at least deployed on the same machine? As in my case, the lookup 
always throws
 exception.
 
 Thanks,
 Alex
 
 Bean A ejb-jar.xml
 ...
 ejb-ref
 ejb-ref-nameejb/beanB/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homecom.path.BeanBHome/home
 remotecom.path.BeanB/remote
 /ejb-ref
 ...
 
 jboss.xml
 ...
 ejb-ref
 ejb-ref-nameejb/beanB/ejb-ref-name
 ejb-linkjndi://localhost:1099/beanB/ejb-link
 /ejb-ref
 
 --
 alex zhanov
 [EMAIL PROTECTED] - email
 
 __
 FREE voicemail, email, and fax...all in one place.
 Sign Up Now! http://www.onebox.com
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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