Hi Anurudhdha,

In this use case, why are you trying to check the user existence? Are you
trying to do it before user creation? In that case, you don't have to check
it yourself because create user service will do it internally, and throw an
exception if the user exists. So your try-catch approach is fine.

Thanks,
Bhathiya

On Tue, Jan 6, 2015 at 7:19 PM, Anuruddha Premalal <[email protected]>
wrote:

> Hi,
>
> I'm working on APPFAC-2723 and there is a requirement to check whether a
> user is already created in storage server.
>
> In RssAdminService there is a method to check whether a database user
> exists.
>
> Issue with this method is, there has a hashed tenant domain value appended
> to the username once we create  a databaseuser, and it requires the full
> name (with the appended value) to check the user existence.
>
> Isn't it the RSSAdmin service responsibility to append the hashed value
> and perform the search?.
>
> For now I can use a try catch block in the jaggery layer and handle the
> duplicate user creation exception.
>
> AppFactory_Resource_DB has this full user name and perform
> isDataBaseuserExist operation. However this method always resurns false
> because we haven't passed the appended hashed value with the username.
>
> Shall we remove this isDataBaseUserExist method from the ResourceManger
> and use try catch approach to check the user existence?
>
> Regards,
> --
> *Anuruddha Premalal*
> Software Eng. | WSO2 Inc.
> Mobile : +94710461070
> Web site : www.regilandvalley.com
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Bhathiya Jayasekara*
*Software Engineer,*
*WSO2 inc., http://wso2.com <http://wso2.com>*

*Phone: +94715478185*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj
<http://www.linkedin.com/in/bhathiyaj>*
*Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
*Blog: http://movingaheadblog.blogspot.com
<http://movingaheadblog.blogspot.com/>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to