• 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

getting a JDBC connection through JNDI on JBoss 6.x

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an application using JSF (primefaces 4) + JPA on Jboss 6.1

All my DB mapping is made through annotation and my DAOs extend a generic DAO configured by a Factory Producer
In my Factory Producer I declare my Entity Manager that will be injected in the my DAOs
I need to call a procedure and leave the app free turning it back to the screen
For that I have used an async ajax call in JSF along with Thread . In my Thread I am trying to call the procedure call through run method

My problem is this .. My Thread is used as follows :


Doing this I leave JSF scope ... and all my annotations injections stop working
So I don´t get a valid Entity Manager ... etc ...
I am trying to get a valid java.sql.Connection pointing to my app persistence.xml

For this I have tried the following :


It is not working . The connection is instantiated but it is not ok ... It that the table from the query doesn´t exist ( it does ... it is working properly )
My app persitence.xml file content :



My jboss standalone.xml file content :


I am stuck on this for the all week googling for codes but with out success
I am posting this question here because all the samples that I have got on the web are related to JNDI and JDBC but again none worked
So I thought that some one that uses JBoss 6.x would give some help on the setting code according to my environment

Thks !!
 
reply
    Bookmark Topic Watch Topic
  • New Topic