This is an excellent question. We had the same issues two years ago when
developing a jdbc connection pool - how to tell if the database server has
gone down. We accomplished it with pluggable helper classes for periodically
checking server/database availablilty.

Does Orionserver have a way for developers to reinitialize the
data-sources.xml file and reestablish database connections without shutting
down the server?

Mike

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Thomas Hertz
> Sent: Sunday, March 05, 2000 11:47 AM
> To: Orion-Interest
> Subject: nullpointer when database connection is lost
>
>
>
> Hello.
>
> I'm not sure this is a bug, but I don't think an applicationserver
> should throw a NullPointerException in this case:
> (Orion/0.9.4)
>
> I set up a small entity bean example with HypersonicSQL.
> Just for testing, I wanted to examine what happens, if orion
> can no longer access the database .
> So I closed the connection (stopped the HSQLwebserver) after
> Orion successfully started.
>
> Now every call of a EntityHome.create() method fails with a
>
> java.lang.NullPointerException
>         at com.evermind.server.ejb.DataSourceConnection.close(JAX)
>         at EntityHomeWrapper6.create(EntityHomeWrapper6.java:480)
>         at
> de.hybris.jakarta.ejb.ProductCategoryEJB.createProductCategory(Pro
> ductCategoryEJB.java:55)
>         at
> EntityBeanWrapper5.createProductCategory(EntityBeanWrapper5.java:485)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at com.evermind.server.rmi.a2.fq(JAX)
>         at com.evermind.server.rmi.a2.run(JAX)
>         at com.evermind.util.b.run(JAX)
>
> The code fragment of ProductCategoryEJB.java:55 where I call the
> underlaying 'create' is
>
>             ...
>               ProductCategory cat = productCategoryHome.create( id );
>               ...
>
> If the HSQL-Server runs everything works fine, if I close it, I
> get the NullPointerException.
>
> When I wait until the ejbPassivate() is called on the enterprise
> java bean, I get a normal
> "Connection to server refused: No further information" exception.
>
> If you have any idea or need more information, please let me know.
>
>
> Greetings from Munich,
>
>    Thomas Hert
>
> ---
>
> Thomas Hertz
>   [EMAIL PROTECTED]
>
>  hybris GmbH
>   Schwere-Reiter-Str. 35
>   Gebaude 16
>   80797 Muenchen
>
>   fon: +49 89 30 66 97 0
>   fax: +49 89 30 66 97 99
>   http://www.hybris.de
>
>  solutions for an
>   accelerating generation.
>
>
>

Reply via email to