Running the same application in different database table- giving error:

Hi All,
I m new to JSF, spring and Hibernate web application. I have done a web project using JSF, Hibernate and Spring. We have to maintain the Data records which is stored in mysql db. Now there are different table is there such as example Employee Details and Company Details. So we created two seperate application o tomacat, For both Application we use same functionality except the JSP FILE Name and table name (Which is changed according to Application).
In the employee.hbm.xml
I changed the table name according to application. Two table (Company Details & Employee Details)...
Now while running the application on the tomcat server, only one application is running at a time. if we start running the Employee Application, then Company Application is giving the below error,
Error in Log:
The resourse is already in used/busy.
Interesting thing is only one Application is running at a time and other is in stop status.
Could you please help us, how to overcome the error,
Is it not possible to run both the application on different browsers.
In logs the below error is showing:
java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted.
Could you please give some idea to sort out the below issue.
Thanks in advance.

Yes, I've changed the DynamicJDBCBindingFilter Class in this way:
method doFiletr
String usrName = request.getParameter(USERNAME_PARAM);
String pswd = request.getParameter(PASSWORD_PARAM);
String URL = request.getParameter(URL_PARAM);
session.setAttribute(Configuration.DB_USERNAME_PROPERTY, usrName);
session.setAttribute(Configuration.DB_PASSWORD_PROPERTY, pswd);
session.setAttribute(Configuration.DB_CONNECT_STRING_PROPERTY,URL);//
This is for retrieve the JDBC URL from the login page
Then i've modified the DynamicJDBCEnvInfoProvider to accept this new parameter
if(mJDBCURL!=null)
((Hashtable) connEnvironment).put(Configuration.DB_CONNECT_STRING_PROPERTY,mJDBCURL);
Finally i modifed the DynamicJDBCSessionCookieFactory
tho put this new parameter in DynamicJDBCEnvInfoProvider class
EnvInfoProvider provider = new DynamicJDBCEnvInfoProvider(
(String)session.getAttribute(Configuration.DB_USERNAME_PROPERTY),
(String)session.getAttribute(Configuration.DB_PASSWORD_PROPERTY),
(String)session.getAttribute[b](Configuration.DB_CONNECT_STRING_PROPERTY));
cookie.setEnvInfoProvider(provider);
But when I test the application it doesn't works.
With the correct parameter the login fails.
I'm not using a DB on my local machine, but one on another machine which has not the Dept table.
thanks for help

Similar Messages

  • Need to run the same query on different databases with the same argument

    Hi folks,
    I've a script: obj, which has simple stuff, when I execute @obj
    this asked me for the object_name
    and in return gives me object/s if it exists in this (connected) db.
    Now to check in 2 other dbs, I've to disconnect from here and then connect to those dbs and run the same @obj there and give the same argument, e.g., EMP and it'll return the answer.
    What is desired ... if not very hard on you :-(
    Some thing like @objAll
    asked only once object_name ... e.g., I gave EMP
    now go to all the 3 dbs and give me the result in ONE spool file only.
    What do you think, is this tough, I did something, but it was not involved connecting to different dbs, within the same script, but here we cannot create db links and have to disconnect and connect to the db to get some information.
    Please do reply, if my question is not understandable or any ...
    Thanks in advance.
    Best regards.
    Edited by: user8604530 on Jun 27, 2012 1:51 PM

    As far as i understand from your question : you cannot create db links ? right..
    well another option is to create a shell script , something like this :
    vi check.sh
    export ORACLE_SID=db1
    sqlplus / as sysdba <<EOF
    select query comes here;
    exit;
    EOF
    export ORACLE_SID=db2
    sqlplus / as sysdba <<EOF
    select query comes here;
    exit;
    EOFchmod 777 check.sh
    This does the job for you.. I am unsure how to pass the parameters in sql while running through a sheel script.. but if thats possible you will be able to achieve what you want.
    Regards
    Kk
    Edited by: Kk on Jun 27, 2012 2:44 PM

  • 1 app, 3 devices, 1 iCloud - how can I run the same game on different devices?

    My wife and I share one iTunes account and one iCloud account for 2 iPhone 5's and an iPad.  Our home laptop is a PC running windows 7.  We are not able to both play the same game (specifically Carcassone) at the same time on different devices which is frustrating, how can I make this happen?  Do I need two separate accounts?  Can I have two accounts with a PC?  We don't want to sacrifice the photostream to get it though.
    Thank you,
    Jacob

    Go to iTunea>Preferences>Devices and see if there is a backupright at the time you did the update. Then try restoring from that backup. If the apps are in your iTunes library, any app data will be restored to the iPod.
    When restoring from an iOS 4 (or later) backup, if the device had a passcode set, iTunes will ask if you want to set a passcode (and remind you that you had protected your device with a passcode). iTunes will not ask you to set a passcode when restoring from iOS 3.x and prior backups.
    Therefore, remembe the passcode that you enter this time.
    It appears that if you restore from a backup, that backup is not subseqyently overwritten by the next backup.

  • In OS X Mavericks, can I run the same application across two monitors?

    I'm an artist. I use programs like Photoshop across my iMac screen to my Wacom Cintiq screen all the time. It's vital for my workflow to have the same application running on both monitors. Art on the screen I draw on, menus, reference and what not on the monitor. Basically an extended desktop. I read in a few reviews when Mavericks was first released that Apple removed the extended desktop from the standard dual monitor set up. The only information I can find on this subject has to do with Airplay, which doesn't fit my situation at all. Before I upgrade to Mavericks, I need to know I'm not going to be crippling my workflow. There are a lot of features that I was looking forward to in Mavericks that could help me out a lot, but the big removal of my most used feature has kept me away for months. Any help I can get would be welcome. I appreciate it.

    I run dual 21.5" monitors and Extended Desktop Mode works fine in Mavericks.
    I don't use Photoshop, but Pixelmator and other App's with independent toolbars work great in both Windowed and Full Screen Modes.

  • Running the same query against numerous databases

    My organization has 20+ clients. Each client has a separate database in the same MSSQL server*. For these purposes, the databases are structurally identical. I've been tasked to gather information from tables in all of these databases. I can use the same query on multiple clients - my issue is switching between databases.
    The naive solution would be for me to declare 20+ DataSource instances, and have some mapping from client name to DataSource. I think that's going to be a real mess and my inclination is to avoid it.
    Another possibility would be dynamically generating the PreparedStatement based on the client, something like
    "SELECT foo, bar " + "FROM " + client.getDatabaseName() + ".dbo.my_table";
    My understanding, though, is that it's a bad practice to have dynamically generated prepared statement calls and not possible to parameterize the 'from' clause.
    Another thing I've been digging around at is using a transaction and an SQL Server call to alter what database calls from that transaction go to. I thought that could be done, but I'm not finding anything which suggests it's possible.
    I guess I've identified my problem, but I'm thrashing on how to solve it. I'm still newish to non-trivial database interactions, so I'd appreciate any input. If I posted this in the wrong place, please feel free to yell at me and move it.
    Thanks in advance,
    Eric
    * Not my fault. I'm new.

    I'm collection usage and storage metrics. "Client X has 200 records, Client Y has 250. Client X has 15 active users, Client Y has 12."
    The data is being read from the client databases and stored into a separate metrics database.
    I anticipate it will be mostly select count() calls.
    I can. For the maintenance reasons I mentioned above, I'd rather not have to maintain all those datasources if I don't have to.
    No, the invocations will be sequential.
    for (each metric type) {
        for (each client) {
            gather information;
            add to batch
        update batch in metrics database
    }I guess I was hoping there was a Sekrit SQL way to swap what database inside a server instance the connection was pointing to. I'm guessing that's not going to happen, and I'm left with N datasources for N clients or generated preparedStatements which swap out the database name in the FROM portion.
    The data is being written to a table in a single, separate metrics database.
    I'm trying not to, honest.
    Edited by: 919852 on Mar 12, 2012 8:38 AM

  • Display list of all phone Running the same application using wifi in c#

    someone help me  please
     I want list all the devices connected in my application usin wifi

    The closest can get is this thread
    http://stackoverflow.com/questions/2377426/how-to-scan-the-wireless-devices-which-exist-on-the-network/2396230#2396230
    To connect to wifi then you can use this:
    https://msdn.microsoft.com/library/windows/apps/dn297617
    chanmm
    chanmm

  • Running Multiple Same Applications

    Hello All. I was really wondering if OSX has the ability to run the same application at the same time. Example would be like Firefox, Safari, World Of War Craft ETC... I know on a PC I can run as many instances of the same app on my PC as I needed and would like to know if this is at all possible on a MAC. Very Much appreciated for any and all intel on this subject. Please Advise...

    Brian Postow wrote:
    nerowolfe wrote:
    If you right-click textedit.app, for example, one of the options is "Show Package Contents"
    This is a NEW feature in 10.5.3 IIRC. And a feature that I am very happy with.
    It came along with the first version of Leopard, 10.5.0
    http://www.appletell.com/apple/comment/show-package-contents-can-now-be-a-simple -keystroke/
    Remember that Leopard, like most of an iceberg, is below the surface. Knowing how to use the entirety of Leopard is important for some of us. It's fun and one never stops learning new things.
    I'm not disagreeing with any of that. I'm just wondering if there is documentation on opening the actual executable files. open is NOT a standard unix command. I believe it's a mac specific thing, it doesn't exist in BSD based Ultrix, SunOS or any other unix I've used. So Apple CAN decided how it gets used, and what it does, and the documentation would have to be Apple's.
    It may be Mac-specific. The man says it was introduced with NextStep.
    However, the ancient Unix command 'exec' is nearly identical and if you replace 'open' with 'exec' in my examples, you get the same result
    For example:
    exec /Applications/TextEdit.app/Contents/MacOS/TextEdit
    runs an instance of textedit just as does 'open'
    And I still want to know how applescript interacts with this feature. Because you usually just say "tell textedit.app ....." If there are two instances, which one gets the message? and where is this documented?
    AppleScript is a different animal. I don't think 'tell' is a BSD item.
    Also, my main point above was that your comment of "look at the man page" didn't actually answer my question.
    I suggested that as a way of understanding the command, 'open' not a general tutorial on how BSD supports multiple instances of programs internally.
    For example, one may not find a document describing exactly a very complex and complicated pipe command, but a good working knowledge of the OS is sufficient to create it. Same with shell programming. There are hundreds of book on dozens of programming languages, Ruby, PHP, built-in, to name a few. And there are dozens of shells. There is no one document to describe all of it.
    I go back to Kernighan and Pike and Richie days, when I ran Coherent at home on an old PC and used Unix on mainframe terminals where I was consulting.

  • Re: Running the same (Forte) application multiple times -for different

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • How to run the same procedure in parallel for different parameter value.

    Hi There,
    I am currently working on extracting data in to flat file and I am able to do so for one revenue month (e.g. 200101) using PL/SQL procedure(get_rev_data). it takes almost 1 hour to execute the procedure completely and it generates 400 MB data file. Now I have to run this procedure for last 10 yrs of data (i.e. 120 revenue months) . my prolem here is to figure out a way/logic in such a way that I can run the procedure in parallel for each revenue month and at the same time it will write the data in respective data file for each revenue month. so the final result of this exercise would be 120 flat files, one for each revenue month with file names like
    EXTRACT_00001001 to EXTRACT_00001120.
    where
    first five digits : 00001 will indicate the Extract run number and
    last three digits : 001 will indicate the thread number for each run.
    I am thinking of doing this by creating a table "RevMonth" with two values (revenue_month, thread_num) and calling the procedure in a simple select statement and passing revenue_month as parameter of the procedure like
    SELECT get_rev_data(revenue_month, thread_num)
    FROM REVMONTH;
    But I am not sure if that will do the needful. Any idea on how to achieve this will be of great help. Thank you.

    Hi Smit,
    Thanks for the advise. I am not planning to run for all 120 months at once. actually I am planning to run like 1 year (12 revenue months at a time). I am not sure if that will work well but I was planning to run this through shell script (Unix) and will call the same procedure with different parameter (revenue_month and Thread_number) values and see what happens. I hope that will run in parallel for each revenue month.
    Let me know if you have more knowledge about it. THanks a lot.
    Thanks,
    .

  • Running the same sql script in multiple databases

    Hello,
    What is the method to run the same sql script in multiple databases? I want to write a unix script that would select from different databases and run a sql/plsql script in those different databases. What are the ways to write such a unix script? Thank you in advance.

    Just have a parameter which takes in the oracle connection parameters and use it in your sqlplus script with your shell script.
    Your sqlplus script can have a procedure/function call or an anonymous block;
    Then have a wrapper script to call the original script with different connection parameters. Hope this helps.

  • How to use the same component in different applications

    Hi All,
    I need to use the same component in different applications. i.e In opportunity, Quotation & Promotion.
    The Search help view in the component PRD01QR should be used in all these components but with different search criteria.
    With help of the DO_determine_configuration, different view configurations are possible but Different search criteria is not possible.
    for Eg. search parameter without DDLB, F4 options in another components.
    How can I control the behavior of the search view in different applications with restricting the field properties?
    Is it possible to find out where and in which component these search_help_search component is used?

    Hi Harry,
    Is it possible to find out where and in which component these search_help_search component is used?
    ans: I am giving an Example for your question go through that u might get clear about this.
    Ex: BT115IT_SLSO  sales order component
    below screen they component usage using for populate the product search component.
    please let me know any help required .
    Regards,
    vishwa.

  • CAn I run Lion and snow leopard on the same computer with different sign-ins?

    CAn I run Lion and snow leopard on the same computer with different sign-ins?

    Alternatively, partition your internal HD and dual-boot it. Do note that you have to reboot to switch back and forth. You can't do it by logging out and back in.

  • How can I make different windows of the same application I have open remain on their respective desktops/spaces after reboot?

    Hi all,
    I use the same applications for work, entertainment and other personal activities, so it's impossible to simply assign different apps to different desktops/spaces. Thus, I have open windows of the same programs (Pages, TextEdit, Preview) arranged on several desktops. If I reboot my laptop, the windows are just crammed on Desktop 1. Can something be done about it?

    Barney,
    many thanks for your efforts and your time (preparing and posting the screenshot, answering to this question,...).
    Unfortunately, moving the focus to the next window only works with windows on the same desktop.
    btw, using a german keyboard layout and german language settings the shortcut is "cmd+<".
    I can switch with this shortcut between different windows of my Safari which reside on the same desktop, but I cannot swith between different safari windows distributed over several desktops.
    Thanks,
    equi    

  • How can I use the same session for different components acroos application ?

    I am trying to include the components(chat, filesharing, whitboard) in different parts of my application. User should be able to access any of the component. We would like to have a single "ConnectSessionContainer" so that we don't see same user creating a seperate session for each component.
    Is there a better way of dealing with this other than declaring the "ConnectSessionContainer" in the main application ? Is there a way to check if we have a "ConnectSessionContainer" session already established ? Please help . Thanks.

    Thanks for the response. Let me explain what I am trying to do..
    I am trying to create components at different places(screens) of the flex application (not in the same .mxml file).
    Each time I create a component, I am using a "AdobeHSAuthenticator" and "ConnectSessionContainer" which is resulting a new participant in the room.
    For example
    screen1.mxml -
    <mx:Panel>
    <rtc:AdobeHSAuthenticator id="auth" authenticationSuccess="onAuthSuccess(event);" authenticationFailure="onAuthFailure(event);" />
    <rtc:ConnectSessionContainer id="mySession" >
            <rtc:Roster id="myRoster" width="100%" height="100%" />
            <rtc:Chat id="mychat" width="100%" height="100%" />
    </rtc:ConnectSessionContainer>
    </mx:Panel>
    screen2.mxml (in the same application) -
    <mx:Panel>
    <rtc:AdobeHSAuthenticator id="auth" authenticationSuccess="onAuthSuccess(event);" authenticationFailure="onAuthFailure(event);" />
    <rtc:ConnectSessionContainer id="mySession" >
            <rtc:SharedWhiteBoard id="wb" width="100%" height="100%" />
    </rtc:ConnectSessionContainer>
    </mx:Panel>
    Here, I open a screen1 and authenticate as UserA and when I try to open screen2 flex is considering me as another user though I am in the same application.
    1) How can I use different components which are in different flex files as a same User ?
    2) Should I place my <rtc:AdobeHSAuthenticator> and <rtc:ConnectSessionContainer> in the main application which calls the screen.mxml?
    3) What is the best way to do it ?
    Thanks for your time !

  • OC4Js on different servers sharing the same application

    Does anyone have some suggestions to how I can get non-clustered mid-tier OC4Js to share the same application stored on a shared NFS mount?
    Right now, what I've done is created the OCJ4_Dev1 on mid1 and OC4J_Dev2 on mid2, then changed their server properties for application and application deployments to point to the shared NFS, but different directories.
    Is there some way they can use the same directory? I can think of a number of ways of doing this with links etc, but maybe has some better ideas? Basically, I want the same "source" for two different OC4Js, but without confusing the instance configurations.

    I think there are many options around this, but a simple way I managed it was to have 2 windows accounts,and each with a different iTunes library. I think you can now share multiple libraries on the one account, I'm sure there's an answer in the support pages here.

Maybe you are looking for

  • Loading songs 2 or 3 at a time

    My iPod will only load 2 or three songs at a time so I have to keep unplugging and replugging it back in to get them all loaded. It is taking FOREVER! My sister has a new second generation nano and the same thing happened to her last night! She has l

  • Apache Roller and OC4J

    Hi, Has anyone managed to successfully deploy Apache Roller on Oracle Application Server ? Thanks,

  • I18n fmt tags in jsp

    I have jsp's designed to support multi languages and for the purpose I am using the fmt tags in my code so in the jsp's I use <fmt:setBundle var="templatesbundle" basename="com.stem.templates"/>and then I try to access the message as follows <fmt:mes

  • Firefox setup file keeps coming up on screen

    whenever i open firefox the popup you have chosen to open FIREFOX SETUP 3.6.11.EXE which is a binary file from hhtp://ftp.halifax.rathaachen.de would you like to save this file? save or cancel. no matter what i do it just keeps coming back up on open

  • Word for Mac 2011 Opening all Docs/Crashing

    Hello, Today, after a restart of my MacBook Pro (Late 2013, Running Yosemite 10.10.1), Microsoft Word opens ALL recent documents to the point where it causes the program itself to error out and crash (though it does send a report to Microsoft). I hav