EJB New User Create Race Condition

If I have an EJB that creates a new user account that does the following in the method:
if username already exists then
send error message to user
else
proceed with new user creation
end if
How do I prevent the following race condition:
User1 EJB: user name does not exist
User2 EJB: user name does not exist
User1 EJB: create new user
User2 EJB: create new user
Thanks,
Kurzweil4

unfortunately, you don't. however, assuming you have a unique constraint in the database, you can do this, but it's tricky because you might not get the failure until the transaction is committed. i personally would handle this by having the "main" (remote) method call untransacted. make this method call a second local ejb with a transaction context of create-new. do the actual work within this second method call. when this second method returns, either the call succeeded, or you will get some sort of ejb transaction rollback exception. you can then handle this exception in the outer method call.

Similar Messages

  • New user created in oracle 11g (release 2) is not connecting (ORA-01017)

    Hi All,
    Kindly help me out regarding this.
    I have created a new user using "ORACLE Enterprise Manager 11g" and used the same credentials in SQL developer for a new connection and it throw "ORA-01017: invalid username/password; logon denied" message.
    Kindly note that have followed the following steps in creating user:
    On the Users page, click Create.
    In the Name field, enter NICK.
    In the Profile list, accept the value DEFAULT.
    This setting assigns the default password policy to user Nick.
    In the Enter Password and Confirm Password fields, enter a password that is secure.
    Create a password that is secure. See Oracle Database Security Guide for more information.
    Do not select Expire password now. If the account status is set to expired, then the user or the database administrator must change the password before the user can log in to the database.
    (Optional) Next to the Default Tablespace field, click the flashlight icon, select the USERS tablespace, and then click Select.
    All schema objects that Nick creates will then be created in the USERS tablespace unless he specifies otherwise. If you leave the Default Tablespace field blank, Nick is assigned the default tablespace for the database, which is USERS in a newly installed database. For more information about the USERS tablespace, see "About Tablespaces".
    (Optional) Next to the Temporary Tablespace field, click the flashlight icon, select the TEMP tablespace, and then click Select.
    For the Status option, accept the default selection of Unlocked.
    You can later lock the user account to prevent users from logging in with it. To temporarily deny access to a user account, locking the user account is preferable to deleting it, because deleting it also deletes all schema objects owned by the user.
    Grant roles, system privileges, and object privileges to the user, as described in "Example: Granting Privileges and Roles to a User Account".
    Note: Do not click OK in Step 13 of "Example: Granting Privileges and Roles to a User Account". Instead, skip that step and continue with Step 12 in this procedure.
    Assign a 10 MB quota on the USERS tablespace, as described in "Example: Assigning a Tablespace Quota to a User Account".
    If you did not click OK while assigning the tablespace quota (previous step), click OK now to create the user.Kindly note that I have log in as SYSTEM user and created this new user.
    Could any one help me regarding this ?

    After connecting with sqlplus, as user SYSTEM and when tried the below, I could see that the new user created by me does not exist..
    select '--' || username || '--'
    from dba_users
    order by username;
    But when tried with GUI "ORACLE Enterprise Manager 11g" I can very well see the new user created by me..
    How is this possible mate??
    Is the user not properly created through GUI (than from where it is showing the new user)
    Some more information i want to share;
    i have used schema "HR"
    And have used table space "USERS"
    And tep tablespace "TEMP"
    Edited by: 828569 on Jan 16, 2011 9:01 PM
    Edited by: 828569 on Jan 16, 2011 9:03 PM

  • New user created. How to create Central Person and Business partner

    Hi,
    I got a new users created in SRM 5.0 .how to create Central person and business partner.
    Without CP & BP we cannot work. please guide.
    Regards
    G.Ganesh Kumar

    HI GANESH
    As you aware , assign the user to organisation structure via users_gen , the system will create a BP and Central Person , Position and user for you.
    br
    muthu

  • Simple mail notification on new user create

    Hi,
    I am new to oim 11g. We are doing a small POC where we need to send mail to system admin on new user create. We just want to test notification functionality in OIM 11g.
    Please let me know how to proceed, without any coding, if we want to send mail on new user creation.
    Thank,
    Kalpana.

    even after giving valid email address in xelsysadm user account, I am getting below error:
    [2013-12-24T01:43:26.490-08:00] [oim_server1] [ERROR] [] [oracle.iam.notification.impl] [tid: [ACTIVE].ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: b33006816923ec25:29d2fb5b:1431077f18c:-8000-000000000000b0ab,0] [APP: oim#11.1.2.0.0] Provider EmailServiceProvider has encountered exception : From address must not be null
    [2013-12-24T01:43:26.490-08:00] [oim_server1] [ERROR] [] [oracle.iam.notification.impl] [tid: [ACTIVE].ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: b33006816923ec25:29d2fb5b:1431077f18c:-8000-000000000000b0ab,0] [APP: oim#11.1.2.0.0] Sending notification with Provider EmailServiceProvider has encountered exception : Error occured while Sending Notification through Provider EmailServiceProvider : From address must not be null
    [2013-12-24T01:43:26.491-08:00] [oim_server1] [ERROR] [] [oracle.iam.notification.impl] [tid: [ACTIVE].ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: b33006816923ec25:29d2fb5b:1431077f18c:-8000-000000000000b0ab,0] [APP: oim#11.1.2.0.0] Sending notification with Provider EmailServiceProvider detailed exception : From address must not be null

  • Assigning Default Role to New Users created

    Hi
    How can we assign a default Role to any new User created.
    This Role should automatically get assigned whenever a new User is created.
    Regards

    Hello,
    for ABAP Stack users you can just create a reference user with the according roles and copy new users from it.
    Regards
    Christian

  • New user created doesn't see any data in reports

    Hello Everyone,
    I am using Hyperion Planning 11.1.2.1. I have a problem when i created a new user in the system via Shared Services. The reports are Reporting and Analysis reports.
    I duplicated a current user in the system and applied the same groups and provisions. However, the new user cannot view any data in the reports. The current user however is able to do so. I am quite literally puzzled.
    The existing user has been given the "Planner" provision. Further, the existing user has dimension security applied as well. This works fine with the existing user, as when i log in as the existing user, the data is available only to the groups and dimensions he has been assigned to. But when I apply the same groups and provisions to the newly created user, I get absolutely no data though i can see the report.
    But if I apply the Essbase Cluster: Administrator provision to the new user, all the data is viewable in the reports irrespective of the dimension security.
    I would appreciate some help urgently to get this matter resolved.
    Regards

    Hi John,
    Though the problem was solved last time, it returned. Users aren't able to view any web analysis reports.
    I dropped all users from SS and deleted all the security filters from EAS. (made a backup of course). Then I created all the users once again with relevant access to groups and the provision of "Planner" in the relevant planning application.
    Then in planning (Administration > Manage Security Filters > UserName > Create) created the filter for the user.
    When I did that, the default filter for the user was as follows.
    Access - None
    Member - @IDES("Accounts"),@IDES("Scenarios"),@IDES("Versions"),@IDES("ABCGroup")
    I want the user to have access to the Cost Center (Branch) L103. So I added the following.
    Access - Read
    Member - "Final","Draft 1","L103","Budget","Actual","Final Forecast",@IDES("Input Assumptions"),@IDES("Balance Sheet"), @IDES("Profit and Loss Account"),@IDES("Financials Ratio"),@IDES("Report Assumptions")
    This used to work, but for somewhat reason, it doesn't. The story is the same for all users. When i log in as a user and try to view a report, i get the "Database Login" - No data available error.
    Pls help.

  • New "user" created at every login - settings and files lost

    Hi there,
    I've recently replaced a faulty hard disk, re-installed all applications and restored files from backup. I'm using OS X 10.4.11 and an iBook G4.
    Ever since, every time I login, the computer creates a new user and hence my settings and files are not available.
    My user is called e.g."Jack & Jill", but it creates a new user called "iBook" and moves my "Jack & Jill" user to Macintosh HD > Users.
    I can access everything by finding the old "Jack & Jill" user, but it stuffs up using applications because all the settings are under the Library for "Jack & Jill".
    I have tried copying all the files and settings to the "iBook" user, but when I login next time it creates a new "iBook" user, and re-names the previous one "iBook 1" and moves it to the Macintosh HD > Users directory.
    Upshot is every time I login, it's a major hassle to find all my files and get all the settings right.
    Has anyone heard of this problem before and can recommend a solution?
    Cheers,
    Tertullian

    Hi Tertullian, I've seen this, it usually happens when a users name is renamed, whether you did it or it was a spontaneous event...
    Return to default desktop, apparent "loss" of home directory, (it can happen spontaneously too)...
    http://docs.info.apple.com/article.html?artnum=107854
    Have you tried making a new Admin user & see if that one holds between reboots?

  • New User creating through Exchange Admin Center -"Exception has been thrown by the target of an invocation"

    facing problem in creating new user through EAC. through shell its ok. but when i tried through EAC it stuck selecting OU with error
    "Exception has been thrown by the target of an invocation".. i have multiple child doman user scenario .. 
    its stucks at screen shot 2- and keep on prompting please wait ... 
    help will be appreciated.

    Why would you go for nested OU inside the default OUs? ;-)
    i have more then 1 domain controllers and sites .. it was done to implement different policies on different DCs .. and to standardize the things in better way 
    Are you saying that you had an empty OU in the root domain, which caused the error?
    no the error way bcos of my domain controllers were in nested OU .. i move them to root OU .. at the same time i remove
    empty OU in my domain (it was for test purpose etc.). not sure if the empty OU were also causing problem .. but for sure it were nested OU under "domain controllers OU" ... 

  • Calendar Free/Busy permissions being ignored for users migrated from Exchange 2003, fine for new users created on Exchange 2010

    I have uncovered a situation where it seems the free/busy permissions are being ignored for users that were migrated from Exchange 2003 to Exchange 2010.
    I have the default permissions set to only show Free/Busy Time, not Details.  However if I look at the calendar for a users who was migrated from the old Exchange 2003 server, I can see details.  If I look
    at a newer user who was added directly to the Exchange 2010 server, I (correctly) only see the times and "Free" or "Busy", not the specific details.
    I verified the permissions on the migrated mailboxes many different ways (Exfolders, cmdlets, etc) and all signs point to only allow showing Free/Busy Times, but alas, I can still see the Details as well.
    My users are using Outlook 2010.

    Hi,
    Does this issue occur on Outlook only or both Outlook and OWA?
    Since you have double checked the permissions via multiple methods, it seems there is nothing problem on permission. Please make sure the migration from Exchange 2003 server completed successfully.
    If in OWA everything goes well (cannot see details), it should be an issue on the Outlook client side.
    I suggest run Outlook under safe mode to avoid some AVs and add-ins.
    I suggest re-create profile to refresh the caches.
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • Need SMTP_ADDRESS Mandatory on New User Create/User Maintenance

    Is there a way to require entry of email address upon new user creation or user maintenance without an ABAP enhancement?
    It appears that function module ADDR_PERS_COMP_COMM_MAINTAIN writes email address to database for users, but before I try to enhance the code, I'd like to see if this is a change that can be made without code modifications.
    Use of report RSADRCK7 is not feasible; users would need to be done one at a time.
    This requirement would apply only to functions (SU01) by BASIS/Security; users must remain unable to maintain their email address via System>UserProfile>Own Data.

    > enhancement inserted for SU01, screen 0900, to error when SZA5_D0700-SMTP_ADDR is initial, in SAPLSZA5, form D0700_OK_CODE.
    If that does not work, then the easiest option is a check after the user creation to verify that all users who are meant to have an SMTP entry in the address data, also have one (from the correct domain, etc...).
    Alternately, you can create a standard transaction variant for SU01 and change the screen of the address data tab. When saving (or proceeding to the next screen), the address data must have been maintained.
    The first option is certainly much easier and less intrusive to implement...
    Do you also use self-registration scenarios? Is that the reason for your question?
    Cheers,
    Julius

  • New users created in APEX can't login to new App

    I've imported an APEX application that I created with the downloaded version of APEX (2.1.0.00.39), into apex.oracle.com. I tried to create a new user for the application. With a NULL default schema (meaning it should have access to any schema), no user I seem to create though is able to log in to the application. It says invalid credentials.
    When I create a new user, does that user go through some sort of validation process by Oracle and isn't valid until Oracle does it's magic tap on the newly created user?

    Hi Tyler,
    As you have created application users (as opposed to database users) is your application using "application authentication" or is it using "database authentication"?
    You can check which one is current on the application's "Shared Components >> Authentication Schemes" and change it if required.
    Regards,
    Mike

  • Db trigger that fires when new user created?

    I need to set up a trigger so that whenever a new user is created in our application, user info should be inserted into an application table.
    So I assumed that a trigger on CREATE DDL event will do the trick. But when I looked up trigger syntax, it asks me the schema name on which I want to define the trigger.
    Is it possible to do it at all?

    create or replace trigger create_user_trigger
      after create on database
    begin
      if ora_dict_obj_type = 'USER' then
        -- action
      end if;
    end;
    /

  • SharePoint 2010 User Integration with Exchange 2010 New Users Created as Hidden and Later Unhidden not receiving email from SharePoint

    When we have a new employee transfer to us from another department, their email is created and hidden until they actually make the transfer so they don't have two different email addresses in our global address list.  When the transfer is made, the
    email address is unhidden, but then we are unable to send emails to them from sharepoint 2010 without doing an IISReset.  We are using Exchange 2010.  Does anyone have suggestions on how to alleviate this issue?

    Hi,
    I have done a test, no matter the email address is hidden or not, we can both send email to the email address in the same domain.
    How was the new employee from another department transferred to your department?
    Whether sending emails to them need do an IIS Reset everytime.
    Here is a similar post, you can take a look at:
    https://social.technet.microsoft.com/forums/sharepoint/en-US/6a9043bb-2055-46a9-8e76-8b2698c1dbe5/user-not-receiving-sharepoint-emails
    Best Regards,
    Lisa Chen

  • Custom code after creating a new user via CUA

    Hi experts!
    In our landscape we are using CUA for adding users in CRM 7.0. A new requirement is to adjust some default Web UI related settings for every new user created. There is no standard customizing setting for that, but it is possible to programmatically set prsonal settings using cl_pers_admin class' set_data method.
    The question is if there is any BADI or User Exit for user creation procedure? If it is present, wouldn't it conflict with CUA routines? Many thanks in advance.

    No. Not the main Library folder. Make absolutely sure you are in the Home Library folder and not the main Library folder.
    Your Home Library folder is hidden in Lion. To get to it, in the Finder menu, select GO and hold the option key down. Select Library in the submenu. The Finder window will open in your Home Library. This is where your user prefs are stored.
    Once there, you will see the Preferences folder. Open it up, select all items within it and move them to the trash. You will need to restart in order for the new Finder preferences to be recreated.
    Once you restart, then you will be back to the default preferences to the system and all applications. And yes, it will affect all settings including your Dock, just as logging into a new user. You will have to reset everything there also.
    If you wish to do a selective method, instead of deleting all preferences, try deleting the one associated with your problem. Screen saver problems should be affected by the system preferences, so try deleting this:
    com.apple.systempreferences.plist
    com.apple.systempreferences.plist.lockfile
    Note that when you delete system file preferences, a restart will be required. For applications, just quit the application before trashing preference files.

  • How to create new user with more than one default folder

    hi
    A new user created in OCS has only one default folder(Inbox).
    I want to create new user with customized default folder.
    for example:
    a new user has more than one default folder(Inbox,Outbox,Draft,Dustbin...)
    And also I want to automaticly enable the functions:
    When sending messages, place a copy in Outbox
    Keep message drafts in Draft
    Move deleted messages to Dustbin
    who know that?
    thanks

    The same reason that Apple and 3rd Party vendors put multi-size templates in one file I expect. I am trying to construct an in-house standard template for use in our company, and it is easier to manage if there is only one file to send to people rather than many - both initially and for subsequent edits / updates to the template.
    Of course it would be possible to create several templates (one for each size). But since it is clear that templates can be combined, it appears sensible to do this - unless the doing of it is horridly complicated

Maybe you are looking for

  • ITunes Software on Drive, but only 20% of songs in ITunes

    I recently moved, what I thought, were my full iTunes folders and software from my c:drive to my external hard drive to free up space.  I then synced my iPod and lost all Playlists and only had a minimal amount of my songs transferred onto the iPod.

  • ETA for SQL Developer 2?

    I'm a little excited. Is there an ETA for SQL Developer 2? Is it soon? :-)

  • Third-party SIP Device (Basic) video calling

    Hi, I want video calling with third-part SIP device to register CUCM 8.6. But my sip phones rejecting video calls. (there is no problem, audio calling...) I'm doing the same process with elastix ip pbx smoothly. Help me !!

  • Where does Safari store cookies?

    I want to delete most (but not all) of my cookies. I know that I can do this through Preferences / Security, but it's a pain since the window showing the cookies is small and not re-sizable. It would be much easier to find the cookies directory and d

  • How to add a sound on some slides?

    How to add a sound on some slides? Not only one slide and not all the slideshow? Is it possible? It must be!