Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Using the RepositoryUserManager, querying through the StoreAccessor
Using the RepositoryUserManager, querying through the StoreAccessor [message #686831] Sun, 22 May 2011 14:17 Go to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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 #686833 is a reply to message #686831] Sun, 22 May 2011 21:59 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
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 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
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 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
<!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">&nbsp;&nbsp;</font><font color="#7f0055"><b>class&nbsp;</b></font><font
color="#000000">MyUserManager&nbsp;</font><font
color="#7f0055"><b>extends&nbsp;</b></font><font
color="#000000">RepositoryUserManager</font><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">{</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#646464">@Override</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#7f0055"><b>protected&nbsp;</b></font><font
color="#7f0055"><b>char</b></font><font
color="#000000">[]&nbsp;</font><font color="#000000">getPassword</font><font
color="#000000">(</font><font color="#000000">IRepository&nbsp;repository,&nbsp;String&nbsp;userID</font><font
color="#000000">)</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">{</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">IStore&nbsp;store&nbsp;=&nbsp;repository.getStore</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">IHibernateStoreAccessor&nbsp;reader&nbsp;=&nbsp;</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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">StoreThreadLocal.setAccessor</font><font
color="#000000">(</font><font color="#000000">reader</font><font
color="#000000">)</font><font color="#000000">;&nbsp;</font><font
color="#3f7f5f">//&nbsp;*May*&nbsp;be&nbsp;needed,&nbsp;or&nbsp;not</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#7f0055"><b>try</b></font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">{</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font
color="#7f0055"><b>return&nbsp;</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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">}</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#7f0055"><b>finally</b></font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">{</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font
color="#000000">StoreThreadLocal.release</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">}</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">}</font><br>
<font color="#ffffff">&nbsp;&nbsp;</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>


Previous Topic:Attribute of an object
Next Topic:[CDO] How to do jvm connection to the same repo as the tcp acceptor/connection
Goto Forum:
  


Current Time: Fri Apr 19 23:59:57 GMT 2024

Powered by FUDForum. Page generated in 0.03305 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top