[JBoss-user] RE: Runtime Exceptions in Session Bean

2002-01-03 Thread Craig Johannsen

If you really and truly need them, the runtime exceptions can be caught in
your session bean.  When you catch a runtime or system exception, then
translate it to an application exception (i.e., just throw a type of
exception you have defined yourself).  That type of exception should be
passed along to the client.


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



Re: [JBoss-user] local interface of session bean

2002-01-03 Thread Jozsa Kristof

On Fri, Jan 04, 2002 at 09:47:59AM +0800, Eric Huang wrote:
> Hello world,
> I can't call the local interface of my session bean from the entity bean.
> However, the remote interface work fine. I saw the same problem in the
> forum,
> but no answers. maybe there is something wrong with ejb-jar.xml.
> 
> Can anyone give me a hint how to solve it?

I've solved my local-call problem yesterday. The main point seemed to be
using the complete lookup name, eg. ctx.lookup("java:comp/env/ejb/Product"),
not only ctx.lookup("Product"). If I use the former form, I get a
ClassCastException when trying to establish a local call, remote calls work
ok this form as well.

Was very strange for me, but that's it.

hth,
Christopher
-- 
.Digital.Yearning.for.Networked.Assassination.and.Xenocide

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



Re: [JBoss-user] classpath confusion

2002-01-03 Thread Guy Rouillier



Don't put anything in classpath.  It's 
tempting, and it can make development easier, and you can probably get along 
fine for awhile.  But sooner or later, you'll get bizarre problems.  
The most common is that updates to your EJBs don't take (i.e, they appear to 
deploy properly, but when you invoke methods on a new version, the old version 
is run.)  For 2.4.x, set JBOSS_CLASSPATH as required.  For 3.0, which 
I haven't used much, there are additional mechanisms for specifying 
required runtime jars.

  - Original Message - 
  From: 
  Frank 
  Morton 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, January 03, 2002 1:20 
  PM
  Subject: [JBoss-user] classpath 
  confusion
  
  I have accumulated a lot of stuff in my CLASSPATH 
  and
  JBOSS_CLASSPATH that probably doesn't need to 
  be
  there. Advice on the forums seems to range from 
  to not
  touch JBOSS_CLASSPATH to just pile everything into
  the two paths until it works, which is what I've 
  done.
   
  Does anyone really know what the "right" jar 
  files should
  be included in CLASSPATH and 
  JBOSS_CLASSPATH
  to both start the server and to start 
  applications using
  the server?
   


Re: [JBoss-user] local interface of session bean

2002-01-03 Thread Jules Gosnell

Both instances I have come come across of people having this problem were
due to the fact that they were not deploying war and ejb-jar within the same
ear.

This is important for local interfaces as it is the way that JBoss is made
aware of the colocation of web and ejb components.

Then again, it could be something else, but without much to go on, I can't
be of any more help.


Jules



Eric Huang wrote:

> Hello world,
> I can't call the local interface of my session bean from the entity bean.
> However, the remote interface work fine. I saw the same problem in the
> forum,
> but no answers. maybe there is something wrong with ejb-jar.xml.
>
> Can anyone give me a hint how to solve it?
>
> Eric
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



[JBoss-user] local interface of session bean

2002-01-03 Thread Eric Huang

Hello world,
I can't call the local interface of my session bean from the entity bean.
However, the remote interface work fine. I saw the same problem in the
forum,
but no answers. maybe there is something wrong with ejb-jar.xml.

Can anyone give me a hint how to solve it?


Eric


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



[JBoss-user] classpath confusion

2002-01-03 Thread Frank Morton



I have accumulated a lot of stuff in my CLASSPATH 
and
JBOSS_CLASSPATH that probably doesn't need to 
be
there. Advice on the forums seems to range from to 
not
touch JBOSS_CLASSPATH to just pile everything into
the two paths until it works, which is what I've 
done.
 
Does anyone really know what the "right" jar files 
should
be included in CLASSPATH and 
JBOSS_CLASSPATH
to both start the server and to start applications 
using
the server?
 


Re: [JBoss-user] Runtime Exceptions in Session Bean

2002-01-03 Thread David Hamilton

Odd.  I understood that containers should handle the System Exceptions
(Runtime Exceptions) by immediately discarding the bean and then throwing
'NoSuchObjectException' if the client makes subsequent invocations on the
stateful session bean (source Monson-Haefel, 3rd Edition)

You talk of the bean throwing a lot of Runtime Exceptions.  That doesn't
sound good.  The rule of thumb with exceptions is that RuntimeExceptions
should only occur as a result of a programming error, configuration error,
or terminal component failure (i.e. unrecoverable data corruption or the
like).

A correctly running, correctly configured system on a working database
should _NEVER_ throw Runtime Exceptions IMHO.

The FileNotFound exception sounds strange, but the bottom line is that this
situation should not be occurring in a normally operating system.

Regards
david



- Original Message -
From: Michael Jara
To: [EMAIL PROTECTED]
Sent: Thursday, January 03, 2002 5:01 PM
Subject: Re: [JBoss-user] Runtime Exceptions in Session Bean


I beleive that's according to spec, ejb1.1 and 2.0.  RuntimeException is
treated as a non-application exception.

Mike
- Original Message -
From: Vinodh Lakshminarayan
To: [EMAIL PROTECTED]
Sent: Thursday, January 03, 2002 3:13 AM
Subject: [JBoss-user] Runtime Exceptions in Session Bean


Hello everyone
  I have a peculiar case here.I have a stateful session bean which
basically talks to an Oracle database .The methods in the bean take care of
insert,update and deletion of rows and they throw a lot of runtime
exceptions.The problem is when there is a run time exception thrown the
exception is not propogated to the client but instead is caught by the
container.The server then tries to passivate the bean.An further calls to
this bean results in "FileNotFoundException : Could not activate the bean".
Any help is appreciated.
I am using JBoss-2..4.0_Tomcat-3.2.2 bundle.( I have also tried the
NoPassivation in jboss.xml but is of no use.It is still passivated when any
runtime exception is thrown.)




Do You Yahoo!?
Send your FREE holiday greetings online at Yahoo! Greetings.




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



[JBoss-user] JBoss Hosting with MS SQL Server

2002-01-03 Thread David Cao

Does anybody know a company provide JBoss Hosting with MS SQL Server?

Thanks.
David

-Original Message-
From: Schouten, Andreas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 9:27 AM
To: [EMAIL PROTECTED]
Subject: FW: [JBoss-user] Runtime Exceptions in Session Bean




> -Original Message-
> From: Schouten, Andreas 
> Sent: 03 January 2002 18:25
> To:   'Vinodh Lakshminarayan'
> Subject:  RE: [JBoss-user] Runtime Exceptions in Session Bean
> 
> Hello,
> 
> if a runtime exception occurs, the comtainer has to remove the bean
> instance. The 'FileNotFoundException' is irritating. The container
can't
> find the instance, because it's removed and asumes, that the bean was
> passivated, but it isn't.
> You need to catch the runtime exceptions and throw a non runtime, i.
e. a
> remote if it is a remote client, exception. The the beans instance
should
> not be removed.
> Andreas 
> 
> -Original Message-
> From: Vinodh Lakshminarayan [SMTP:[EMAIL PROTECTED]]
> Sent: 03 January 2002 11:14
> To:   [EMAIL PROTECTED]
> Subject:  [JBoss-user] Runtime Exceptions in Session Bean
> 
> Hello everyone 
> 
>   I have a peculiar case here.I have a stateful session bean which
> basically talks to an Oracle database .The methods in the bean take
care
> of insert,update and deletion of rows and they throw a lot of runtime
> exceptions.The problem is when there is a run time exception thrown
the
> exception is not propogated to the client but instead is caught by the
> container.The server then tries to passivate the bean.An further calls
to
> this bean results in "FileNotFoundException : Could not activate the
> bean". Any help is appreciated. 
> 
> I am using JBoss-2..4.0_Tomcat-3.2.2 bundle.( I have also tried the
> NoPassivation in jboss.xml but is of no use.It is still passivated
when
> any runtime exception is thrown.)
> 
> 
> 
>   _  
> 
> Do You Yahoo!?
> Send your FREE holiday greetings online at Yahoo! Greetings
> .

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

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



RE: [JBoss-user] Transaction problem

2002-01-03 Thread Richard Doust

Imran,
When your code enters the EJB tier, the entry point has some Transaction
semantics defined in the deployment descriptor. If that semantic states that
a transaction is required then the container will begin a new transaction.
Since you begin a new transaction in the Session Bean (which is presumably
the entry point into the EJB tier for the business function), when you
invoke the code to set the attribute of the entity bean (which also requires
a transaction), your transaction requirements have already been satisfied,
i.e., you are already in a transaction. Now comes the less obvious part.
After you have set the attribute in the entity bean, within the same
transaction (the transaction in which you modified the entity bean has not
been committed nor aborted yet), you call a finder method on the entity's
home interface. This produces a second, fresh instance in memory of the
entity that you have just modified, with its attributes set from the values
in the database as of the current transaction. You see, you've made a change
to the in memory representation of a persistent object, then you go read the
object again from the database without committing your chagne. If you want
the update to the entity's state to be retrieved by a subsequent query, you
will need to commit the change before doing the read.
In general, if you've already read an entity bean in any given transaction,
you don't want to read it a second time. See if there's a way to pass the
instance of the bean that you already have rather than invoke a finder
method.

Cheers,
Richard Doust

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Imran
Bohoran
Sent: Thursday, January 03, 2002 12:23 PM
To: Jboss-User (E-mail)
Subject: [JBoss-user] Transaction problem



Hi all

I'm facing a problem which I believe many of you would be having some
solution.

I have a session bean which is deployed with the TRANSACTION attribute as
"Required" and entity beans with the TRANSACTION attribute as "Required" for
all the methods.
I'm setting a value on a entity from my session bean to the entity A.
soon after that I'm calling a private method which does a finder on entity A
which should include the value added above.
But, my finder is not returning the data that I've added. What could it be
that I'm missing here.?
Appreciate any quick response

TIA and Cheers

Imran

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


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



Re: [JBoss-user] Transaction problem

2002-01-03 Thread danch

What version are you using?

This isn't (exactly) transaction related - the problem is that the 
entity isn't stored prior to the finder method. It wouldn't show up if 
the entity's methods were marked 'RequiresNew' (not that I'm saying you 
want to or should do that!)

This is a bug that (IIRC) was fixed in either version 2.4.3 or 2.4.4.

-danch

Imran Bohoran wrote:

> Hi all
> 
> I'm facing a problem which I believe many of you would be having some
> solution.
> 
> I have a session bean which is deployed with the TRANSACTION attribute as
> "Required" and entity beans with the TRANSACTION attribute as "Required" for
> all the methods.
> I'm setting a value on a entity from my session bean to the entity A.
> soon after that I'm calling a private method which does a finder on entity A
> which should include the value added above.
> But, my finder is not returning the data that I've added. What could it be
> that I'm missing here.?
> Appreciate any quick response
> 
> TIA and Cheers
> 
> Imran
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 



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



[JBoss-user] Transaction problem

2002-01-03 Thread Imran Bohoran


Hi all

I'm facing a problem which I believe many of you would be having some
solution.

I have a session bean which is deployed with the TRANSACTION attribute as
"Required" and entity beans with the TRANSACTION attribute as "Required" for
all the methods.
I'm setting a value on a entity from my session bean to the entity A.
soon after that I'm calling a private method which does a finder on entity A
which should include the value added above.
But, my finder is not returning the data that I've added. What could it be
that I'm missing here.?
Appreciate any quick response

TIA and Cheers

Imran

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



FW: [JBoss-user] Runtime Exceptions in Session Bean

2002-01-03 Thread Schouten, Andreas



> -Original Message-
> From: Schouten, Andreas 
> Sent: 03 January 2002 18:25
> To:   'Vinodh Lakshminarayan'
> Subject:  RE: [JBoss-user] Runtime Exceptions in Session Bean
> 
> Hello,
> 
> if a runtime exception occurs, the comtainer has to remove the bean
> instance. The 'FileNotFoundException' is irritating. The container can't
> find the instance, because it's removed and asumes, that the bean was
> passivated, but it isn't.
> You need to catch the runtime exceptions and throw a non runtime, i. e. a
> remote if it is a remote client, exception. The the beans instance should
> not be removed.
> Andreas 
> 
> -Original Message-
> From: Vinodh Lakshminarayan [SMTP:[EMAIL PROTECTED]]
> Sent: 03 January 2002 11:14
> To:   [EMAIL PROTECTED]
> Subject:  [JBoss-user] Runtime Exceptions in Session Bean
> 
> Hello everyone 
> 
>   I have a peculiar case here.I have a stateful session bean which
> basically talks to an Oracle database .The methods in the bean take care
> of insert,update and deletion of rows and they throw a lot of runtime
> exceptions.The problem is when there is a run time exception thrown the
> exception is not propogated to the client but instead is caught by the
> container.The server then tries to passivate the bean.An further calls to
> this bean results in "FileNotFoundException : Could not activate the
> bean". Any help is appreciated. 
> 
> I am using JBoss-2..4.0_Tomcat-3.2.2 bundle.( I have also tried the
> NoPassivation in jboss.xml but is of no use.It is still passivated when
> any runtime exception is thrown.)
> 
> 
> 
>   _  
> 
> Do You Yahoo!?
> Send your FREE holiday greetings online at Yahoo! Greetings
> .

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



Re: [JBoss-user] Runtime Exceptions in Session Bean

2002-01-03 Thread Michael Jara



I beleive that's according to spec, ejb1.1 and 
2.0.  RuntimeException is treated as a non-application 
exception.
 
Mike

  - Original Message - 
  From: 
  Vinodh 
  Lakshminarayan 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, January 03, 2002 3:13 
  AM
  Subject: [JBoss-user] Runtime Exceptions 
  in Session Bean
  
  Hello everyone 
    I have a peculiar case here.I have a 
  stateful session bean which basically talks to an Oracle database .The methods 
  in the bean take care of insert,update and deletion of rows and they throw a 
  lot of runtime exceptions.The problem is when there is a run time exception 
  thrown the exception is not propogated to the client but instead is caught by 
  the container.The server then tries to passivate the bean.An further calls to 
  this bean results in "FileNotFoundException : Could not activate the 
  bean". Any help is appreciated. 
  I am using JBoss-2..4.0_Tomcat-3.2.2 bundle.( I have also tried the 
  NoPassivation in jboss.xml but is of no use.It is still passivated 
  when any runtime exception is thrown.)
  
  
  Do You Yahoo!?Send your FREE holiday greetings online at Yahoo! 
  Greetings.


[JBoss-user] Runtime Exceptions in Session Bean

2002-01-03 Thread Vinodh Lakshminarayan
Hello everyone
  I have a peculiar case here.I have a stateful session bean which basically talks to an Oracle database .The methods in the bean take care of insert,update and deletion of rows and they throw a lot of runtime exceptions.The problem is when there is a run time exception thrown the exception is not propogated to the client but instead is caught by the container.The server then tries to passivate the bean.An further calls to this bean results in "FileNotFoundException : Could not activate the bean". Any help is appreciated.
I am using JBoss-2..4.0_Tomcat-3.2.2 bundle.( I have also tried the NoPassivation in jboss.xml but is of no use.It is still passivated when any runtime exception is thrown.)Do You Yahoo!?
Send your FREE holiday greetings online at Yahoo! Greetings.