Java multiple instances and mutex

Hello,
i have for example 5 instances with different names (but the same application). If i start a new instance, i will prove if a instance with this name is already started.
in C# i can do this with mutex, but i don't find something in java?
For example i can set a lock on instances with this name?
Is the a chance in java?
I don't find anything with the search, maybe false keywords?
Thanks for answers
ph0e

I have a Application. This is started 5 times = 5 javaw processes = 5 threads with childthreads in the system.
So now i want to check, if i start a sixth javaw process, if this application with the threadname "blax" is already startet on the system.
     name = "blax";
mutex = new Mutex(false, name);
               if (mutex.WaitOne(0, true))
                    return false;
               else
                    return true;
this is a example in c#.
Hope now i described it better.

Similar Messages

  • Multiple instances and Apache 2.2

    I went thru the below livedoc to create multiple instances
    and then associate them with apache config..
    http://tinyurl.com/yzjpsl
    But the instances are all started but I have two problems.
    1. I cant find the CF administrator for all the sites
    2. I can go to each instance administrator page but not the
    main one and also apache does not resolve the VHosts.
    Thus if I type in the full domain for one of the instance
    sites then I get the page not found..
    SO assume my problem is with apache config since the instance
    sites are started and I can access them on the LAN.
    This is my changes I made to the config of apache..
    # JRun Settings
    LoadModule jrun_module
    "C:/JRun4/lib/wsconfig/1/mod_jrun22.so"
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ssl false
    JRunConfig Ignoresuffixmap false
    #JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/1/jrunserver.store"
    #JRunConfig Bootstrap 127.0.0.1:51020
    #JRunConfig Errorurl <optionally redirect to this URL on
    errors>
    #JRunConfig ProxyRetryInterval 600
    #JRunConfig ConnectTimeout 15
    #JRunConfig RecvTimeout 300
    #JRunConfig SendTimeout 15
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr
    .cfswf
    </IfModule>
    # Use name-based virtual hosting.
    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/Apache2/htdocs/nathess"
    ServerName www.nathess.com
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/1/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51000
    </IfModule>
    </VirtualHost>
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/Apache2/htdocs/mgel"
    ServerName www.mariannegel.com
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/MGel/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51002
    </IfModule>
    </VirtualHost>
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/Apache2/htdocs/destinationcdg"
    ServerName www.destinationcdg.com
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/DestinationCDG/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51003
    </IfModule>
    </VirtualHost>
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/Apache2/htdocs/mls"
    ServerName www.multilingit.com
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/MLS/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51004
    </IfModule>
    </VirtualHost>

    I went thru the below livedoc to create multiple instances
    and then associate them with apache config..
    http://tinyurl.com/yzjpsl
    But the instances are all started but I have two problems.
    1. I cant find the CF administrator for all the sites
    2. I can go to each instance administrator page but not the
    main one and also apache does not resolve the VHosts.
    Thus if I type in the full domain for one of the instance
    sites then I get the page not found..
    SO assume my problem is with apache config since the instance
    sites are started and I can access them on the LAN.
    This is my changes I made to the config of apache..
    # JRun Settings
    LoadModule jrun_module
    "C:/JRun4/lib/wsconfig/1/mod_jrun22.so"
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ssl false
    JRunConfig Ignoresuffixmap false
    #JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/1/jrunserver.store"
    #JRunConfig Bootstrap 127.0.0.1:51020
    #JRunConfig Errorurl <optionally redirect to this URL on
    errors>
    #JRunConfig ProxyRetryInterval 600
    #JRunConfig ConnectTimeout 15
    #JRunConfig RecvTimeout 300
    #JRunConfig SendTimeout 15
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr
    .cfswf
    </IfModule>
    # Use name-based virtual hosting.
    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/Apache2/htdocs/nathess"
    ServerName www.nathess.com
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/1/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51000
    </IfModule>
    </VirtualHost>
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/Apache2/htdocs/mgel"
    ServerName www.mariannegel.com
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/MGel/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51002
    </IfModule>
    </VirtualHost>
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/Apache2/htdocs/destinationcdg"
    ServerName www.destinationcdg.com
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/DestinationCDG/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51003
    </IfModule>
    </VirtualHost>
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/Apache2/htdocs/mls"
    ServerName www.multilingit.com
    <IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Serverstore
    "C:/JRun4/lib/wsconfig/MLS/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51004
    </IfModule>
    </VirtualHost>

  • Multiple instances and mail config

    Maybe I dont understand the right concept of multiple
    instances but what I did was the following:
    Setup up an instance for each domain I have running as a
    VHost on apache.
    What I was trying to accomplish is the failover of any one
    domain and also to use separate mail settings for each domain.
    But this is where I seem to have misunderstood the concept of
    multiple instances, is it not possible to use a different smtp
    server for each domain? When my forms for each domain generates an
    email I want the email to originate from that domain not the main
    one setup in CF...
    Thanks

    Your on the right track.
    Set up say 4 websites (virtual hosts) eg www.mydomain1.com,
    www.mydomain2.com etc
    Set up 4 cf instances if you have 4 domains, maybe call them
    mydomain1, mydomain2 etc
    Using the Web Server configuration tool, config the cf
    instance mydomain1 to virtual host mydomain1, cf instance mydomain2
    to VH mydomain2 etc
    The website should now be working using their own Cf
    instances.
    Go into the CF Admin, scroll to the bottom of the left menu
    and you should see Instance Manager
    Clicking on this should either reveal the 4 cf instances or
    you may have to add them (should be a button)
    Once you see all 4, you should be able to click on the admin
    for each individual instance and change the smtp server as
    appropriate.
    This won't give you failover though, if a CF instance goes
    down, that site is gone. Clustering is the way to give failover and
    you can achieve this fairly easily.
    Expanding on the above example, you would create 8 CF
    instances eg mydomain1-1 mydomain1-2, mydomain2-1 mydomain2-2.
    Create 4 clusters eg mydomain1cluster, mydomain2cluster etc
    In the CF Administrator Add mydomain1-1, mydomain1-2
    instances to mydomain1cluster etc
    Using the Web Server configuration tool, config the cluster
    mydomain1cluster to virtual host mydomain1 etc
    each domain should now be using 2 cf instances, you will be
    able to down on of those instances the the site will continue
    working.
    Back in the instance manager under CF Admin, you should now
    have 8 instances - config mydomain1-1, mydomain1-2 to the
    appropriate smtp server etc
    The above is for CF MX 6 onwards too, not sure about previous
    versions.
    I think thats what your after? I've skimmed over some parts
    above in relation to the clustering, but there's a handy doc
    floating around on the web by Herrlich & Ramuschkat that will
    guide you through it.
    BTW, those instances can sit on multiple physical servers for
    hardware redundancy. Depending on how many domains you have and the
    power of your machines, this is a preferred way to go although
    expensive due to multiple CF licences

  • Multiple Instances and schemas to One

    Hi,
      Good Morning to all gurus.
    Using Oracle Version 11.2.0.2
    We have a database With 4 instances and Each Instance will be having 10 to 15 schemas Based on Countries. Here in all schemas we will be having Huge data's (count may be 3 to 5 crores for some 10 tables)
    Now am keen to Know If i change the above to a single instance and Single Schema(Common for all countries) What Pros and cons Will be there (Technical).
    Any Links or Answers are highly appreciated.
    HOPE GURUS Here can help me study and understand the above scenarios.
    Regards,
    Simma....

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2246908001297
    cons: 
    o harder to manage
    o harder to upgrade
    o harder to patch
    o harder to maintain
    o causes your shared pool size to increase 1,000 times (shared sql goes down the tubes)
    o takes more space
    o queries against the dictionary will be impacted
    o latching on the shared pool goes WAY up (latching = locks = serialization device =
    slows you down)
    pros:
    o none that I can think of.
    https://forums.oracle.com/thread/1032030
    Seperate schemas have advantages with security, privacy, seperation of duties, and change control. Seperate schemas also have the advantage of logical granularity / grouping for easier management, upgrade, decommission, scalability, hardware or software migration.
    Yes, you can develop applications faster if you don't have to think about security, scalability etc, but it will come back to haunt you later.
    RobertGeier
    AND
    Separate schemas have the disadvantage of requiring additonal grants and privileges to support the reference of non-owned objects used in stored code and to support FK definitions across tables owned by different users.
    Naming standards and system codes can be used to identify and segregate objects defined under one schema.
    The use of solid naming standards with a well chosen group of owners (schemas) would likely be a good compromise. The choice really depends on how large the applicaiton is going to be object wise and how integrated the objects are going to be. The more integration the less separate owners is beneficial.
    IMHO -- Mark D Powell --

  • Installing multiple Instance and System Copy

    Hello All,
    In our customer landscape,we have a DEV Server and PRD server. Now the customer wants to install one more instance for Quality in the same DEV Server and then perform a system copy of PRD Server.(to make it 3 system landscape)
    How to perform this and what all the things to be considered before performing the same...?
    Kindly suggest.
    Thank You,
    Regards,
    Hasan

    It will install separate instance and same support pack level will come.
    You can see this video
    [System Copy and Migration]
    How to Perform a System Copy Export
    How to Perform a System Copy Import

  • Java multiple instance

    Hi ,
    How to avoid running of multiple instanses of a Java program . That is , suppose i have a java program,
    test.java running under Unix platform . What i want is that ,
    if i again type java test and try to execute it ,
    the test.java program should not execute . That is , it checks whther any other instances are running or not . If it is running , the second instance should not run .
    Please help me out .

    In a RMI context I looked up at a specific port wether a prior instance of the application was running, and then simply passed the command line over to the running MDI (multiple document interface) instance.
    // In main
    The code is something like:
    MyApp app = (MyApp)java.rmi.Naming.lookup("myeditor");
    if (app == null) {
         app = new MyApp();
    app.runSDI(args);
    // In constructor
    java.rmi.Naming.rebind("myeditor", this);Or something like that.

  • Extending Outlook 2013 to multiple instances and profiles under the same user

    Hello,
    I understand that Outlook 2013 will only run one profile under a logged in user account. can i use Outlook Primary Interop Assembly
    to add that ability to outlook 2013 ?
    Regards

    Hello,
    Only one instance of Outlook can be run. You can choose the profile programmatically using the
    Logon method of the Namespace class. Here is what MSDN states:
    Use the Logon method only to log on to a specific profile when Outlook is not already running. This is because only one Outlook process can run at a time,
    and that Outlook process uses only one profile and supports only one MAPI session. When users start Outlook a second time, that instance of Outlook runs within the same Outlook process, does not create a new process, and uses the same profile.
    If Outlook is already running, using this method does not create a new Outlook session or change the current profile to a different one.
    You may find the
    How to automate Outlook from another program article helpful.

  • Multiple instances and listener/connect problem

    Hi All
    I Installed Oracle 8.0.5 on Redhat 6.2 , successfully. but I
    have a problem Could any one please help me? Here i describe my
    problem, please read patiently.
    I am running three instances (t1,t2,t3). ( i started this
    instances by logging in as 3 diferent users t1,t2,t3). and I
    have included all this instances in the listener.ora properly.
    now i start the listenr using LSNRCTL start, listener says 3
    service handlers t1,t2,t3. ( all the t1,t2,t3 instances are up
    and running i cheked using v$instance view by logging in as sys
    as sysdba at svrmgrl)
    now when i access t2 from the oracle client such as sqlplus
    from a client machine, i get an error ORA-01034 Oracle Not
    Avialable. this error i am getting only when i try to connect to
    t2 and t3 instances. but when i connect to t1 the connection is
    successful, one thing i observed here is i started the listener
    from the login session of t1, so i stopped the listener and
    started it again as the t2 user, now some thing strange ,
    connection to t2 is successfull but t1 and t2 are giveing the
    same error ORA-01034 Oracle not avialble. in the same way for
    team3.
    so if i start the listener from the same login session where
    the instance is running ONLY that instance is accessible.
    Could U please help me if any one has idea about this
    situation.
    Thanks in advance.

    The listener.ora configures the server. You should configure your
    clients using tnsnames.ora. You could use a unified tnsnames.ora
    by pointing the TNS_ADMIN to the same location.

  • Multiple Server Instances and Schedulers

    Hi,
    I am facing a huge problem with the schedulers.
    I have multiple system ID's in my SAP portal.
    Suppose i create a JAVA scheduler and export it (as PAR) in the portal, it shows up in the scheduler tasks but while scheduling it the problem is with the System ID. I have 9 instances of them. Rest of my schedulers runs on a particuler System ID but this one is not running there, insted when i checked i found its running over a different System ID.
    I am completely unaware of this concept. Can anyone please explain or post any link regarding the same so that i can get an insight of the same.
    Thanks in Advance.

    Thanks Tushar,
    I am not able to figure out on which system instance should I schedule my scheduler.
    Previously I use to schedule it over a particular instance and it worked fine. But yesterday when I did the same it didn't worked, so i checked all the System ID's and found that it is working on two System ID's rathe than the one I used to normally schedule. So i am lost as to where should I schedule it in future for any other schedulers.
    I am not able to figure out the concept of this multiple instance and its use. If you can refer to any document that might will be of great help to me.
    Thanks and Regads,
    Kunal.

  • Multiple users and shopping carts, one searchable index?

    Hi all,
    I've got an idea but I would like to know if it possible with Business Catalyst. I'll try and explain as simply as possible:
    I have multiple users (let's say 10). They all need separate shopping carts as they are all selling different products. They all need their own admin areas that keep track of their incomes, workflows, shopping carts, etc. They are essentially 10 independent users. Will the WebCommerce10 plan satisfy their needs, or will 10 separate WebCommerce single plans need to be sold?
    Taking the above into account, is there anyway to have 10 independent shopping carts, but they can all be searchable simultaneously? e.g. think eBay, lots of users with their own independent admin areas and products, but one search field returning many results from all the user's shopping carts? Is there anyway to achieve something like this with BC? Can subdomains do this? Any other ideas how to achieve this if none of the above is possible?
    My plan B is having a landing page where a link for each of the 10 users will take them to their relevant shopping carts, but this experience isn't quite as integrated as I would like, from a web surfer's point of view.
    Thanks.
    Clint,
    Komma Media

    Hi Robbie,
    Yes, this would require significant modification to the shopping cart functionality. As it is now, it's very dependent the ShoppingCart being associated with the session and therefore the user. To change that would be significant work.
    Additionally, if you had two people logging in to the same account and editing the same order around the same time, this would tend to not to work well. This is because two users would be two sessions and they would often get routed to different app server instances. Because the way orders are managed, there's no way to immediately sync up the changes between multiple instances, and if you managed to do it would likely slow things down drastically. I would not recommend trying this with ATG.
    Thanks.
    Nick Glover
    Oracle Support for ATG Products

  • Question about SSO (for Java Dialog instance) for Portal EP 6.0 SP 20

    Hi All
    I have following question.
    We are running Portal 6.0 SP 20. We have JAVA (Portal) CI+DB running on single host SAPQP1 and Two JAVA Dialog Instances (J2EE Application servers) running on separate host namely SAPAP35 and SAPAP36.
    I was able to configure SSO between SAPQP1 (CI+DB) and ECC R/3 system (QC1). SSO is working fine. Users can access all ESS/MSS data in portal when they use Portal URL running on SAPQP1 (http://sapqp1.xxxxx.com:50000/irj).
    But when users try to access ESS/MSS data via portal (URL) running on SAPQP35 (http://sapap35.xxxxx.com:50000/irj) and SAPAP36 ((http://sapap36.xxxxx.com:50000/irj) SSO does not work, i.e it system asks user id and password.
    So , how I can configure SSO between SAPAP35 and SAPAP36 JAVA Dialog instances and ECC R/3?

    Hi Sandip,
    obviously you already configured QC1 to accept Tickets issued by the Java Engine on SAPQP1. Did you imported the public (java) certificates from SAPAP35 and SAPAP36 into your ECC System? The certicficates need to be added in client 000 to your System PSE and in your production client to your ACL.
    Regards,
    Enno

  • List of instance and databases

    My sql server contains multiple instances and each instance contains multiple databases.
    Now how to list of all the instances and their corresponding databases?
    i used select * from sys.servers for instances and sys.databases for number of databases.
    But how to list of all the instances and databases using single query?

    Hi
    List all Instances
    option 1: Pwershell
    Get-Service | Where-Object {$_.Name -like 'MSSQL$*'}
    Option 2:  query this registry
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server.....
    Option 3: go to regitry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names
    * Here you can find other option like OLTP and not just SQL
    Option 4: RUN -> services.msc
    Find all services named "SQL Server". The instance name is in the brakets
    Option 5: Open sql server configuration manager -> SQL Server Services
    There are more options if you need :-)
    [Personal Site] [Blog] [Facebook]

  • Conky - multiple instances, eating up CPU like candy

    I run a desktop composed of xmonad, dzen2, and conky. I recently modified my conky config, and whereas previously my cpu monitor showed 0% at idle, it now shows 14% at idle. I checked htop and found that the top processes for cpu% were three instances of conky. Can anyone explain why there are multiple conkys spawned, even though my xmonad.hs file only specifies one? And which line in my conky config is taking up so much processing power?
    Here is my conkrc:
    out_to_x no
    background yes
    out_to_console yes
    update_interval 0.7
    short_units yes
    TEXT
    {${time %a %b %d %Y} - ${time %H:%M:%S}} \
    | ${scroll 12 6 $moc_artist - $moc_song} | \
    [RAM: $memperc%] \
    [CPU: $cpu%] \
    [disk I/O: ${diskio /dev/sda}] \
    [HDD: ${fs_used /}/${fs_free /} (${fs_used_perc /}%)] \
    ${if_existing /proc/net/route wlp3s0} [network: ${wireless_essid wlp3s0} (${wireless_link_qual_perc wlp3s0}%)] $else [network: -- ]$endif \
    ${if_existing /sys/class/power_supply/BAT1} [battery: ${battery_percent BAT1}%] $else [battery: -- ]$endif
    my previous config was more or less the same, except that it was all on one line and it didn't have the fancy decision-making stuff thrown in. It also did not have the lovely scrolling bit for the currently playing song.
    EDIT:
    That lovely scrolling bit was the culprit. Removed it. Maybe I'll put it back when I get a machine with a bigger processor. I'm all about minimizing the system's use of resources, so it might not make it back into the config, even with a better processor.
    Conky is still spawning multiple instances, and I can't for the life of me figure out why.
    Last edited by ParanoidAndroid (2013-05-15 18:56:12)

    Yes it does. And it appears that other things, such as pulseaudio --start, dbus, and a dozen other processes are running duplicates with different pids. I'm checking with atop to see if htop is to blame, but I don't think it's the program.

  • Single SOA Suite Install with multiple oc4j instances and java processes

    We right now have 5 BPEL processes and 5 ESB processes all running under one java.exe process. We would like to seperate some of
    them out into their own java.exe processes without having to install more
    %ORACLE_HOME% instances of SOA Suite. I can create an oc4j instance but of
    course it doesn't have any SOA Suite stuff deployed to it. I tried to see what
    the install would do with this new oc4j instance but it wants to create a new
    %ORACLE_HOME% with an entire installation of SOA Suite.
    Is there some sort of way to clone oc4j instances that have SOA Suite deployed to them so that you
    don't need multiple %ORACLE_HOME% instances?
    ### How is this Issue Impacting Your Business ###
    We really don't want to have a lot of %ORACLE_HOME% instances to have to maintain. We are
    migrating projects over from our current integration server product and we'll
    have potentially dozens more BPEL and ESB projects. We definitely want to
    group and isolate projects so that outages of one project do not bring down
    others that are unrelated.
    We are currently experiencing periodic problems with one BPEL project that requires recycling but all the other BPEL and ESB
    projects get recycled also. If we could put this project into it's own java
    process without creating another SOA SUITE instance, it would be a big
    help.
    ANSWER
    =======
    You can create multiple domains in BPEL or create multiple systems/groups in ESB to group different projects.
    MY REPLY:
    =========
    We have been using systems/groups in ESB but they all run under the save java.exe process. I would assume that having a seperate domain in BPEL would also run in that same java.exe process.
    Right now, the one BPEL project we have a problem with will gobble up all the JDBC connections from time to time and that requires a recycle of SOA Suite, which means all BPEL and ESB projects that run in that java.exe process get recycled also. We're working that issue in a different ticket.
    It would be nice if the SOA Suite installation would install against a new oc4j instance and not assume it has to create a complete %ORACLE_HOME% instance. The components of SOA Suite seem to be J2EE based components.
    Scenario: I already have an oc4j instance called oc4j_soa and a complete %ORACLE_HOME% installation of soa suite. I then create a new oc4j instance from Enterprise Manager. Then I would deploy the esb-dt, esb-rt, orabpel, etc. components of SOA Suite to that new oc4j instance and modify the necessary config file so that it can work with OHS and the SOA Suite Databases. Is this possible?
    Does anyone have any experience with this or do people typically install multiple complete installation of SOA Suite with mulitple Oracle Homes?

    Hi,
    yes, on metalink you get in touch with real experts....
    You have to install serveral application servers to get different ORACLE_HOMEs.
    For each one, you can install a BPEL PM.
    But: For each BPEL PM you need your own database instance, or you have to configure them as a clustered BPEL installation.... (but i do not know if this work with non RAC DBs)

  • How to reference multiple instances of the same Java object from PL/SQL?

    Dear all,
    I'm experimenting with calling Java from PL/SQL.
    My simple attempts work, which is calling public static [java] methods through PL/SQL wrappers from SQL (and PL/SQL). (See my example code below).
    However it is the limitation of the public static methods that puzzels me.
    I would like to do the following:
    - from PL/SQL (in essence it needs to become a forms app) create one or more objects in the java realm
    - from PL/SQL alter properties of a java object
    - from PL/SQL call methods on a java object
    However I fail to see how I can create multiple instances of an object and reference one particular object in the java realm through public static methods.
    My current solution is the singleton pattern: of said java object I have only 1 copy, so I do not need to know a reference to it.
    I can just assume that there will only ever be 1 of said object.
    But I should be able to make more then 1 instance of an object.
    To make it more specific:
    - suppose I have the object car in the java realm
    - from PL/SQL I want to create a car in the java realm
    - from PL/SQL I need to give it license plates
    - I need to start the engine of a scpecific car
    However if I want more then 1 car then I need to be able to refrence them. How is this done?
    Somehow I need to be able to execute the following in PL/SQL:
    DECLARE
    vMyCar_Porsche CAR;
    vMyCar_Fiat CAR;
    BEGIN
    vMyCar_Porsche = new CAR();
    vMyCar_Fiat = new CAR();
    vMyCar_Porsche.setLicensePlates('FAST');
    vMyCar_Porsche.startEngine();
    vMyCar_Fiat.killEngine();
    END;
    Thanks in advance.
    Best Regards,
    Ruben
    My current example code is the following:
    JAVA:
    ===
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED CODAROUL."RMG/BO/RMG_OBJECT" as package RMG.BO;
    public class RMG_OBJECT {
    private static RMG_OBJECT instance = new RMGOBJECT();
    private String rmgObjectNaam;
    private RMG_OBJECT(){
    this.rmgObjectNaam = "NonDetermined";
    public static String GET_RMGOBJECT_NAAM () {
    String toestand = null;
    if (_instance == null) {toestand = "DOES NOT EXIST";} else { toestand = "EXISTS";};
    System.out.println("instance : " + toestand);
    System.out.println("object name is : " + _instance.rmgObjectNaam);
    return _instance.rmgObjectNaam;
    public static Integer SET_RMGOBJECT_NAAM (String IN)
    try
    _instance.rmgObjectNaam = IN;
    return 1;
    catch (Exception e)//catch
    System.out.println("Other Exception: " + e.toString());
    e.printStackTrace();
    return 5;
    } //catch
    PL/SQL Wrapper:
    ==========
    CREATE OR REPLACE FUNCTION CODAROUL.SET_RMGOBJECT_NAAM(NAAM IN VARCHAR2) return NUMBER AS
    LANGUAGE JAVA NAME 'RMG.BO.RMG_OBJECT.SET_RMGOBJECT_NAAM (java.lang.String) return java.lang.Integer';
    Calling from SQL:
    ==========
    CALL dbms_java.set_output(2000);
    select CODAROUL.GET_RMGOBJECT_NAAM() from dual;
    Edited by: RubenS_BE on Apr 6, 2012 5:35 AM
    Edited by: 925945 on Apr 6, 2012 5:41 AM

    You can do this by manually creating a new iterator binding in your binding tab.
    So instead of dragging the VO directly to the page, go to the binding tab, add a new executable iterator binding, and point to that one from your ELs in the page itself.

Maybe you are looking for

  • Help with my MBP (Late-2011) battery life~

    Hi All, I just bought this MBP like 2 weeks ago & I found that the battery life is a little short. Only lasted 3.5-4 hours. In saying that, I'm not doing anything extreme. Only browsing the web and doing some homework on Words & Excel. If I happened

  • Best way to create a multi-step validation process

    I am writing a multi step validation process and I was wondering what is the best method to have it operate on the value.  What I have: As a custom validation script, in that order: 1- Calls a function that looks if the value is part of a particular

  • Remote management audit log file

    I've read the documentation @ http://www.novell.com/documentation/...a/ad4zt4x.html which indicates that the audit file is auditlog.txt and is located in the system directory of the managed workstation. The problem is I can't find the log file in tha

  • Asynchronous restart

    Hi, we have an asynchronous interface from ECC to PI and then, through a BPM,  synchronous messages are sent from PI to External system. The problem we have is that if PI is closed, we gather many messages in ECC and when PI is restarted , many messa

  • Suggestion for pH adjustment alogrithm

    Hi, here is my code for judging pH and adjusting pH value using state machine. I only finished the cases when pH >7.5, I havent done the cases for pH<7.5. I understand its very akward because it lacks of real control alogrithm; But I really dont know