Besides that @DataSourceDefinition, I do have a PersistenceUnit
java:global/ClientesDS
But I get:
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "persistence.unit:unitName=test.war#clientes" is missing the
following dependencies:
Dependency "jboss.jca:name=global/ClientesDS,service=DataSourceBinding"
(should be in state "Create", but is actually in state "** NOT FOUND
Depends on 'jboss.jca:name=global/ClientesDS,service=DataSourceBinding'
**")
DEPLOYMENTS IN ERROR:
Deployment "jboss.jca:name=global/ClientesDS,service=DataSourceBinding"
is in error due to the following reason(s): ** NOT FOUND Depends on
'jboss.jca:name=global/ClientesDS,service=DataSourceBinding' **
And earlier in server.log I see
INFO
[org.jboss.resource.connectionmanager.ConnectionFactoryBindingService]
Bound ConnectionManager
'jboss.jca:service=DataSourceBinding,name=internal/test/test/ClienteDAO/ClientesDS'
to JNDI name 'java:internal/test/test/ClienteDAO/ClientesDS'
[]s, Fernando Lozano
---- Original Message ----
From: fernando(a)lozano.eti.br
To: "User development"
Sent: Ter, Out 11, 2011, 19:34 PM
Subject: [jboss-user] @DataSource not registed on the correct JNDI locaton
Hi there,
According to my understanding of
http://javahowto.blogspot.com/2010/04/datasourcedefinition-examples-in-ja...
and
http://java.sun.com/javaee/6/docs/api/javax/annotation/sql/DataSourceDefi...
The following annotation, which is part of a no-interface SLSB defined
inside a test.war package:
@DataSourceDefinition(
name="java:global/ClientesDS",
className="org.hsqldb.jdbcDriver",
url="jdbc:hsqldb:file:/tmp/data/cliente",
user="sa", password="")
Should register "java:global/ClientesDS" on the application server JNDI
three. But when I deploy under JBoss AS 6.1.0.Final, the DataSource is
registed as "java:internal/test/test/ClienteDAO/ClientesDS"
Am I wrong or is JBoss AS violating the spec?
[]s, Fernando Lozano