The simple answer is yes, If the class your loading the JDO from is
/com/opendemand/jdo/<JDOInitializationClass>.

The more exact answer is 'anywhere  getResource() is going to find a file
in a J2EE application'. Thats why it is a good idea to always set the
classloader for the JDO. Both files could be in 'WEB-INF/classes' .



Terry O'Connor
Sandbox Systems
Direct (403) 444-2837
Fax (403) 444-2839
1-866-444-SAND
[EMAIL PROTECTED]
www.sandboxsystems.com



                                                                                       
                                               
                    "Stephen Ince"                                                     
                                               
                    <[EMAIL PROTECTED]       To:     [EMAIL PROTECTED]                 
                                               
                    and.com>             cc:                                           
                                               
                                         Subject:     Re: [castor-dev] Websphere and 
Castor configuration                             
                    03/06/2003                                                         
                                               
                    09:36 PM                                                           
                                               
                    Please respond                                                     
                                               
                    to castor-dev                                                      
                                               
                                                                                       
                                               




Terry,
    What is the path of your database mapping file?  I was using
"/com/opendemand/jdo/database.xml", and this file is located in a jar file
under WEB-INF/lib.

Steve
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 06, 2003 6:53 PM
Subject: Re: [castor-dev] Websphere and Castor configuration


>
> We are using WAS 4.x.. If both the config files are in the same directory
> as the class that is loading the JDO you should have no problem. Assuming
> your initialization code looks like this from the examples?
>
>
>        _mapping = new Mapping( getClass().getClassLoader() );
>         _mapping.setLogWriter( writer );
>         _mapping.loadMapping( getClass().getResource( MappingFile ) );
>
>         _jdo = new JDO();
>         _jdo.setLogWriter( writer );
>        _jdo.setClassLoader(getClass().getClassLoader());
>         _jdo.setConfiguration( getClass().getResource( DatabaseFile
> ).toString() );
>         _jdo.setDatabaseName( "test" );
>
>
>
>
>
>
>                     "Stephen Ince"
>                     <[EMAIL PROTECTED]       To:     [EMAIL PROTECTED]
>                     and.com>             cc:
>                                          Subject:     [castor-dev]
Websphere and Castor configuration
>                     03/06/2003
>                     12:59 PM

>                     Please respond
>                     to castor-dev
>
>
>
>
>
> Is anyone using castor (9.4.*) in websphere ?  What is your mapping
> configuration? My mapping.xml and database.xml files are in the same
> directory. I am having difficulty with the following configuration.
>
> <database name="ods" engine="db2">
> <jndi name="java:comp/env/jdbc/ods"/>
> <mapping href="mapping.xml"/>
> </database>
>
> It can't find my mapping.xml file. Is it possible for the href argument
to
> be a url that uses the classloader. I am picking the database.xml but not
> mapping.xml
>
> Steve
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev
>
>

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to