• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

@Resource and JNDI name

 
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

As read from the SCBCD Study 3.0 :
http://java.boot.by/scbcd5-guide/ch02s03.html


For example, a field named myDatabase in the class MySessionBean in the package com.acme.example would correspond to the JNDI name java:comp/env/com.acme.example.MySessionBean/myDatabase



As I understood that from excerpt above is that the runtime will perform a look up in the following name : java:comp/env/com.acme.example.MySessionBean/myDatabase.

When i went to the Glassfish administration tool and tried to create a new resource with the JNDI name : java:comp/env/com.acme.example.MySessionBean/myDatabase

I got the following error :

ADMVAL1047: Value 'java:comp/env/com.acme.example.MySessionBean/myDatabase' is not valid for attribute 'jndi-name' of jdbc resource. The value can not contain the following characters: ^'':, ADMVAL1070: Create of jdbc resource is rejected.




 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic