Can I use multiple coherence instances on one JVM?

Or can I explicitly designate a tangosol-coherence-override.xml to coherence? If I can, how to?
Thanks.
Edited by: user8028833 on May 31, 2010 1:35 AM

OK apologies as I was going to just post the bits of code but I didn't get much time last night.
This code was originally written by a couple of us who wrote some security and single sign on code for Coherence. The project is on Google Code here: http://code.google.com/p/coherence-security/
The source is a Maven project so it follows the Maven directory structure. If you look in the coherence-security-core test sources there is a package called com.oracle.coherence.patterns.security.test.starter which contains all the ClassLoader code and classes to start a Coherence "cluster" in a single JVM.
The com.oracle.coherence.patterns.security.ApacheDirectoryTest test class uses this code to start a cluster to run its unit tests. To start the cluster you call CoherenceClusterStarter.getInstance() for example the com.oracle.coherence.patterns.security.ApacheDirectoryTest testSecureClientWithUnauthorisedCredentials() method.
    @Test
    public void testSecureClientWithUnauthorisedCredentials() throws Throwable {
        // Set the main class that runs to be the Secure servers
        System.setProperty("coherence.incubator.mainclass", SecureSandboxStarter.class.getName());
        // Make sure the cluster members run with the [email protected] Principal
        System.setProperty("sun.security.krb5.principal", "[email protected]");
        CoherenceClusterStarter.getInstance();
        // Run the client as the Thomas the Tank identity ([email protected]) which is
        // not authorised to connect as an Extend client in the extend-permissions.xml file
        System.setProperty("sun.security.krb5.principal", "[email protected]");
        LoginContext lc = new LoginContext("Coherence");
        lc.login();
        Subject subject = lc.getSubject();
        try {
            Subject.doAs(subject, new PrivilegedExceptionAction<Object>(){
                public Object run() throws Exception {
                    SystemPropertyLoader.loadEnvironment("client");
                    System.setProperty("tangosol.coherence.security", "true");
                    CacheFactory.getCache("test");
                    return null;
            fail("Expected to have a PortableException wrapping a java.lang.SecurityException thrown");
        } catch (PortableException e) {
            assertEquals("Portable(java.lang.SecurityException)", e.getName());
    }In the code above the first line sets the coherence.incubator.mainclass System property to the name of the class that will be run (in this case our secured DefaultCacheServer wrapper). Then the next line starts the psuedo-Cluster which the rest of the code uses.
Note
The Google Code above was originally done due to a requierment to secure Coherence using Active Directory (Kerberos). The code was started on 3.4 and eventually on 3.5.3 and then used to help Oracle change the Security API for 3.6. There are a few things not quite right and a few "gotchas" that are not in the code online.
Anyone is welcome to take it and use it but I and the others who worked on it offer no warranty or guarantee it will work for you.
As of Coherence 3.6 there are much simpler ways to do security - although if you want to use Active Directory or Kerberos some of the code on Google will still be useful.
Any problems or questions give me a shout either here or mail [email protected].
Regards
JK

Similar Messages

  • How Can I Use Multiple Weblogic Instances in a Single OS

    Hello Everyone,
    Actually I have to install Some different applications. Few of them need weblogic 10.3.6 and others need 10.3.4. The OS am using is Oracle  Enterprise Linux 5.
    Now I am able to install 2 separate(One of 10.3.4 and 10.3.6) instances with two different users,In two different directories.
    I have installed the weblogic 10.3.6 version with a user webadmin and installed node manager with port 5556. This is working fine.
    The main problem here is :
    In the second instance (10.3.4 ) installed with a a different user and gave the port number to NodeManager as 1600 and its not getting started. Its throwing error and also after some errors in the terminal am able to see that its reverting to port number 5556 only.
    What might be the issue?
    I have to install 2 different versions of weblogic in a single Server. But am failing with NodeManager. What Can I do to have multiple weblogic instances with multiple versions in a single server ?
    Can anyone suggest a resolution for this please ?
    Thanks in advance.

    Pl do not spam these forums with multiple posts - How Can I Use Multiple Weblogic Instances in a Single OS

  • Can i use multiple AppleID's with one iCloud Account

    Our family stores our purchases in one huge library.  We each log into our accounts separately (e.g. someone uses an iTunes gift card, someone else uses a credit card, etc.) to purchase music.  Each of us can include other's purchases in our play lists.  We also have a lot of music loaded from CD's.
    Everyone syncs their devices based on their own playlists.
    Can we use one iCloud account to keep our respective playlists up to date?  We would like everyone's purchases available to all devices.

    yes and you can use more then 2
    just don't give them the same name

  • How can I use multiple ipad's on one account without sharing individuals personal email accounts?

    Is it possible to have multiple ipads on one account and share info, but also allow the individual users to have personal email that is not seen on the other ipad's? We have all ipads on same icloud account because we all need to see the same ical. It seems like that's the problem. If it IS related to icloud then if we have separate icloud accounts, how would we share the main ical otherwise? Sharing the ical is very important for this business so everyone can access the daily schedule. Of course each user still wants to have private email.
    Hope this wasn't too confusing!
    Thanks!
    Doreen

    you could set up the main icloud itunes acount for ical and not have in setup on the devices
    and share the calandar with the other itunes accounts on the devices
    or only have it on one device
    devices have the users indervidual itunes icloud setup
    they should be able to access the shared "main" itunes icloud ical account once it's shared
    http://howto.cnet.com/8301-11310_39-57542557-285/three-methods-for-sharing-an-ic loud-calendar/
    if the devices are company owned you could go futher and setup find my iphone on the main itunes account
    and not on the user icloud accounts

  • Can I use multiple Apple IDs in one device on IOS 7 as I do on IOS 6 ?

    I Used to live in the UK so I have many apps, albums and other stuff purchased from the UK stores. When I moved to the States I started to buy from the US stores.. With IOS 6 I can switch between stores and have content from both of them on my devices, can I do the same on IOS 7?

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • How can you use multiple stream types with one socket?

    Hi,
    I'm working on a large program that currently uses Object Input/Output streams for all of the messaging in a client/server application. This works fine except when files need to be transferred. In many cases using a Object stream to send a file can be 30 times slower than using a Buffered input/output stream. I've found I can combined the two. Here are some code snippets to give you a basic idea of what's happening...
    BufferedInputStream bis = new BufferedInputStream( serverSocket.getInputStream( ) );
    ObjectInputStream ois = new ObjectInputStream( serverSocket.getInputStream( ) );
    //this code runs on a thread on the server
    while( true ){
    switch( whichKindOfStreamUsedNext ){
    case OBJECT_STREAM:
    Object object = ois.readObject( );
    doSomethingWithObject( object );
    break;
    case BUFFERED_STREAM:
    readFromBuffer( bis );
    break;
    Obviously there is a lot missing here. Basically the variable whichKindOfStreamUsedNext is changed in the methods doSomethingWithObject( ) and readFromBuffer depending on what the current state of the server is and what is passed to these methods from the client.
    Here is the problem. If readFromBuffer( ) does a very small task and the client sends an object through an object stream everything is okay. I've switched whichKindOfStreamUsedNext = OBJECT_STREAM before that point and by the time the client sends the object the server is waiting on Object object = ois.readObject( );. However if the method readFromBuffer( ) does a very time intensive task and it takes a while to return and meanwhile the client sends an object then the server never gets that object. Does anyone have an easy solution to this problem. (Changing the whole program to just using BufferedStreams is not a solution).
    Thanks.

    Thanks a lot for the response.
    I guess I didn't realize I could do that.
    I changed how I am doing the program anyways. Sending flags to switch streams was a little messy. but now I have a new problem. I've discovered that mixing object streams with buffered streams also leads to significant speed increases. I do that in this manner...
    int ONE_MEG = 1024*1024;
    ObjectInputStream ois = new ObjectInputStream( new BufferedInputStream( socket.getInputStream( ), ONE_MEG ) );
    and I do the same thing for the ObjectOutputStream. It works very well when I just set up the client's output stream and the servers input stream in this manner. Upload times are increased from 60 seconds to 2-5 seconds.
    Unfortunately when I try to do the same thing with the servers output stream and the clients input stream to speed up downloads I get deadlock! As soon as the socket connection is opened and I try to set up the streams in this manner I get deadlock. Does anyone have any idea why this occurs and what I can do to fix it?

  • Can I use multiple apple ids on one device

    My family shares an iPad but we all have different ids and want to put our own apps on it. Is this possible?

    As far as I know this is possible. Just log in with each single id under settings>store an redownload the apps from the app store (app store>downloads>purchased articles).
    Though it will be difficult to do future updates, because only the updates of the id that is used for the moment are showing up.

  • How can I use multiple iTunes accounts on one phone?

    I Have an iTunes account with iTunes match enabled. I've just moved in with my gf and want to be able to share music on our phones. I've enabled her computer and put my Apple ID in and I now have all her music on my phone (thanks to iTunes match) but when I try and **** her phone it ignores all my music. How can I get all my music on her phone? The only way I have managed it is to sign out of her account on the phone and sign in with my ID but that would mean all her purchases would be charged to me etc so this isn't a solution really

    Put everything on the computer to which she syncs, and sync them to her iPhone.

  • Multiple component instances for one component usage

    Hi,all
    How can I create multiple component instances for one component usage.
    I'm using the following code for creating  a single component instance for specific component usage:
    if(c_Usage.hasActiveComponent())
          c_Usage.deleteComponent();
    if(wdContext.currentContextElement().getSelectedTab().equalsIgnoreCase("Registered"))
          c_Usage.createComponent("health.gov.registered.Registered";);
    I can't create one more component instance for
    IWDComponentUsage c_Usage
    cause I have to delete the component instance associated with this component usage.
    Any idea how can I do it anyway?
    Regards,
    Michael

    Hi,
    To create another instance of the same component you need to embed the same component under the Used Components more then once. For Example if you have Componet A to which you want to embed Component B then under "Used Components" of Component A add component B twice.

  • Can I have multiple TFS instances use a single SSRS installation

    Can I have multiple TFS instances use a single SSRS installation?
    Thanks

    Hi Kim,
    According to your description, you have multiple TFS instances using one Reporting Services instance. Right?
    For installing TFS, to use a named instance with Team Foundation Server, you must install SQL Server by using a named instance, or move or restore Team Foundation Server data to a named instance, or create a team project collection on a named instance. Please
    refer to the link below:
    Work with SQL Server Named Instances
    Reference:
    Understanding SQL Server and SQL Server Reporting Services
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • "you can not use multiple instance of Program at the same time"

    Hello @ all,
    I have a Problem, after the installing from Acrobat Testversion and acrobat reader in version in "all Combination" 8 an 9.
    I get this misstake information "you can not use multiple instance of Program at the same time" if I want open more then 1 .pdf.
    If I have no pdf open, but acrobat/reader so i can´t open with the same Misstake.
    I have deinstalled and installed, Allways I bekame the same information. I tryed all things to clean and know i don`t know forward.
    Important: by Drag an Drop in the Acrobat Reader it is going, but by direct click on the pdf i get mistake.
    Maybe, you know what I can do!
    Thanks for help!

    Installation of both Acrobat and Reader in the same Windows machine is not advisable. If I were you, I would remove both completely and then reinstall the one you want to keep.

  • Can you use multiple plugins on one piece of media?

    can you use multiple plugins on one piece of media?
    ...so for example have one plugin for a UI control bar, another for tracking, and another for advertising?
    If this is possible how? What types of plugin would each plugin be and what sort of media element would be required?
    Or is this not the correct approach? If not what would the correct approach be?
    Thanks in advance for support.

    I have got this plugin to set it's proxiedElement.
    To do so, I needed to follow David_RealEyes advice too.
    But I still can not acheive what I set out to find out, all I was trying to do was trace the current time of the videoElement, to begin to understand how plugins work. Can anyone advise please? Thanks in advance for support.
    I thought to acheive this I would just need to add  a listener for like this:
    dispatcher.addEventListener(TimeEvent.CURRENT_TIME_CHANGE,  onTimeChange);
    Then write the function like this:      
    private function onTimeChange(e:TimeEvent):void
                 trace('**********onTimeChange: '+ e.time)
    ...But this doesn't work.
    What am I doing wrong?
    Here's the class now for the TraceListenerProxyElement
    package
        import org.osmf.elements.*;
        import org.osmf.events.*;
        import org.osmf.media.*;
        import org.osmf.metadata.*;
        import org.osmf.traits.*;
        public class TraceListenerProxyElement extends ProxyElement
            public function TraceListenerProxyElement(wrappedElement:MediaElement)
                trace('TraceListenerProxyElement')
                super(wrappedElement);
            // Overrides
            override public function set proxiedElement(value:MediaElement):void
                trace('override set proxy')
                trace('value: ' + value)
                if(value)
                   super.proxiedElement = value;
                   trace('proxied element set')
                   enableListeners()
                super.proxiedElement = value;
                trace('proxied el: ' + proxiedElement)
            private function enableListeners():void
                trace('enableListeners')
                dispatcher = new TraitEventDispatcher();
                dispatcher.media = proxiedElement;
                dispatcher.addEventListener(AudioEvent.MUTED_CHANGE, processMutedChange);
                dispatcher.addEventListener(AudioEvent.PAN_CHANGE, processPanChange);
                dispatcher.addEventListener(AudioEvent.VOLUME_CHANGE, processVolumeChange);
                dispatcher.addEventListener(BufferEvent.BUFFER_TIME_CHANGE, processBufferTimeChange);
                dispatcher.addEventListener(BufferEvent.BUFFERING_CHANGE, processBufferingChange);
                dispatcher.addEventListener(DisplayObjectEvent.DISPLAY_OBJECT_CHANGE, processDisplayObjectChange);
                dispatcher.addEventListener(DisplayObjectEvent.MEDIA_SIZE_CHANGE, processMediaSizeChange);
                dispatcher.addEventListener(DRMEvent.DRM_STATE_CHANGE, processDRMStateChange);
                dispatcher.addEventListener(DynamicStreamEvent.AUTO_SWITCH_CHANGE, processAutoSwitchChange);
                dispatcher.addEventListener(DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE, processNumDynamicStreamsChange);
                dispatcher.addEventListener(DynamicStreamEvent.SWITCHING_CHANGE, processSwitchingChange);
                dispatcher.addEventListener(LoadEvent.BYTES_TOTAL_CHANGE, processBytesTotalChange);
                dispatcher.addEventListener(LoadEvent.LOAD_STATE_CHANGE, processLoadStateChange); 
                dispatcher.addEventListener(PlayEvent.CAN_PAUSE_CHANGE, processCanPauseChange);
                dispatcher.addEventListener(PlayEvent.PLAY_STATE_CHANGE, processPlayStateChange);
                dispatcher.addEventListener(SeekEvent.SEEKING_CHANGE, processSeekingChange);
                dispatcher.addEventListener(TimeEvent.COMPLETE, processComplete);
                dispatcher.addEventListener(TimeEvent.DURATION_CHANGE, processDurationChange);
                dispatcher.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, onTimeChange);
                proxiedElement.addEventListener(MediaElementEvent.TRAIT_ADD, processTraitAdd);
                proxiedElement.addEventListener(MediaElementEvent.TRAIT_REMOVE, processTraitRemove);
            private function onTimeChange(e:TimeEvent):void
                trace('**********onTimeChange: '+ e.time)
            private function processAutoSwitchChange(event:DynamicStreamEvent):void
                trace("autoSwitchChange", event.autoSwitch);
            private function processBufferingChange(event:BufferEvent):void
                trace("bufferingChange", event.buffering);
            private function processBufferTimeChange(event:BufferEvent):void
                trace("bufferTimeChange", event.bufferTime);
            private function processComplete(event:TimeEvent):void
                trace("complete");
            private function processCanPauseChange(event:PlayEvent):void
                trace("canPauseChange", event.canPause);
            private function processDisplayObjectChange(event:DisplayObjectEvent):void
                trace("displayObjectChange");
            private function processDurationChange(event:TimeEvent):void
                trace("durationChange", event.time);
            private function processLoadStateChange(event:LoadEvent):void
                trace("loadStateChange", event.loadState);
            private function processBytesTotalChange(event:LoadEvent):void
                trace("bytesTotalChange", event.bytes);
            private function processMediaSizeChange(event:DisplayObjectEvent):void
                trace("mediaSizeChange", event.newWidth, event.newHeight);
            private function processMutedChange(event:AudioEvent):void
                trace("mutedChange", event.muted);
            private function processNumDynamicStreamsChange(event:DynamicStreamEvent):void
                trace("numDynamicStreamsChange");
            private function processPanChange(event:AudioEvent):void
                trace("panChange", event.pan);
            private function processPlayStateChange(event:PlayEvent):void
                trace("playStateChange", event.playState);
            private function processSeekingChange(event:SeekEvent):void
                trace("seekingChange", event.seeking, event.time);
            private function processSwitchingChange(event:DynamicStreamEvent):void
                trace("switchingChange", event.switching);
            private function processVolumeChange(event:AudioEvent):void
                trace("volumeChange", event.volume);
            private function processDRMStateChange(event:DRMEvent):void
                trace("drmStateChange", event.drmState);
            private function processTraitAdd(event:MediaElementEvent):void
                trace("Trait Add: " + event.traitType);
            private function processTraitRemove(event:MediaElementEvent):void
                trace("Trait Remove: " + event.traitType);
            private var dispatcher:TraitEventDispatcher;

  • Can we use multiple queries on one template

    Can we use multiple queries on one template

    Hi,
    if you're using data templates for your data set, you
    can put multiple queries in the XML data template.
    The queries may then be linked (or not) by the "link
    name" tag ...
    Grtz.Following you answer here...do you know eventually how/if possible to preview a report (with XMLP Desktop) that is using data templates for the data set?
    Thanks,
    Liviu

  • Can I use multiple Apple store gift cards per transaction or is it has to be one gift card per transaction?

    Can I use multiple Apple store gift cards (£25 each) per transaction or is it has to be only one gift card per transaction?? Does anyone know thanks

    Hola, Eddy
    notice that you have posted to an old thread (Oct-Nov2013) that actually took quite some time to get attention back then**
    I recommend that you contact the Store Group regarding your purchase question - don't let the "iTune-ish" URL and page title throw you off... it's the right place
    Store Group - Contact Us - Apple Support
    ** next time you have a question, I advise to check the dates carefully and if older than a month or so, AND it has no answer to your specific issue, start a NEW Question. You did a fine job of stating your exact issue - many folks, not so much.
    buenos dias
    CCC

  • Can there be multiple ASM instances on single node?

    Hi,
    Can there be multiple ASM instances on single node?
    This one says No : http://www.freelists.org/archives/oracle-l/02-2008/msg00317.html
    And This one says Yes : http://www.databasejournal.com/features/oracle/article.php/3571371
    Thanks in advance.
    Thanks,
    Harsha
    Edited by: user498756 on Sep 11, 2008 2:23 AM

    ...that document doesnt say you cannot have multiple ASM instances on a node. It says "...ASM, +you only need one ASM+ instance for that computer, to manage the two database instances that use ASM."
    The fact that you only need one - and I cannot think of a good reason to have more than one - does not preclude the fact that you do seem to be able to have multiple ASM instances on a single node, each looking after its own set of disks and diskgroups.
    Again - I cannot think of a good reason to do so though!
    -Bob

Maybe you are looking for

  • My ipad will no longer sync with itunes error -54

    my ipad fails when attempting to sync.  starts then comes back and says unknown error -54

  • IPhone OS 3.1.2 update removes albums from iPhone

    I downloaded OS 3.1.2 tonight and updated my iPhone. The update and sync process removed over 2.5 GB of music from my iPhone. My albums still appear in the Music section of Library but I can't get them to sync with my iphone and transfer over. What g

  • My EarPods doesn't work and I don't where to get a replacement.

    My iPhone was bought from an orange contract, however the EarPods that came with it no longer works on the right ear( there's no sound). So I would like to know if it's possible to get a replacement from the apple store or do I visit orange?

  • SQL Report Row Highlighting

    Hi, Hoping someone can please assist but I am unsure how to highlight a row within my SQL Report based on a condition, i.e. either a DECODE or CASE statement being true - if so, would like that report highlighted light blue say. Any help, links,examp

  • Symbol question

    What does the symbol    ~      stand for ? I asked where a folder would be located and was told  it would be in       ~/desktop. i have no idea what   ~   represents.