How do I know if my application is running from within WebLogic server

I have an application that could be running either as a standalone
application (with its own VM) or as a servlet (within the WebLogic's
VM). How can the application determine the environment in which it is
running?

We have a similar situation here and we took the approach suggested below.
It does work, however it is creating one problem for us.
Sometime after the code below executes, our application attempts to
construct
the initial JNDI context (in order to look up an EJB Home). In the case
where
our application is running outside of a WLS instance, we get the following
exception:
Exception in thread "main" java.lang.NoClassDefFoundError:
weblogic/rjvm/LocalRJ
VM
at
weblogic.t3.services.OutputFilePropertyClient.getValue(OutputFileProp
ertyClient.java:48)
at weblogic.rjvm.RJVMManager.initialize(RJVMManager.java:78)
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:137)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:182)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIni
tialContextFactoryDelegate.java:195)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIni
tialContextFactoryDelegate.java:148)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont
extFactory.java:123)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
71)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
at javax.naming.InitialContext.init(InitialContext.java:218)
at javax.naming.InitialContext.<init>(InitialContext.java:194)
... application code here ...
It would appear that the failed call to getT3Services() is leaving the
Weblogic client
runtime in a bad state (if we remove this call, there is no problem
constructing the
context).
So, the question I have is "is there any *safe* way to determine if an
application is
running within a WLS?". Thanks in advance for any additional suggestions.
Sean
"Wei Guan" <[email protected]> wrote in message
news:[email protected]...
Try this:
boolean isInsideWLAS=false;
try
T3Services.getT3Services();
isInsideWLAS=true;
catch (Exception e)
My 2 cents.
Cheers - Wei
Cheers - Wei
Adane Zygta <[email protected]> wrote in message
news:[email protected]...
I have an application that could be running either as a standalone
application (with its own VM) or as a servlet (within the WebLogic's
VM). How can the application determine the environment in which it is
running?

Similar Messages

  • How to change report displayname at runtime when run from the report server?

    hi all,
    with the reportviewer widget in a winforms app, i'm able to change report displayname at runtime by handling thesubmittingparametervalues event like so:
            private void reportViewer1_SubmittingParameterValues(object sender, ReportParametersEventArgs e)
                string po = e.Parameters["Order"].Values[0];
                this.reportViewer1.ServerReport.DisplayName = "Load Out - " + po + " - " + DateTime.Now.ToShortDateString();
    question: how do i achieve the same thing when the report is run via the ssrs reportserver website?
    thanks for any tips,
    sff

    Hi sherifffruitfly2,
    According to your description, you want to change the display name of report in Report Manager. Right?
    In Reporting Services, we can't make the report file name dynamically. But we have Build-in Fields to show report name and execution time in a report. We can add a textbox and put in the expression below:
    ="Load on- "+Globals!ReportName+" "+Globals!ExecutionTime
    It will show the report name with execution time when we run the report:
    Reference:
    Built-in Collections in Expressions (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How could I know if my applications use HRMS?

    Hi,
    How could I know if my applications use HRMS? Is HRI (Human Resources Intelligence) the same thing as HRMS? Could anybody tell me how could I find the aliases for all the products available (not neccesarily registered) in Oracle Applications?
    thanks,
    Paul

    you can find the complete details of how to find the list of products installed in the following thread
    Query for Appliation Products Installed
    Hope this helps
    Regards
    Ramesh Kumar S

  • How do I know if my MBP will benefit from heatsink paste reapplication?

    Dear Mac Users
    I know the theme of hot MacBook Pro's has been done to death, but I would like to add my two pennyworth with respect to the specific question: How do I know if my MBP will benefit from reapplication of the heatsink compound? I have trawled numerous very long threads here and not found a satisfactory answer. The reapplication of the heatsink paste is a bit of a schlep and not without some risk of breaking it, so it would be good to know if the benefit is worth the risk.
    One common question is: "Are my MBP temperatures unusual?". A useful mac temperature database can be found at the following link:
    http://www.intelmactemp.com/list
    Consulting this list should set some parameter space for many users - there does seem to be considerable variability - suggesting highly variable quality of heat sink paste application by Apple. In my particular case I have an early 2011 MBP (i7, quad core, 2.2GHz). This certainly ran very hot. I even had a burn on my thigh from it, which took a while to heal. I know, they are notebooks, not laptops, but still . . . . To put very hot into perspective, the CPU was sitting at over 60C at idle, and whole case would be hot to the touch, such that resting your hands on it was uncomfortable. And yes, the computer was idling, there were no rogue processes chewing up cycles. At full load, the CPU would run at 90C and the whole thing would get very hot. I avoided running major projects or rendering jobs on it to preserve it from heat fatigue - the warranty is now up.
    My first attempt at reducing the temperatures, was to clean it. The clue was in the USB/Firewire etc ports. All were very fluffy, which suggested that there was a lot of crud in the heatsink fins. Fixing this was simple; adopt anti-static precautions; remove the back panel; blow air into the exhaust vents at the base of the screen. Numerous large fluff bunnies popped out of the fans and elsewhere. Alternatively, you can unscrew the two fans and partially lift them out (without removing the power cables to the motherboard). Major fluff on the heatsink fins can then be tweezered out, prior to blowing it through, to ensure all debris is removed. I did this subsequently on my Core 2 Duo MBP. After defluffing the idle i7 CPU temperatures dropped from 60C to 43C, but perhaps of more importance was that the whole case was much cooler and the keyboard temperature was close to ambient - much nicer to use.
    So that fixed the major heat problem. However, the question remained, would I see any further improvements by stripping the thing down and reapplying the heatsink paste? What I was looking for in this forum was a rule of thumb based on temperature measurements to help me make an informed decision on whether to strip the thing down. As my machine was out of warranty, I wasn't worried about voiding that. Also, where I am there is zero support (Africa), so Genius Bar or similar was not an option. But jiggering a 14month (very expensive) laptop was not something I wanted to do for thrills. The data in many of the posts did not provide any answers. In the end I made some measurements and decided to do the fix. The step by step instructions I followed were very clear and can be found for many Macs/models at:
    http://www.ifixit.com/Device/Mac
    This guide made life a lot less stressful, as pulling a connector the wrong way could trash the motherboard, and those connectors are so very tiny and fragile. It is very important to take it slow and follow each step to the letter (and not skip steps inadvertently). My before and after heatsink paste fix temperature data are shown below. The idle temps are improved, while the full load temps look like a marginal improvement. However, CPU temperature is not the only story. Certainly after the fix, the whole case is generally cooler, so the heat extraction system is working better. Also, the CPU before and after temps are quite similar at full load, but that assumes the CPU is running at the same power. I do not know enough about the i7 architecture to say if the before speed was being limited by heat, while in the after case the turbo-boost was able to run out to the maximum. Unfortunately, I didn't do any CPU performance tests. So, based on temperatures alone, it looks like a marginal improvement, but it is certainly making a difference to case temperatures.
    Note all temperatures were measured at an ambient temperature of 20C on a flat, hard surface using Marcel Bresink's Temperature Monitor. Fan speed was measured using the Fan Control software - set to allow firmware control at idle.
    Apple original heat sink paste - big dollop of grey crud and lots of extrusion at the sides.
    Idle
    CPU 43C
    GPU 38C
    Heat Sink 2 36C
    Heat Sink 3 35C
    Fan Speeds 2000rpm
    Full Load (all cores maxed with a Boinc Distributed Computing Project (Rosetta - the project, not the Apple technology).
    CPU 89C
    GPU 57C
    Heat Sink 2 52C
    Heat Sink 3 49C
    Fan Speeds 6200rpm
    Arctic Silver heat sink paste
    Idle
    CPU 38C
    GPU 34C
    Heat Sink 2 33C
    Heat Sink 3 32C
    Fan Speeds 2000rpm
    Full Load
    CPU 86C
    GPU 59C
    Heat Sink 2 50C
    Heat Sink 3 50C
    Fan Speeds 6200rpm
    Back to my original question: How do I know if my MBP will benefit from reapplication of the heatsink compound? I think temperatures alone will not give a good answer - mainly because the CPU probably has variable output - due to turbo boost. One thing I did notice is that the temperature response of the CPU when it gets switched to full load, does vary according to the quality of the heatsink paste. With the original Apple paste, when I switched the CPU to full load (from idle) the temperature of the CPU went up to its maximum almost instantaneously and stayed at that level ie the graph of temperature vs time was a step function. This suggests that the CPU may be controlling the temperature by throttling itself. Otherwise, as the heatsink warmed up, the CPU should also rise in temperature - mine stayed bang on 90C and fluctuated only by a degree either side.  After application of heat sink paste, the CPU has a much larger effective thermal mass and consequently heats up much more slowly. Turning the CPU up to maximum from idle resulted in the temperature climbing to a maximum over about 3-4s. After peaking at around 92C it dropped back as the fans kicked in, to around 86C.
    So perhaps one way of assessing the quality of your heatsink paste is to ramp the CPU to maximum from idle and look at the shape of the temperature profile. A step function suggests a lousy job and benefit may be had from reapplication. A more gently sloping profile, followed by a dip due to the fans kicking in, may suggest you are in good shape. Obviously, this presupposes that your Mac temperatures are not insanely hot to start with (i.e. high 90sC+). In which case, if defluffing doesn't do the job, then new heatsink paste is almost certainly required.
    Regards, BB

    I'm sorry but this is too funny to pass up. 

  • I have a second generation I Pod touch.  How do I know which games I can download from the Apple Store?

    I have a second generation I Pod touch.  How do I know which games I can download from the Apple Store?

    Hello, Suzanne. 
    Thank you for visiting Apple Support Communities. 
    Unfortunately there isn't a list available at this time for applications that are specific for your iOS/Software version.  However, once you know which iOS/Software version you have installed, you can browser various applications and look for ones that meet your system requirements.  I have included a screenshot below on how to look for this information. 
    iPhone, iPad, iPod: How to find the software version
    http://support.apple.com/kb/ht2188
    Cheers,
    Jason H. 

  • How do you know if your computer is running 64 Bit?

    How do you know if your computer is running 64 Bit?

    That's actually a kind of complicated question. Strictly speaking, there's no such thing as "running 64-bit".
    That aside, Intel Core 2 Duo processors and late-model Xeons all have chips that have the Intel EM64T instructions set (64-bit extensions developed by AMD and later adopted by Intel), so they are capable or executing those added 64-bit instructions.
    In the Leopard OS, most of the system software has been compiled to make use of 64-bit libraries, but at the same time, 32-bit versions are included for compatibility with pre-Leopard software. So, at any given time you can have software running that uses only the 32-bit instructions, or uses the 64-bit instructions.
    Now, albeit the 64-bit libraries are capable of addressing a 64-bit address space, until recently, iMacs and Mac notebooks used Intel chipsets (not the CPU, but the chips that connect the CPU to the other parts of the computer) couldn't address more than the 32-bit address space (a portion of which was reserved, which is why you couldn't use more than 3G of RAM in those Macs).
    So, based on that you can ask these questions to see if you are running in 64-bits:
    Is the computer a G5 Power PC, Xeon, or Core 2 Duo CPU? If no, you are 32-bit, else go on...
    Are you using OS X 10.5 or later? If no, you are 32-bit, else go on...
    Does the application "require OS X 10.5 or later" or does it advertise that it's a "64-bit" application? If no, the application is probably 32-bit.
    On OS X 10.5 and later, most of the pre-installed Apple-branded software uses the 64-bit versions of the libraries, so they can be said to be "64-bit".

  • How do u know that your zen micro suffer from headjack proble

    I went to change my black zen micro on 7/6/2005 (b'cos of headjack problem) and again i think it happening again...awh :angry: i didnt really used my mp3 and i didnt really know how it suffer from this probelm,
    .What are the effects or How do you know that your zen micro suffer from headjack problem ?
    2.Can we change colour when we sent the Zen micro to repair ?
    awh somebody help mi...

    you know u've been hit with the headphone jack problem when the music channels out of the left and right ears and if you wiggle your jack (depending on which way) you music will fade in and out and become distorted, its happened to me twice already, although my new micro seems much more firm thent he last three.

  • How can i build application using Jdeveloper 10g for Weblogic server 10.3

    Hi,
    We have a requirement where in we want to build an SOA application using Jdeveloper 10g for Weblogic Server 10.3.
    Is there any way to make a connection to Weblogic Server 10.3 from JDeveloper 10g? If there is any way please share it with me.
    Thanks,
    Amit Kumar

    Amit,
    SOA Suite is not yet certified for WLS 10.3. You have to wait for the certification of it.
    At the moment you can't install the SOA Suite on WLS 10.3 nor connect from JDev 10.1.3 to it.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Pagelets not rendering in Fusion ADF application pages deployed on standalone weblogic server

    HI All,
    I am creating a Pagelet Producer connection, and dragging a pagelet on the page as iframe, with height auto. When I run the application in the integrated weblogic server, I am able to see the pagelet. However when I deploy the application on the standalone weblogic server, then the pagelet isn't rendered.
    I am using fusion ADF application 11.1.1.7  and standalone weblogic server v 10.3.6.
    Thanks in advance for yours assistance. Please I need a solution for this uregently. DO let me know, if you need any additonal information.
    Regards,
    Nikhil Mahto

    Sorry for the wrong infromation. The correct scenario is:
    I have an ADF application, in which I have a Pagelet producer connection, pages and taskflows. This ADF application is inlcuded in a Webcenter Portal Framework application, as a shared library. When the WCF application is deployed on the Weblogic server, the pagelets don't appear on the pages.
    I tried the FRAMEBUSTING context parameter to never but it didn't help.
    Regards,
    Nikhil Mahto

  • Securing applications communications running in the same server

    Hi everybody,
    I want to share critical information between two applications (medical information about patients) using JMS queues, moreover due to this criticity i was planning to secure this communication using SSL. The problem is that one of the client applications, because of his architecture, have problems when accessing the JMS queues.
    But I have to say that both applications will run in the same server (physical machine), knowing that, what kind of security problems could we encounter if, finnally we don't cypher the communication?
    I guess that the danger is lower than if the two applications would run in different machines, wouldn't it?
    Thanks!!!

    hi,
    add crossContext="true" in server.xml under tomcatx.x\conf\ in your <Context tag

  • TS3899 In ios7 how do you limit the number of emails downloaded from your ISP server?  Previous version allowed you to limit it to 50, 100, etc.

    In ios7 how do you limit the number of emails downloaded from the ISP server?  Previous version allowed you limit the download to the last 50, 100, etc.

    Hi,
    Unfortunately, this is a feature that Apple have taken away.
    The best way to let them know you want it back is via http://www.apple.com/feedback/
    Regards

  • How can change ojdbc14 jar to ojdbc15.jar orcale As and weblogic server

    On the machine I installed the server, Oracle JDBC drivers are in ORACLE_HOME/jdbc/lib/ojdbc14.jar.
    How can change Oracle JDBC drivers ojdbc14 jar to ojdbc15.jar.

    >
    On the machine I installed the server, Oracle JDBC drivers are in ORACLE_HOME/jdbc/lib/ojdbc14.jar.
    How can change Oracle JDBC drivers ojdbc14 jar to ojdbc15.jar.
    >
    You can't - do not attempt to or you may break Oracle.
    The JVM is an integral part of Oracle and without the proper, certified version of the JVM the database will not run properly. In fact if you use Oracle installer and elect to remove the JVM the database itself will be removed also.
    Oracle 11g installs with JDK 1.5 and that is the ONLY version that is certified to work properly with 11g. If you attempt to use any other version you are violating your support contract and will likely have errors.
    The installed version of the JDK is the version that Oracle itself uses and is the version that will be used for any Java classes that you load into the database and run from within Oracle.
    You are free to use any version of the JDK you want for external Java applications.

  • How to force SequenceFi​leUnload callback to run from within operator interface

    I need to force SequenceFileUnload callback to run from within operator interface arbitrary, with possibility to control execution flow.
    I.e. discarding object handle of execution object, which has client sequence file, which has SequenceFileUnload callback, causes it(SequenceFileUnload callback) to run. Unfortunately, after discarding execution object handle, it can be used to control execution flow(pausing, aborting, terminating).

    Thanks for the clarification. Here are the answers to your 3 questions:
    1) You can programmatically run any sequence (including callbacks) by using the TestStand API Engine.NewExecution() method.
    2) The Execution API object has several control methods for breaking, aborting, terminating, restarting, etc... All you need to do is obtain a reference to the Execution you want to perform one of these actions on and call the appropriate method on the reference. If you start the SequenceFileUnload callback with the Engine.NewExecution method, this returns a reference to the Execution object that you can call these methods on. If you don't use the NewExecution method, you can do a check in your UIMsg event handler for the StartExecution UIMsg event
    for an execution starting that is running the SequenceFileUnload callback, and simply manipulate the Execution reference the UIMsg contains as you see fit.
    3) To disable the SequenceFileUnload callback for a sequence file that is currently loaded. You can set the SequenceFile API object property "UnloadCallbackEnabled" to FALSE, and the callback will not execute for that file when it is unloaded unless you go back and reset the property to true before unloading. Note this property is reset each time you load the file.
    For more information on the TestStand API objects, methods, and properties discussed in this post, refer to the TestStand Programmer Help accessed through the Sequence Editor's Help >> TestStand Programmer Help menu selection.
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • HT4859 how do you know what is backed up/restored from iCloud

    How do you know what items are backed up to iCloud and also if the restore is correctly restored from iCloud.Are applications also backed up to iCloud

    What is backed up
    You get unlimited free storage for:
    Purchased music, movies, TV shows, apps, and books
    Notes: Backup of purchased music is not available in all countries. Backups of purchased movies and TV shows are U.S. only. Previous purchases may not be restored if they are no longer in the iTunes Store, App Store, or iBookstore.Some previously purchased movies may not be available in iTunes in the Cloud. These movies will indicate that they are not available in iTunes in the Cloud on their product details page in the iTunes Store. Previous purchases may be unavailable if they have been refunded or are no longer available in the iTunes Store, App Store, or iBookstore.
    You get 5GB of free iCloud storage for:
    Photos and videos in the Camera Roll
    Device settings (for example: Phone Favorites, Wallpaper, and Mail, Contacts, Calendar accounts)
    App data
    Home screen and app organization
    Messages (iMessage, SMS, and MMS)
    Ringtones
    The following items are not backed up to iCloud. You can sync these items with a computer using iTunes:
    Music, movies and TV shows not purchased from the iTunes Store
    Podcasts and audio books
    Photos that were originally synced from your computer

  • How can I know the name(s) of font from built-in font dialog from Word VSTO AddIns.

    Hi, All !!
    I would like to extract some values from the built-in font dialogbox "wdDialogFormatFont" through VSTO AddIns.
    Figured out short codes;
    Microsoft.Office.Interop.Word.Dialog 
    F_DLG  =  Globals.ThisAddIn.Application.Dialogs[Microsoft.Office.Interop.Word.WdWordDialog.wdDialogFormatFont];    
    F_DLG.Show();
    MessageBox.Show( F_DLG.FontMajor.ToString() );
    MessageBox.Show( F_DLG.FontHighAnsi.ToString() );
    Ther last two lines (red ones) do not work at all.
    How can I know the name of the fonts ? (English and Non-English)
    In VBA, it works beautifully.
    Thanks !!

    Hi,
    According to the description, you want to get some options from the build-in dialog dispaly by code.
    As far as I know, we can declare an dynamic object to achieve the goal. Here is the code for your reference:
    dynamic F_DLG = Globals.ThisAddIn.Application.Dialogs[Microsoft.Office.Interop.Word.WdWordDialog.wdDialogFormatFont];
    F_DLG.Show();
    MessageBox.Show(F_DLG.FontMajor);
    Also we can use refrection to get the property we wanted like below:
    Microsoft.Office.Interop.Word.Dialog F_DLG = Globals.ThisAddIn.Application.Dialogs[Microsoft.Office.Interop.Word.WdWordDialog.wdDialogFormatFont];
    F_DLG.Show();
    MessageBox.Show(F_DLG.GetType().InvokeMember("FontMajor", BindingFlags.GetProperty, null, F_DLG, null).ToString());
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for