|
Re: Using the RepositoryUserManager, querying through the StoreAccessor [message #686833 is a reply to message #686831] |
Sun, 22 May 2011 21:59 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Okay, after some more thought I can ofcourse use a jvm connection to access the repository as a cdo client. See my
question about that on the newsgroup.
gr. Martin
On 05/22/2011 04:17 PM, Martin Taal wrote:
> Hi,
> I extend the RepositoryUserManager to query the database for a password. The 'problem' I have however, is that I need to
> go through the HibernateStoreAccesor to query, if I don't then the hibernate layer will throw exceptions as it has been
> configured to use the HibernateStoreAccessor in the background.
>
> I tried to configure/create an accessor within the user manager but I could not really figure out how to do that. Is
> there a way to accomplish this?
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Using the RepositoryUserManager, querying through the StoreAccessor [message #687017 is a reply to message #686831] |
Sun, 22 May 2011 21:59 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Okay, after some more thought I can ofcourse use a jvm connection to access the repository as a cdo client. See my
question about that on the newsgroup.
gr. Martin
On 05/22/2011 04:17 PM, Martin Taal wrote:
> Hi,
> I extend the RepositoryUserManager to query the database for a password. The 'problem' I have however, is that I need to
> go through the HibernateStoreAccesor to query, if I don't then the hibernate layer will throw exceptions as it has been
> configured to use the HibernateStoreAccessor in the background.
>
> I tried to configure/create an accessor within the user manager but I could not really figure out how to do that. Is
> there a way to accomplish this?
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Using the RepositoryUserManager, querying through the StoreAccessor [message #687024 is a reply to message #686831] |
Mon, 23 May 2011 07:34 |
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Am 22.05.2011 16:17, schrieb Martin Taal:
<blockquote cite="mid:irb5dn$eq6$1@news.eclipse.org" type="cite">Hi,
<br>
I extend the RepositoryUserManager to query the database for a
password. The 'problem' I have however, is that I need to go
through the HibernateStoreAccesor to query, if I don't then the
hibernate layer will throw exceptions as it has been configured to
use the HibernateStoreAccessor in the background.
<br>
<br>
I tried to configure/create an accessor within the user manager
but I could not really figure out how to do that. Is there a way
to accomplish this?
<br>
</blockquote>
It would be something like:<br>
<br>
<title></title>
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = -->
<!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3"
cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td nowrap="nowrap" align="left"
valign="top"> <code>
<font color="#ffffff"> </font><font color="#7f0055"><b>class </b></font><font
color="#000000">MyUserManager </font><font
color="#7f0055"><b>extends </b></font><font
color="#000000">RepositoryUserManager</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font color="#646464">@Override</font><br>
<font color="#ffffff"> </font><font color="#7f0055"><b>protected </b></font><font
color="#7f0055"><b>char</b></font><font
color="#000000">[] </font><font color="#000000">getPassword</font><font
color="#000000">(</font><font color="#000000">IRepository repository, String userID</font><font
color="#000000">)</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font color="#000000">IStore store = repository.getStore</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font color="#000000">IHibernateStoreAccessor reader = </font><font
color="#000000">(</font><font color="#000000">IHibernateStoreAccessor</font><font
color="#000000">)</font><font color="#000000">store.getReader</font><font
color="#000000">(</font><font color="#7f0055"><b>null</b></font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font color="#000000">StoreThreadLocal.setAccessor</font><font
color="#000000">(</font><font color="#000000">reader</font><font
color="#000000">)</font><font color="#000000">; </font><font
color="#3f7f5f">// *May* be needed, or not</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff"> </font><font color="#7f0055"><b>try</b></font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font
color="#7f0055"><b>return </b></font><font
color="#000000">reader.getPassword</font><font
color="#000000">(</font><font color="#000000">userID</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font><br>
<font color="#ffffff"> </font><font color="#7f0055"><b>finally</b></font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font
color="#000000">StoreThreadLocal.release</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font></code>
</td>
<!-- end source code --> </tr>
</tbody>
</table>
</div>
<!-- = END of automatically generated HTML code = -->
<!-- ======================================================== -->
<br>
Cheers<br>
/Eike<br>
<br>
----<br>
<a class="moz-txt-link-freetext" href="http://www.esc-net.de">http://www.esc-net.de</a><br>
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a><br>
<a class="moz-txt-link-freetext" href="http://twitter.com/eikestepper">http://twitter.com/eikestepper</a><br>
<br>
<br>
</body>
</html>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.05181 seconds