These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Access user name password setup in persistence.xml
PostPosted: Thu Aug 20, 2009 2:16 pm 
Newbie

Joined: Thu Mar 11, 2004 11:20 pm
Posts: 9
I need to use apache shiro (jsecurity) to build security stuff for my project. Shior contains a class JdbcRealm which can access the database. However, it uses plain jdbc connection. I would like JdbcRealm to access to the backend database e.g. mysql using hibernate so that the persistence layer would be consistent.

Now my question arises. After searching on the internet and reading the doucument. I can not find information referring that developer can use standard api e.g. EntityManager/ EntityManagerFactory to obtain data source set in the JdbcRealm so that Shiro (jsecurity) can access to the database.

The only info so far I discovered is at http://docs.jboss.org/hibernate/stable/ ... ogrammatic. It looks like I am able to use Configuration class to obain the datasource information. However, I can not figure out a way to use standard jpa api e.g. EntityManager to access to it.

Would anyone please give me a hint on how to do it? or any resource related?

I appreciate any suggestion.

Thank you very much.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.