1 Reply Latest reply on Apr 5, 2010 7:45 AM by jaikiran

    Microcontainer: how can a bean depend on datasource

      I have the following code inside my bean definition:

       

      <depends>jboss.jca:service=DataSourceBinding,name=MyDataSource</depends>

       

      But when I try to initialize spring context that uses this datasource inside bean's start method I am getting:

       

      Failed to look up JNDI DataSource with name 'java:/MyDataSource'; nested exception is javax.naming.NameNotFoundException:
      Any ideas what I am doing wrong?