JWS plumbing question

Hi folks,
I am new to JWS.
Can JWS be launched from a hyperlink and import the
resources assoicated with the link immediately after
launching?
In other words, can JWS application be used in the
same way a MP3 player is used?
(Should a servlet be used? How can a servlet interact
with a JWS application?)
Thanks.

Can JWS be launched from a hyperlink and import the
resources assoicated with the link immediately after
launching?If you click on a link that maps to a mp3 file your browser knows to start up your default mp3 player and plays that mp3 content through it.
This is because mp3 content will be served by most web servers with a mp3 MIME type and the browser knows that mp3 MIME typed content has to be played be the registered mp3 player.
With jnlp/jws it is the same, the link points to a jnlp file, which is MIME typed as jnlp content. The browser knows that jnlp content needs to get "played" via the JWS application (javaws.exe). And thus your JWS program starts up, shortly after you clicked the jnlp link.
(Should a servlet be used? How can a servlet interact
with a JWS application?Somes uses for servlets in the context of JWS are
- servlets for serving versioned jars
- servlets for serving difference jars (for shorter download times)
- servlets to generate custom jnlp descriptors on the fly
But you can live happily without servlets.
Regards,
Marc

Similar Messages

  • Plumbing question for Ben (chart Q actually)

    Ben I am perhaps in need another "jiggle the handle" solution.  I tried writing to a few different property nodes for a WFChart that is "acting a-fool" with no results.  Each update mode seems to have its own problems.  Specifically, in sweep mode (or is it scope?  I forgot immediately after the CLAD) there sometimes appears a second refresh cursor when the x-axis scale is changed, sections of vertical-horizontal lines on the chart come and go as the cursor passes or the front panel is scrolled, the waveform itself clears when the cursor reached the end of the plot area and acts like scope and then returns to sweep sometime later or the waveform itself is thick (as it is set to be) but then is very thin is some sections.  In scroll mode when DAQ begins a few samples of data show up on the far end of the plot before beginning normal left-to-write plotting.
    I have found some previous posts about video cards in laptops not being sufficient but the posts were pretty old, and it happens on a good desktop too.
    Any suggestions?  I am considering using a graph, its pretty slow acquisition and I figure there wouldn't be too much of a performance hit.  No?
    You gurus rock!
    Greg
    P.S. - My brother (a plumber) really appreciated your plumbing story with the power auger.
    v7.1
    Attachments:
    1.PNG ‏53 KB
    2.PNG ‏54 KB

    Can you post a simplified example that duplicates that behaviour?
    It looks a lot like what we were talking about in the "What makes chart go wonky" thread. NI reported a CAR but it has been hard geeting examples they can use to enusre they fixed it.
    so can you post a simple demo?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • JWS WSDL question:  unmarshalling an object parameter's List member

    My webservice method which takes a single object parameter, which in turn has a member of type java.util.List, unmarshalls a complex type into the WSDL differently than another web method that has a parameter of type List. With that tortured explanation, here is a nutshell example:
    @WebService(...)
    @SOAPBinding(style=Style.RPC, use=Use.LITERAL)
    public class MyService {
        @WebMethod
        public void doOne(MyStruct request) { ..... }
        @WebMethod
        public void doTwo(List<String> names) { ..... }
    public class MyStruct {
        private List<String> names;
        public List<String> getNames() {.....}
        public void setNames(List<String> names) {.....}
    }The generated WSDL has a complex type for MyStruct, and that has an element defined like so:
    <xs:element maxOccurs="unbounded" minOccurs="0" name="names" nillable="true" type="xs:string"/>Whereas the type of element generated for the input message for doTwo() is:
    <wsdl:part name="arg0" type="ns1:stringArray"></wsdl:part>(where stringArray is a complex type, sequence of type xs:string... obv)
    Why the two different generated elements for the same native Java type? How can I make it generate a stringArray element for the element in MyStruct?

    In dashboard, you could create prompts and use presentation variable, which can be used in the sub-report.
    Search Presentation Varible on this Forum and you will get all the information that you needed.
    Cheers!
    Shilei G

  • JWS security question

    Hello,
    How save is your code when client uses your Web Start application?
    Is there a way to prevent a client from being able to reverse engineer your .class files?
    thanks

    There are obfuscation tools you can run over your jars, but it only makes it more difficult to reverse engineer, not impossible.
    Then again, ANY time you distribute a program to someone it can be reverse engineered. That is the nature of the beast.

  • FileSaveService - test results requested

    This is a follow-on from the thread
    'FileSaveService hides but enforces the file type/xtn'..
    <http://forum.java.sun.com/thread.jspa?threadID=5234123>
    Since my other post on this matter only asked for explanations, I thought I'd start this one purely for test results. See this page for details..
    <http://www.physci.org/test/jws/fss1/>
    2 Dukes to anyone that can provide an answer to both of the first two questions shown here..
    <http://www.physci.org/test/jws/fss1/#question>
    The 'Launch Test' button is here.
    <http://www.physci.org/test/jws/fss1/#launch>

    Yes, this is a bug.
    <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6646622>
    If you have an interest, please vote for the bug.

  • Selective versioning/updating

    Hey people. This question is for the JWS and JNLP gurus out there.
    Info:
    For our project, my company is responsible for not only supplying software, but the hardware on which the software is to run. Part of the system we will be providing, is 5 workstations. We will be deploying and updating the software using JWS.
    Question:
    If we have the location of the JAR files to be, say
    http://testserver/JWS/workstation,
    and we update the JAR files on the server, is it possible for only one station to use the updated JAR files? All the workstations would be looking at the same JNLP files and therefore the same folder. What I'm trying to say is, say we update the JAR files, and only want workstation 5 to run the updated version before we implement the update on the other stations, is this possible using the same folder for the JAR files? Could versioning be used? Or will we have to create separate folders on the server for each of the workstations? For example:
    http://testserver/JWS/workstation1/
    http://testserver/JWS/workstation2/
    http://testserver/JWS/workstation3/
    http://testserver/JWS/workstation4/
    http://testserver/JWS/workstation5/
    I would like to know if anyone has successfully implemented this before, or even if it is possible! If it is possible, how do I implement it??
    Regards
    Chris

    I solved a similar problem by splitting the app into two JNLP applications, a Launcher and the Real Application. The Launcher checks a persistent version file stored in the user's home directory (I had trouble with the PersistenceService and NullPointerExceptions). It checks the local version against the latest version on the server. If it encounters an update, it pops up a dialog asking the user whether to use the new or the current version. It then calls JWS to open the URL to the Real Application's JNLP file, appending the appropriate version-id tag to the URL. When the real application succesfully starts, it writes its version to the version file. Thus, the launcher will only default to the new version if everything was succesful.
    You can avoid unwanted popup windows by calling com.sun.javaws.Main from the Launcher instead of using BasicService.showDocument(). Check out http://vamphq.com/jwsfaq.html#debug on how to do this. Also, don't add the href attribute the the Real Application's JNLP tag.
    This is all kind of cumbersome, but once you write the Launcher, you can use it for any JNLP application. It would be great of Sun would separate the JNLP implementation from the JWS application and allow us to embed stand-alone versions of the JNLP side into our apps. Short of that, this works fairly well.

  • Can JWS do this...? Architecture question

    Hi,
    I'm designing the architecture for a school board that is moving a COBOL system to a Java App Server system. Within the system there are approx 180 'Modules' - each module being a set of screens that allow a user to accomplish a task. For example, the Teacher Grading module allows a teacher to access their student records and maintain the student's grades.
    I'm looking to use JWS for deployment of the front end but am unsure if JWS will support the framework I want to put in place.
    From a UI perspective, as there are so many modules in the system I want to design the architecture in a way that allows each module to plug in to the existing framework.
    The front end would consist of a container application that would house each module in a sort of tabbed view. As each module is added to the system so the user would see a new tab in the UI that housed the new module (depending on whether the users had permissions to access the module).
    So the front end container would display the modules that the user can access, adding new ones as they are defined.
    Question:
    Is the server's JNLP file for the application static? If it was ammended to include new jars would this cause problems on the Client side post initial installation, or would it take it in it's stride and just upload the new jars as required?
    What I want to do:
    I was hoping that I could just ammend the JNLP file on the server to include the new Module (jar file), the Container app could then just get a list of class names from the App server that were applicable to the User. The Container app could then instantiate the class objects and the JWS would automatically upload jars any that were missing (using lazy loading), and subsequently add the new Module( jar) to it's list of versioned jars to update when required.
    Question:
    Is this possible to do using JWS?
    Another possiblity:
    1) Main application Container gets installed using JWS
    2) User starts app and signs on
    3) Container talks to App Server and determines which Modules the User has permissions to use
    4) Container downloads missing or new Modules - jar files (maybe using javax.jnlp.DownloadService?)
    5) Want JWS to subsequently evaluate downloaded Modules (and main app) for any updates - though this would happen at step 2.
    Question:
    Would an individual Module's jar file/s need to be referenced in the JNLP file to download it using javax.jnlp.DownloadService? I am thinking it would.
    Things to note - it is not possible to define the app with all 180 Modules embedded as it may take years to recode all 180 COBOL Modules in Java. and the system it being implemented iteratively. Also few, if any users will have access to all 180 Modules. Users are part of Groups (Teachers, Superintendants, Subtitutes etc) and each Group only has access to a certain set of screens (Modules).
    Any advice would be appreciated, as I would like to be aware of any potential problems before I define the architecture.
    cheers
    Ray

    You are completely free to dynamically generate the JNLP file if you wish via a regular Java servlet. In fact Sun has available a simple servlet called JnlpDownloadServlet which you'll find in the jnlp-servlet.jar file in your jdk installation. So you could create the servlet and pass arguments to it giving the user id and it could generate it with the modules that this user has access to. You would then probably also generate arguments passed to the main() function which would tell your app what classes (modules) to load into your app.
    The disadvantage of this approach is that your server has to keep track of what modules this user can use, and he would probably have to use the web site and another servlet to configure it. (Assuming the user has any control over what modules he can access).
    However there may be a better way for you to proceed. If you create a static JNLP file that contains ALL the modules but with the download="lazy" option, then all modules will be in the JNLP but not downloaded unless necessary.
    Then you can download the bits explicitly you want to use. (The DownloadService class) will tell you how to do this.... http://java.sun.com/products/javawebstart/docs/javadoc/index.html
    You will need to have all the modules listed in the JNLP file. Whenever a user starts up the app it will refresh their copy of the JNLP file. Pass the list of available modules to the main() function within the JNLP file so that the app knows they are there.
    If necessary have some arguments that indicate permissions on the modules within the JNLP file that are passed to main(). (e.g. --module=mymod1.jar,perm=teachers,students )
    You may want to create a ClassLoader that accesses that jar file directly (passing in the URL)... (once it is downloaded via DownloadService) and loading information directly from each jar. e.g. have an info.properties file in the "root directory" of every jar file that explains what the entry point or points are for this module. That avoids having to pass even more info in the JNLP file (e.g. --entryPoint=com.foo.MyModule1). or else having some guessable naming scheme for classes. That is a good thing at least for entry points so that the module is completely self-contained describing its own entry points. That is an approach I've used before. But you wouldn't use it for permissions, because then you would have to download it before you could tell if you need it.
    Now the application itself can manage its own modules and resources using whatever criteria you desire. (You could even give the user some control). If all your modules have a standard interface for launching them, you can dynamically load those classes on demand. Use DownloadService to download the jar for that module, and then use Class.forName() to access the entry point for the module. Use the java.util.prefs.Preferences class if you need to keep track of anything on the client side about modules.
    If it were me, I'd have the code be able to work without webstart as well which is easier for local debugging. That shouldn't be a problem.

  • Can JWS be used as a multiple Java version management tool?

    WinNT4 WKS with JRE 1.3.1 - 1.4.2 loaded on it using IExplorer or Netscape.
    We don't have a need for the JWS download features because our clients (and their applications) remain static for the most part. However, we do require multiple JRE version support because our customers have written class/objet "fixes" (mostly for text rendering) and these fixes break if you try and run the application on a different version of Java from which it was written. Basically, we can't have a default JRE on each machine and hope that it will work with all customer applications. So we will load all necessary Java components on our workstations (in this case JRE versions 1.3.1 - 1.4.2). I know that browsers can be forced to load with a specific Plug-in version (providing it exists on the machine) through Object & Embed tags in the HTML and that standalone apps can be directed to the correct Java directory path. My question is, can JWS automatically identify the Java requirements of our customers applications and act simply as a multi-version management tool to provide the right JRE/Plug-In for either standalone or browser applications? Keeping in mind that all the JREs will be loaded on the workstions and it won't need to download any components from some site.
    I've noticed that JWS identifies all JREs loaded on a machine in the Java tab so I'm wondering if it can "switch" the environment as needed for each application.
    Does anyone know if I can use JWS in the scenario I described above? Thanks!

    JWS can manage the multiple JREs installed if you run the application through a .jnlp. This can not "switch" the default JRE. It runs the application specified in the .jnlp using the requested version specified in the .jnlp.
    JWS does not apply to applets. You should use the object tags as you mentioned below.
    ...can JWS automatically identify the Java requirements of our customers applications
    No. You must determine this and setup the .jnlp appropriately.

  • How can i get the local path to my cached app in jws

    Hi,
    sorry, i think it is a stupid question of me. but i'm a newbie in java and jws...
    So my question is...
    is it possible to get the absolute path to my downloaded an d cached jarfile? (e.g. c:\program files\java web start\.javaws\cache\http\Dmy.server.com\P80\RMmyapp.jar)
    thanks a lot for any help.

    I just answered this elsewhere, but here it is again.
    This code seems to work. I found it last year in one of the forums.
    I use it to find resources in Jars or to find images when I am in an IDE
    The "SetIcon.class" below should be changed to the class you are running from.
    Note: If you are running a class in a package, this returns the root of your application instead of the "folder" containing your package. This would mean that the "images" folder I refer to below is under the root folder, not the package folder.
    javax.swing.ImageIcon img;
    URL imgPath1;
    String imgPath2;
    imgPath1 = SetIcon.class.getProtectionDomain().getCodeSource().getLocation();
    imgPath2 = imgPath1.toString();
    imgPath2 = imgPath2.substring(6); // strip off the "file:"
    imgPath2 = imgPath2 + "images/sample.gif";
    Hope this helps,
    Hale

  • Problems with signed JAR files in JWS/JRE6 environment.

    Hello All,
    I'm encountering a problem running our desktop application as a Java Web Start deployment in a JRE 6 environment. There were never any problems when running the same application as a JWS deployment in JRE 1.4, or 5, environments. There are also currently no problems in a JRE 6 environment when running the application as a standard desktop application.
    The problem which I am having has nothing to do with launching the application. But for good measure, I verified the JNLP file with JaNeLA. A couple things we out of order, which I addressed to make JaNeLA happy, but my problem still persists. Here is my JNLP file (anonymized to protect the innocent):
    TS: 2010-10-18 17:04:46
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="$$codebase" href="$$name">
         <information>
              <title>Acme Desktop</title>
              <vendor>Acme Corporation</vendor>
              <homepage href="http://www.acme.com/"/>
              <description>Acme Client for Acme Server</description>
              <description kind="tooltip">Acme Client for Acme Server</description>
              <icon href="desktop.gif"/>
              <offline-allowed/>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <j2se version="1.5+"/>
              <jar href="acmedesktop.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/antlr-2.7.2.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/backport-util-concurrent.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/commons-codec-1.3.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/commons-httpclient.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/commons-logging.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/acmeapi.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/HelpJavaDT.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/HelpJavaDT_es.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/jacorb.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/Multivalent.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/slf4j-api-1.5.6.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/slf4j-jdk14-1.5.6.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/snow.jar" download="lazy" version="8.00.01.00+"/>
              <jar href="lib/AcmeTMClient.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/xercesImpl.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/xml-apis.jar" download="eager" version="8.00.01.00+"/>
              <extension name="installer" href="desktopInstaller.jnlp" />
              <extension name="Java Help" href="help.jnlp"/>
              <property name="java.library.path" value="./lib"/>
              <property name="admin" value="false"/>
              <property name="webstart" value="true"/>          
              <!-- The following two lines are for SSO implementation only
              <property name="urladdress" value="http://localhost:8080/AcmeDesktop/servlet/AcmeServlet"/>
              <property name="cookiespec" value="RFC2109"/>
              -->          
         </resources>
         <resources os="Windows">
              <nativelib href="lib/jniWin32.jar" version="8.00.01.00+"/>
         </resources>
         <application-desc main-class="desktop"/>     
    </jnlp>-----
    When running as a JWS deployment, on JRE 6, the application will be functioning normally for a little while, and then suddenly the following exception is thrown, and the current operation fails because the class in question cannot be accessed:
    java.lang.SecurityException: class "acmeapi.communication.CDocImpl"'s signer information does not match signer information of other classes in the same package
         at java.lang.ClassLoader.checkCerts(ClassLoader.java:807)
         at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:288)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at acmeapi.common.CDoc.getAnnotationsInfo(CDoc.java:493)
         at acmedesktop.communication.CCommunicationManager.privateGetAnnotations(CCommunicationManager.java:1976)
         at acmedesktop.communication.CCommunicationManager.getAnnotations(CCommunicationManager.java:1828)
         at acmedesktop.annotations.CViewAnnotations.getAnnotations(CViewAnnotations.java:826)
         at acmedesktop.annotations.CViewAnnotations.createView(CViewAnnotations.java:583)
         at acmedesktop.annotations.CViewAnnotations.setData(CViewAnnotations.java:736)
         at acmedesktop.annotations.CViewAnnotations.init(CViewAnnotations.java:205)
         at acmedesktop.hitspanel.CHitsPanel.viewAnnotations(CHitsPanel.java:281)
         at acmedesktop.hitspanel.CHitsTab$3.mousePressed(CHitsTab.java:316)
         at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
         at java.awt.Component.processMouseEvent(Component.java:6260)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6028)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4630)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4460)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4460)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)-----
    The classes of our desktop product are contained within the 'acmedesktop' and 'acmeapi' packages. It requires access to the hard drive of the workstation, and therefore, all jar files included with the application are signed using the following ANT task when compiled:
    <signjar keystore="resources/codesigning/keystore.pfx" storetype="pkcs12" storepass="myPassword" alias="myAlias">
         <fileset dir="${jws_dist}/app" includes="*.jar"/>
         <fileset dir="${jws_dist}/app/lib" includes="*.jar" excludes="jhall__V${dt_version}.jar"/>
    </signjar>-----
    Therefore, all classes, within all jar files, are signed with the same certificate (with the exception of the JavaHelp libraries, which are already signed by Sun - but the class in question attempting to be loaded here is not contained within the JavaHelp jar file anyway). So, the point being, that the exception message stating that the "signer information of the acmeapi.communication.CDocImpl class doesn't match the signer information of other classes in the same package", is simply not correct. All classes within that jar file were signed using the same certificate.
    I downloaded the JRE 6 source from dev.java.net and picked through this issue with a debugger. The ClassLoader.checkCerts() method compares the certificate used to sign the current class which is attempting to be loaded, with the certificates which signed all other previously loaded classes within the same package. If they don't match, the exception above is thrown. What is causing the issue is when the checkCerts() method attempts to get the certificates which signed the currently loading class, null is returned. And obviously, comparing null, with an array of the certificates which signed the previously loaded classes, isn't going to match; therefore this exception is thrown.
    The checkCerts() method gets the certificates of the currently loading class by calling the java.security.CodeSource.getCertificates() method. Tracing deeper in the debugger, the CodeSource object ultimately gets the certificates from the 'signersRef' member variable of the com.sun.deploy.cache.CachedJarFile class. signerRef is a SoftReference object and can therefore be garbage collected at some point. If it has already been garbage collected, the CachedJarFile class will attempt to retrieve it again from the loaded cache entry by calling com.sun.deploy.cache.MemoryCache.getLoadedResource().
    The MemoryCache class maintains the cache entries to the jar files as MemoryCache.CachedResourceReference objects, which subclass WeakReference, and therefore these objects can be garbage collected as well. If the cache entries have also been garbage collected, this leaves the CachedJarFile class with no ability to repopulate the CachedJarFile.signerRef object. Therefore it is completely out of luck getting the certificates which signed the currently loading class, which ultimately causes the above exception.
    When the com.sun.deploy.cache.Cache class attempts to retrieve a cache entry using its getCacheEntry() method, it will attempt to get the entry from the MemoryCache class, if null is returned, it will recreate the cache entry and add it back to the MemoryCache. In contrast, when the CachedJarFile class attempts to get a cache entry from the MemoryCache class, if null is returned, it just gives up.
    (from com.sun.deploy.cache.CachedJarFile:244)
    private CacheEntry getCacheEntry() {
         /* if it was not created by Cache do not search for entry */
         if (resourceURL == null)
              return null;
         CacheEntry ce = (CacheEntry) MemoryCache.getLoadedResource(resourceURL);
         if (ce == null) {
              //This should not happen because CacheEntry should not get collected
              // before CachedJarFile is collected.
              Trace.println("Missing CacheEntry for " + resourceURL + "\n" + ce,
                   TraceLevel.CACHE);
         return ce;
    When debugging, code execution falls within the code block with the comment stating "This should not happen...", but it is happening in my case.
    On an interesting side note, using the jvisualvm.exe tool included with JDK 6, I was able to tell that it seems as though these objects are collected the first time that the JVM allocates more heap space, and then the issue will occur. If I set the initial heap size very large (using -Xms) this issue won't occur at all. But that is kind of a bad solution which I would rather not do, but it is interesting to note for the sake of troubleshooting this issue. The max heap size (-Xmx) is plenty big enough, so the issue is not that we are running out of memory here.
    Does anyone have any insight as to what could be causing this? I've searched, and found a couple threads with similar problems but with no clear solutions. It is not just one workstation either, it happens everywhere I deploy the app as a Java Web Start application in a JRE 6 environment. I have been using version 1.6.0_18 on XP, but it seems to happen on any update version of 1.6. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?
    Thank you
    Jake
    Edited by: jkc532 on Nov 12, 2010 10:35 AM

    jkc532 wrote:
    .. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? From your comprehensive investigation and report, it seems so to me.
    ..I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?Just after read the summary I was tired, so I have some understanding of the effort you have already invested in this (the 'wits' you have already spent). I think you should raise a bug report and seek Oracle's response.

  • Questions about SPML Web Service ( OIM 9.1 )

    I need to launch a provisioning process on a target by using a generic connector (Web Service).
    Scenario:
    ==========
    Host A is where the OIM server is installed. A generic connector is defined here.
    Host B is the target where users must be created. A webservice (axis) is installed here.
    Requirements:
    ===========
    OIM server (Host A) sends a request to WebService (Host B). The Web service receives, process and sends a response with the result to the OIM server.
    Version 9.0.3
    ==============
    On Version 9.0.3 I got the expected results but a problem appeared: there wasn't feedback error control because the web service response could'nt be processed.
    I followed the next steps:
    1º deploy axis on application server
    2º write SendWSResponse.jws including public method "doProvisioning". Copy this file to ..\server\default\deploy\axis.war\
    3º compile SendWSResponse.jws (from a browser)
    4º Create generic connector (for reconciliation and provisioning). Definition of parameters and mappings.
    Note: In 9.0.3 version only three parameters were required for Web Service Definition:
    Web Service URL=http://host:8080/axis/SendWSResponse.jws
    Operation Name = doProvisioning
    SPML-->Target ID=4201
    Version 9.1
    ==============
    On the new version, the connector definition is more complicated. Also they have added an ear-application or web service (OIMSpmlWS) related to this connector .
    The first question is:
    Is this ear-application addressed to process the reponses that are sent by the target?
    The second question is:
    Must I install the OIMSpmlWS on Host B? and if the answer is affirmative, how can I include the logic to my provisioning process.
    And the most important?
    How might the connector be configured and the webServices in this usual scenario?
    Many thanks in advance

    There is no "sample" WSDL file, there is THE WSDL file. It is located in the OIMSpmlWS.ear EAR file, in spmlws.war WAR file in the directory WEB-INF/wsdl.

  • Accessing config information in XML file in a Weblogic web service (JWS)

    Problem:
    I have implemented a web service for sending emails and pages via Java Mail and SNPP respectively using WebLogic Workshop on the BEA WebLogic 8.1 platform. In the service, I use certain pieces of information that are currently stored in an XML file on disk. Also, in its current state, the web service is implemented with public methods directly in the .jws Java file and not as a session bean. The file read from disk is performed every time the web service operation to send a message is invoked. As we all know, the I/O files access is very expensive and a performance bottleneck, especially when it is incurred on every invocation of the web service ‘sendMessage’ [operation.
    Without radically re-writing the application, I am looking for a way to improve the performance of the web service and can only come up with the following 2 ways:
    1) Move the code out of the sendMessage operation: Here, the main question I have is 'to where should I move it to'? I have seen in the WebLogic Workshop documentation that WebLogic Server maintains only a single instance of a Java class that implements a Web Service operation, and each invoke of the Web Service uses this same instance. In that case, I should be able to put the code in the constructor so that the files is read only at the time the class is instantiated, but a constructor in the .jws file that contains the web service operations itself does not seem to be invoked by the container (I tried to put a breakpoint in the constructor, but it seems that the constructor code never gets called)
    2) Move the configuration variables into some type of standard configuration file of WebLogic, something like web.xml or wlw-config.xml or jws-config.properties files. But I found that these XML files have an associated schema to conform to and do not provide any custom elements or attributes that I could add for my application(is that true?). Also, if I can somehow put the configuration information into any of these standard files, how do I access it from within the application 'without' doing a file read from disk? Are these configuration file items available in memory for access and use by the web service and if they are, what API can I use to access and use them?
    Any and all ideas are welcome!
    Thanks!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I have been looking into a similar problem. Since web services are by design stateless, they aren't good for 'remembering' information between calls. Aside from a file read, the only other solution I have found is to use a database. You can make use of an entity bean or simply make some kind of JDBC call. I don't know if you need to stick with the config file, but if so maybe you could read the config data into a database once and then you might have faster access than reading from a file. I'm not sure about which would have better performace, but its all I have come up with so far. What parser are you using to read your XML file? Have you tried others to see if they have better performance?

  • DNS and Static IP Address Question on Solaris v10 X86

    I�ve recently installed Solaris v10 X86 and have two questions. The system is a Dell E521 with 4GB RAM and 1GB SysKonnect NIC, and internet is provided via a cable modem, that�s plugged into a Netgear router, and the Solaris 10 box is plugged into the Netgear router via a CAT5 ethernet cable.
    1. I can connect to my router login page using the following URL:
    http://192.168.1.1/start.htm and I can also connect to various web pages such as yahoo, if I first "ping yahoo.com" (on another machine that�s internet enabled) and then plug the web site�s ip address into the Solaris/Mozilla browser. So it appears that I haven�t been successful at pointing the Solaris x86 at a DNS server to resolve the DNS name.
    2. I've purchased a commercially available software package and it requires a static ip address for this Solaris x86 server. If the ip address changes, it�ll stop working by design and require that I reacquire the license file. When connecting through this Netgear router, how do I lock this Solaris v10 x86 server into a specific ip address? (the ip address floats presently when cycling my PC�s on/off) presently, and assume the Solaris box will too, usually through an ip range of 192.168.1.<1 through 5>
    # ifconfig -a
    lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
    inet 127.0.0.1 netmask ff000000
    skge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
    inet 192.168.1.3 netmask ffffff00 broadcast 192.168.1.255
    ether 0:0:5a:9b:1f:10
    # netstat -rn
    Routing Table: IPv4
    Destination Gateway Flags Ref Use Interface
    192.168.1.0 192.168.1.3 U 1 1 skge0
    224.0.0.0 127.0.0.1 U 1 0 lo0
    default 192.168.1.1 UG 1 0
    127.0.0.1 127.0.0.1 UH 8 163 lo0
    Some of the present Netgear router settings:
    Internet IP Address
    Get Dynamically From ISP (yes)
    Use Static IP Address      (no)
    IP Address           75.185. CROSSED-OUT3
    IP Subnet Mask      255.255.248.0
    Gateway IP Address      75.185.CROSSED-OUT4
    Domain Name Server (DNS) Address
    Get Automatically From ISP (yes)
    Use These DNS Servers (blank)
    Primary DNS      ... (blank)
    Secondary DNS      ... (blank)
    Netgear Router Status Page:
    Account Name      WGT624v3
    Hardware Version      V3H1
    Firmware Version      V2.0.16_1.0.1NA
    Internet Port
    MAC Address      00:40:ca:a8:CROSSED-OUT2
    IP Address           75.185.CROSSED-OUT3
    DHCP           DHCPClient
    IP Subnet Mask      255.255.248.0
    Domain Name Server      65.24.7.3
              65.24.7.6
    LAN Port
    MAC Address      00:18:4D:85:CROSSED-OUT1
    IP Address           192.168.1.1
    DHCP                ON
    IP Subnet Mask      255.255.255.0
    Excerpt from doing a prtconf -D command:
    pci10de,26f, instance #0 (driver name: pci_pci)
    pci1028,8010, instance #0 (driver name: hci1394)
    pci1148,5021, instance #0 (driver name: skge)
    pci1028,1ed
    pci1022,1100
    The NIC is a SysKonnect 9821 1GB Ethernet card. The drivers in Solaris 10 were apparently very old and didn't install drivers or configure/plumb when I installed Solaris 10, so I downloaded the
    latest drivers (hard to find!), followed the instructions and got the NIC drivers installed and then plumbed.
    My router's ip address appears to be 192.168.1.1 and in one of the articles I've read, there is a recommendation to create a file (touch) within /etc named defaultrouter and enter the router's ip address. I did this, and the file now contains:
    192.168.1.1
    I also read where another file called resolv.conf needed to be pointed to a DNS server, which in this case, according to my Netgear router, and according to ipconfig/all on another WinBox on the same network, also shows the same 192.168.1.1 address for the DNS, so I created that file too (wasn't there) and it contains:
    nameserver 192.168.1.1
    There is a host name file called hostname.skge0 and it contains one line:
    INTHOST
    There is a hosts file, and it contains:
    127.0.0.1 localhost loghost homex86
    192.168.1.3 INTHOST
    There is a netmasks file, and other than the commented out lines, it appears to contain one relevant line:
    192.168.1.0 255.255.255.0
    There is a nsswitch.conf file and other than the commented out lines, it contains:
    passwd: files
    group: files
    hosts: files
    ipnodes: files
    networks: files
    protocols: files
    rpc: files
    ethers: files
    netmasks: files
    bootparams: files
    publickey: files
    netgroup: files
    automount: files
    aliases: files
    services: files
    printers: user files
    auth_attr: files
    prof_attr: files
    project: files
    tnrhtp: files
    tnrhdb: files
    There is an nsswitch.dns file:
    passwd: files
    group: files
    ipnodes: files dns
    networks: files
    protocols: files
    rpc: files
    ethers: files
    netmasks: files
    bootparams: files
    publickey: files
    netgroup: files
    automount: files
    aliases: files
    services: files
    printers: user files
    auth_attr: files
    prof_attr: files
    project: files
    tnrhtp: files
    tnrhdb: files
    Finally, I've also seen some advice using the folling command (and I tried it):
    "route add default 192.168.1.1" as an alternative method of setting up route table
    The only other command I've tried is:
    "ifconfig skge0 192.168.1.1 netmask 255.255.255.0 up" but I suspect that was redundant as the plumb command I used to get the NIC functioning earlier probably already provided what was needed.
    Finally, on this small network, I ran an ipconfig/all on a Windows based PC, to see what network settings were reported through the wireless connection, and this is an excerpt of that information:
    C:\Documents and Settings\mark_burke>ipconfig/all
    Windows IP Configuration
    Ethernet adapter Local Area Connection:
    Media State . . . . . . . . . . . : Media disconnected
    Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Controller
    Physical Address. . . . . . . . . : (withheld)
    Ethernet adapter {xxxxxxxx}:
    Connection-specific DNS Suffix . :
    Description . . . . . . . . . . . : Nortel IPSECSHM Adapter - Packet Scheduler Min
    iport
    Physical Address. . . . . . . . . : (withheld)
    Dhcp Enabled. . . . . . . . . . . : No
    IP Address. . . . . . . . . . . . : 0.0.0.0
    Subnet Mask . . . . . . . . . . . : 0.0.0.0
    Default Gateway . . . . . . . . . :
    Ethernet adapter Wireless Network Connection:
    Connection-specific DNS Suffix . :
    Description . . . . . . . . . . . : Dell Wireless 1370 WLAN Mini-PCI Card
    Physical Address. . . . . . . . . : (withheld)
    Dhcp Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    IP Address. . . . . . . . . . . . : 192.168.1.2
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.1.1
    DHCP Server . . . . . . . . . . . : 192.168.1.1
    DNS Servers . . . . . . . . . . . : 192.168.1.1

    I�ve recently installed Solaris v10 X86 and have two
    questions. The system is a Dell E521 with 4GB RAM
    and 1GB SysKonnect NIC, and internet is provided via
    a cable modem, that�s plugged into a Netgear router,
    and the Solaris 10 box is plugged into the Netgear
    router via a CAT5 ethernet cable.
    1. I can connect to my router login page using the
    following URL:
    http://192.168.1.1/start.htm and I can also connect
    to various web pages such as yahoo, if I first "ping
    yahoo.com" (on another machine that�s internet
    enabled) and then plug the web site�s ip address into
    the Solaris/Mozilla browser. So it appears that I
    haven�t been successful at pointing the Solaris x86
    at a DNS server to resolve the DNS name.You can either copy nsswitch.dns to nsswitch.conf, or you can modify nsswitch.conf so that 'dns' is used for hostname lookups.
    2. I've purchased a commercially available software
    package and it requires a static ip address for this
    Solaris x86 server. If the ip address changes, it�ll
    stop working by design and require that I reacquire
    the license file. When connecting through this
    Netgear router, how do I lock this Solaris v10 x86
    server into a specific ip address? (the ip address
    floats presently when cycling my PC�s on/off)
    presently, and assume the Solaris box will too,
    usually through an ip range of 192.168.1.<1 through
    5>One method is setting the router so that the server's MAC address is tied to a specific IP.
    Otherwise you can edit /etc/hostname.<interface> and place a static address there, forgoing DHCP services from the router. You may want the address to appear outside the router's DHCP range.
    Darren

  • How to use @jws:sql call Stored Procedure from Workshop

    Is there anyone know how to use @jws tag call Sybase stored procedure within
    Workshop,
    Thanks,

    Anurag,
    Do you know is there any plan to add this feature in future release? and
    when?
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    In the current release, we do not support calling stored procedures from a
    database control. You will have to write JDBC code in the JWS file to call
    stored procedures.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Anurag,
    I know how to use DB connection pool and create a db control with it. In
    fact, we have created a Web Service with the db control using plain SQL
    in
    @jws:sql. However, my question here is how to use @jws tag in Weblogic
    Workshop to create a Web Services based on Sybase stored procedure orany
    Stored Proc not plain SQL.
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    You can use a database control to obtain a connection from any JDBC
    Connection Pool configured in the config.xml file. The JDBC Connectionpool
    could be connecting to any database, the database control is
    independent
    of
    that.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Is there anyone know how to use @jws tag call Sybase stored
    procedure
    within
    Workshop,
    Thanks,

  • Whats my web server - JWS or apache

    Folks-
    How do I know if my ifs setup is using JWS or Apache?
    Thanks in advance.
    Ramana

    Ramana,
    simple way. Try running ifsstop script from your $ORACLE_HOME/ifs/bin directory. If your ifs is running on JWS, you will be asked for the admin user password. If it is on apache, this question will not arise....
    Hope this helps,
    Rajesh

Maybe you are looking for