Listening for HttpURLConnections ?

hi,
I have implemented a client opening a HttpURLConnection to send an image to a servlet.
I would like to know how should be the code on the server, listening for httpURLconnections... can you give me some tip ?
Here is the client code... What I need is the server code... I want to save the file to hard disk, when a post is performed.
thanks
URL url;
          HttpURLConnection connection = null;
          try {;
               //Create connection
               url = new URL("http://localhost:8080/Sender");
               connection = (HttpURLConnection)url.openConnection();
               connection.setRequestMethod("POST");
               connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
               connection.setRequestProperty("Connection","Keep-Alive");
               connection.setUseCaches (false);
               connection.setDoInput(true);
               connection.setDoOutput(true);
               connection.connect();
               //Send request
               DataOutputStream dataStream = new DataOutputStream (connection.getOutputStream());
               File uploadFile = new File("../toSend/file.png");
               FileInputStream fileInputStream = new FileInputStream(uploadFile);
               try
               // create a buffer of maximum size
int bytesAvailable = fileInputStream.available();
int maxBufferSize = 1024;
int bufferSize = Math.min(bytesAvailable, maxBufferSize);
byte[] buffer = new byte[bufferSize];
// read file and write it into form...
int bytesRead = fileInputStream.read(buffer, 0, bufferSize);
while (bytesRead > 0)
dataStream.write(buffer, 0, bufferSize);
bytesAvailable = fileInputStream.available();
bufferSize = Math.min(bytesAvailable, maxBufferSize);
bytesRead = fileInputStream.read(buffer, 0, bufferSize);
// closing CRLF
dataStream.writeBytes("\r\n");
          catch(Exception e)
          System.out.println("Exception: " + e.getMessage());
               //dataStream.writeBytes(urlParameters);
               dataStream.flush ();
               dataStream.close ();
Edited by: aneuryzma on Jan 7, 2010 8:28 PM

aneuryzma wrote:
hi,
I have implemented a client opening a HttpURLConnection to send an image to a servlet.
I would like to know how should be the code on the server, listening for httpURLconnections... can you give me some tip ?
Here is the client code... What I need is the server code... I want to save the file to hard disk, when a post is performed.And you want to use a servlet to do that? Then your google keywords are "file upload servlet". I recommend the links which recommend using Apache software in your servlet.

Similar Messages

  • PopUpAnchor listening for Scrolling

    I have a PopUpAnchor, and when I scroll I need the position to update. So I'm calling the updatePopUpTransform() method.
    When you use the scrollbar everything is good. However, when you scroll using the wheel, the updatePopUpTransform seems to be off by about 1 scroll. So if I need my PopUpAnchor to be right at the bottom of something on screen, now there is a gap between them. This doesn't happen when you scroll using the scrollbar though. Anyone have any ideas why these 2 are working differently?
    Here's some of my code:
      this.grid.addEventListener( ScrollEvent.SCROLL, myCallBack );
      this.grid.addEventListener( MouseEvent.MOUSE_WHEEL, myCallBack);
    And in my call back:
    this.myPopup.updatePopUpTransform();
    I've even tried having myCallBack just called from a single Event.SCROLL event, and that doesn't work either. Same results.
    Thanks for the help!

    aneuryzma wrote:
    hi,
    I have implemented a client opening a HttpURLConnection to send an image to a servlet.
    I would like to know how should be the code on the server, listening for httpURLconnections... can you give me some tip ?
    Here is the client code... What I need is the server code... I want to save the file to hard disk, when a post is performed.And you want to use a servlet to do that? Then your google keywords are "file upload servlet". I recommend the links which recommend using Apache software in your servlet.

  • Use 1 listener for multiple database in a server

    hi guys,
    just want to check whether this is the right way to configure my Listener.ORA . I am using 1 listener.ora to listen for incoming request connection from remote client. There are multiple databases installed in a server.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O11R2)
    (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
    (SID_NAME = O11R2)
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O10G)
    (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
    (SID_NAME = O10G)
    )sorry i am reading about it so did not install another database to test out. Just thinking in the line that it mention that the list of SID is refering to the multiple database that is installed in a server and i am using 1 listener.
    Please further advice.

    Shivananda Rao wrote:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O11R2)
    (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
    (SID_NAME = O11R2)
    (SID_DESC =
    (GLOBAL_DBNAME = O10G)
    (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
    (SID_NAME = O10G)
    )Please use as above. You can have one listener for multiple databases.right right so it the pattern goes like this:
    SID_LIST_LISTENER =
         (SID_LIST =
              (SID_DESC =
              (GLOBAL_DBNAME = AAAA)
              (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
              (SID_NAME = AAAA)
              (SID_DESC =
              (GLOBAL_DBNAME = BBBB)
              (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
              (SID_NAME = BBBB)
         )thanks !

  • How to configure multiple listeners to listen for the same instance.

    Hello everyone,
    I am running oracle database 11g and I want information regarding how to configure multiple listeners to listen for the same database instance. Actually I know how to configure more than one listener but the main thing that I am confused about is when we create listener.ora file, do we have to statically register the database instance with both the listeners or the instance will register itself with both the listeners.
    According to my knowledge the instance will register with the listener specified by LOCAL_LISTENER parameter and we cannot have more than one value for this parameter.
    Please only give detailed answers with example as I am tired of simple answers with details that I already know.

    Hello,
    Yes, it can make sense to have several listener for one Oracle instance. For instance you may have one listener for the applications another listener for DBA administration tasks as well as one listener dedicated to dataguard broker. It is not possible to have several listeners listening on the same IP and Port.
    By default the database try to automatically register to a listener on port 1521. To instruct the instance to register to a specifc list of listeners you can add in the init.ora the local_listener parameter with an alias definition:
    i.e
    local_listener=MY_SET_OFF_LISTENERS
    in your tnsname.ora add an entry called:
    MY_SET_OFF_LISTENERS_LOCAL= (ADDRESS_LIST=
    (ADRESS=(PROTOCOL=TCP)(HOST=myhostname)(PORT=1530))
    (ADRESS=(PROTOCOL=TCP)(HOST=myhostname)(PORT=1531))
    (ADRESS=(PROTOCOL=TCP)(HOST=myhostname)(PORT=1532))
    In this sample your instance will register to three listeners listening on respectively port 1530, 1531 and 1532
    If you want your clients can be balanced over the 3 listeners

  • One Listener for multiple things?

    Is is OK to use on listener for multiple events on the same object?
    I have this for a FLV component and it seems to work. Is that legit?
    var listenerObject:Object = new Object();
    listenerObject.complete = function(eventObject:Object):Void {
        trace("End of this video!!!!");
    myVideo.addEventListener("complete", listenerObject);
    listenerObject.stateChange = function(eventObject:Object):Void {
        trace("stateChange just occurd!!!");
    myVideo.addEventListener("stateChange", listenerObject);
    Thanks a lot for any info!!!

    Yup no problem. However I would group my listener object properties close together.
    listenerObject.complete=function(e:Event){
    // blah blah
    listenObject.progress=function(e:Event){
    // blah blah blah
    And so on. If they end up separated you most likely will forget over the course of time and then when you come back you might delete the object after you use it for one event and forget that it has others.

  • Huge performance differences between a map listener for a key and filter

    Hi all,
    I wanted to test different kind of map listener available in Coherence 3.3.1 as I would like to use it as an event bus. The result was that I found huge performance differences between them. In my use case, I have data which are time stamped so the full key of the data is the key which identifies its type and the time stamp. Unfortunately, when I had my map listener to the cache, I only know the type id but not the time stamp, thus I cannot add a listener for a key but for a filter which will test the value of the type id. When I launch my test, I got terrible performance results then I tried a listener for a key which gave me much better results but in my case I cannot use it.
    Here are my results with a Dual Core of 2.13 GHz
    1) Map Listener for a Filter
    a) No Index
    Create (data always added, the key is composed by the type id and the time stamp)
    Cache.put
    Test 1: Total 42094 millis, Avg 1052, Total Tries 40, Cache Size 80000
    Cache.putAll
    Test 2: Total 43860 millis, Avg 1096, Total Tries 40, Cache Size 80000
    Update (data added then updated, the key is only composed by the type id)
    Cache.put
    Test 3: Total 56390 millis, Avg 1409, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 4: Total 51734 millis, Avg 1293, Total Tries 40, Cache Size 2000
    b) With Index
    Cache.put
    Test 5: Total 39594 millis, Avg 989, Total Tries 40, Cache Size 80000
    Cache.putAll
    Test 6: Total 43313 millis, Avg 1082, Total Tries 40, Cache Size 80000
    Update
    Cache.put
    Test 7: Total 55390 millis, Avg 1384, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 8: Total 51328 millis, Avg 1283, Total Tries 40, Cache Size 2000
    2) Map Listener for a Key
    Update
    Cache.put
    Test 9: Total 3937 millis, Avg 98, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 10: Total 1078 millis, Avg 26, Total Tries 40, Cache Size 2000
    Please help me to find what is wrong with my code because for now it is unusable.
    Best Regards,
    Nicolas
    Here is my code
    import java.io.DataInput;
    import java.io.DataOutput;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Map;
    import com.tangosol.io.ExternalizableLite;
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    import com.tangosol.util.Filter;
    import com.tangosol.util.MapEvent;
    import com.tangosol.util.MapListener;
    import com.tangosol.util.extractor.ReflectionExtractor;
    import com.tangosol.util.filter.EqualsFilter;
    import com.tangosol.util.filter.MapEventFilter;
    public class TestFilter {
          * To run a specific test, just launch the program with one parameter which
          * is the test index
         public static void main(String[] args) {
              if (args.length != 1) {
                   System.out.println("Usage : java TestFilter 1-10|all");
                   System.exit(1);
              final String arg = args[0];
              if (arg.endsWith("all")) {
                   for (int i = 1; i <= 10; i++) {
                        test(i);
              } else {
                   final int testIndex = Integer.parseInt(args[0]);
                   if (testIndex < 1 || testIndex > 10) {
                        System.out.println("Usage : java TestFilter 1-10|all");
                        System.exit(1);               
                   test(testIndex);               
         @SuppressWarnings("unchecked")
         private static void test(int testIndex) {
              final NamedCache cache = CacheFactory.getCache("test-cache");
              final int totalObjects = 2000;
              final int totalTries = 40;
              if (testIndex >= 5 && testIndex <= 8) {
                   // Add index
                   cache.addIndex(new ReflectionExtractor("getKey"), false, null);               
              // Add listeners
              for (int i = 0; i < totalObjects; i++) {
                   final MapListener listener = new SimpleMapListener();
                   if (testIndex < 9) {
                        // Listen to data with a given filter
                        final Filter filter = new EqualsFilter("getKey", i);
                        cache.addMapListener(listener, new MapEventFilter(filter), false);                    
                   } else {
                        // Listen to data with a given key
                        cache.addMapListener(listener, new TestObjectSimple(i), false);                    
              // Load data
              long time = System.currentTimeMillis();
              for (int iTry = 0; iTry < totalTries; iTry++) {
                   final long currentTime = System.currentTimeMillis();
                   final Map<Object, Object> buffer = new HashMap<Object, Object>(totalObjects);
                   for (int i = 0; i < totalObjects; i++) {               
                        final Object obj;
                        if (testIndex == 1 || testIndex == 2 || testIndex == 5 || testIndex == 6) {
                             // Create data with key with time stamp
                             obj = new TestObjectComplete(i, currentTime);
                        } else {
                             // Create data with key without time stamp
                             obj = new TestObjectSimple(i);
                        if ((testIndex & 1) == 1) {
                             // Load data directly into the cache
                             cache.put(obj, obj);                         
                        } else {
                             // Load data into a buffer first
                             buffer.put(obj, obj);                         
                   if (!buffer.isEmpty()) {
                        cache.putAll(buffer);                    
              time = System.currentTimeMillis() - time;
              System.out.println("Test " + testIndex + ": Total " + time + " millis, Avg " + (time / totalTries) + ", Total Tries " + totalTries + ", Cache Size " + cache.size());
              cache.destroy();
         public static class SimpleMapListener implements MapListener {
              public void entryDeleted(MapEvent evt) {}
              public void entryInserted(MapEvent evt) {}
              public void entryUpdated(MapEvent evt) {}
         public static class TestObjectComplete implements ExternalizableLite {
              private static final long serialVersionUID = -400722070328560360L;
              private int key;
              private long time;
              public TestObjectComplete() {}          
              public TestObjectComplete(int key, long time) {
                   this.key = key;
                   this.time = time;
              public int getKey() {
                   return key;
              public void readExternal(DataInput in) throws IOException {
                   this.key = in.readInt();
                   this.time = in.readLong();
              public void writeExternal(DataOutput out) throws IOException {
                   out.writeInt(key);
                   out.writeLong(time);
         public static class TestObjectSimple implements ExternalizableLite {
              private static final long serialVersionUID = 6154040491849669837L;
              private int key;
              public TestObjectSimple() {}          
              public TestObjectSimple(int key) {
                   this.key = key;
              public int getKey() {
                   return key;
              public void readExternal(DataInput in) throws IOException {
                   this.key = in.readInt();
              public void writeExternal(DataOutput out) throws IOException {
                   out.writeInt(key);
              public int hashCode() {
                   return key;
              public boolean equals(Object o) {
                   return o instanceof TestObjectSimple && key == ((TestObjectSimple) o).key;
    }Here is my coherence config file
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>test-cache</cache-name>
                   <scheme-name>default-distributed</scheme-name>
              </cache-mapping>
         </caching-scheme-mapping>
         <caching-schemes>          
              <distributed-scheme>
                   <scheme-name>default-distributed</scheme-name>
                   <backing-map-scheme>
                        <class-scheme>
                             <scheme-ref>default-backing-map</scheme-ref>
                        </class-scheme>
                   </backing-map-scheme>
              </distributed-scheme>
              <class-scheme>
                   <scheme-name>default-backing-map</scheme-name>
                   <class-name>com.tangosol.util.SafeHashMap</class-name>
              </class-scheme>
         </caching-schemes>
    </cache-config>Message was edited by:
    user620763

    Hi Robert,
    Indeed, only the Filter.evaluate(Object obj)
    method is invoked, but the object passed to it is a
    MapEvent.<< In fact, I do not need to implement EntryFilter to
    get a MapEvent, I could get the same result (in my
    last message) by writting
    cache.addMapListener(listener, filter,
    true)instead of
    cache.addMapListener(listener, new
    MapEventFilter(filter) filter, true)
    I believe, when the MapEventFilter delegates to your filter it always passes a value object to your filter (old or new), meaning a value will be deserialized.
    If you instead used your own filter, you could avoid deserializing the value which usually is much larger, and go to only the key object. This would of course only be noticeable if you indeed used a much heavier cached value class.
    The hashCode() and equals() does not matter on
    the filter class<< I'm not so sure since I noticed that these methods
    were implemented in the EqualsFilter class, that they
    are called at runtime and that the performance
    results are better when you add them
    That interests me... In what circumstances did you see them invoked? On the storage node before sending an event, or upon registering a filtered listener?
    If the second, then I guess the listeners are stored in a hash-based map of collections keyed by a filter, and indeed that might be relevant as in that case it will cause less passes on the filter for multiple listeners with an equalling filter.
    DataOutput.writeInt(int) writes 4 bytes.
    ExternalizableHelper.writeInt(DataOutput, int) writes
    1-5 bytes (or 1-6?), with numbers with small absolute
    values consuming less bytes.Similar differences exist
    for the long type as well, but your stamp attribute
    probably will be a large number...<< I tried it but in my use case, I got the same
    results. I guess that it must be interesting, if I
    serialiaze/deserialiaze many more objects.
    Also, if Coherence serializes an
    ExternalizableLite object, it writes out its
    class-name (except if it is a Coherence XmlBean). If
    you define your key as an XmlBean, and add your class
    into the classname cache configuration in
    ExternalizableHelper.xml, then instead of the
    classname, only an int will be written. This way you
    can spare a large percentage of bandwidth consumed by
    transferring your key instance as it has only a small
    number of attributes. For the value object, it might
    or might not be so relevant, considering that it will
    probably contain many more attributes. However, in
    case of a lite event, the value is not transferred at
    all.<< I tried it too and in my use case, I noticed that
    we get objects nearly twice lighter than an
    ExternalizableLite object but it's slower to get
    them. But it is very intersting to keep in mind, if
    we would like to reduce the network traffic.
    Yes, these are minor differences at the moment.
    As for the performance of XMLBean, it is a hack, but you might try overriding the readExternal/writeExternal method with your own usual ExternalizableLite implementation stuff. That way you get the advantages of the xmlbean classname cache, and avoid its reflection-based operation, at the cost of having to extend XMLBean.
    Also, sooner or later the TCMP protocol and the distributed cache storages will also support using PortableObject as a transmission format, which enables using your own classname resolution and allow you to omit the classname from your objects. Unfortunately, I don't know when it will be implemented.
    >
    But finally, I guess that I found the best solution
    for my specific use case which is to use a map
    listener for a key which has no time stamp, but since
    the time stamp is never null, I had just to check
    properly the time stamp in the equals method.
    I would still recommend to use a separate key class, use a custom filter which accesses only the key and not the value, and if possible register a lite listener instead of a heavy one. Try it with a much heavier cached value class where the differences are more pronounced.
    Best regards,
    Robert

  • How do I listen for changes in a container's components?

    I have a JScrollPane that contains a JTextPane. I want any Container that can possibly contain my JScrollPane to be able to listen for changes in the JTextPane's Document.
    For example, at the moment I'm using a JTabbedPane to hold a number of my JScrollPanes and I want to alter the tab title when any associated JScrollPane-JTextPane-Document is updated.
    Any suggestions on how best to handle this?

    I would use a controller object that manages all your gui components (tabs, scrolls, documents, text panes). Your controller object can register as a listener to the appropriate component, and when it changes, update the title of a tab (or do whatever else) as appropriate.
    Never put business logic like this stuff inside the actual gui components. Create, layout, etc. all the gui components (and related components like Document) from another controller like object instead. It makes handling the various listener stuff like this much easier. Read up on MVC (model view controller) stuff for more info.
    As for the actual mechanics, you could get the document that is used in the JTextPane and register as a DocumentListener. As a document listener, you get notified of all changes that are made to that document.

  • How to stop and start MDBs to listen for JMS messages

    Hello! This might be more of an architecture question rather than a technical questing, but I post it here, in the lack of a better place...
    For several years I have been using Webster and Webster MQ to send messages back and forth to clients. The architecture for the middleware platform has been designed around the functionality of ListenerPorts. Listenerports is a Webster functionality that let you "stop" and start to listen to JMS messages for a given MDB either by admin console, or by JMX.
    The arhitecture we used was something like this :
    1.Client sends a persistent message to a queue. (order)
    2. An MDB pics up the order message, calls a SessionBean that "fronts" the IIOP back end system.
    This is quite "out of the box" architecture, but we used the Listenerports to solve a stability problem for our back end system.
    The backEnd system was quite unstable, so the EJB threw an exception (typically because of timeout or connection refused) back to the MDB.
    The Listenerport was "defined" to handle 3 errors before stopping, so the MDB resent the message twice before the listenerport automatically stopped. The nice thing about this feature was that the client could continue to send orders, and was not bothered when the back end system was down.
    When the backEnd system was up and running, we could start the listenerport and it was all back to normal state. We even had a start script that checked the state of the listenerport every 30 minute, and started it automatically if it was stopped, making the admin task of starting the MDB unnecessary..
    Now.. Why am I telling this story..
    I would like to know how this could be done using "clean" J2EE technologies..That is..Not using any technology that is not portable..
    I`m playing with glassfish at home, and it struck me that there is nothing in the J2EE spec that defines the functionality described above ? Am i missing something ?
    I Do not want to stop My application because the back end system is down? That is the only way (i know of) that i can "stop" to listen for messages..
    I can put all the messages on an error queue when the backbend system is down, but that would lead to more code just to handle the error messages. Maybe the easiest way to solve this is to "move" (programmatically) all messages from the error queue over to the "standard" queue every XX minute, but somehow that sounds "wrong"
    Can anyone give me some advice to how this problem situation should be solved ? I`m interested in the solution both from an architectural perspective and from a more technical perspective..
    Best regards
    Hans-Jacob Melby

    Breakpoints, whether normal or conditional, are just meant for debugging of your code.  I had the sense from your question that the pausing you want to do is a part of normal operation of your code.  I would NOT recommend using a breakpoint for that situation.  It would bring up the block diagram showing the breakpoint when it occurs.  A user besides the programmer would not know what to do in that case.
     Yes, both the inner and outer loops would have shift registers.
    Putting a case structure with a small while loop inside the "Pausing Case" is doable.  It just depends on what you are doing or waiting for while the program operation is "paused".

  • On starting WebLogic getting Error : Listening for transport dt_socket at address: 8453 Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m

    Hi,
    system i am using for Oracle SOA is :
    Windows 64 Bit
    i5 Processor
    6 GB RAM
    29 GB on C Drive is already free after installation of all SOA related products.
    I have installed wlserver_10.3 for SOA 11g Development purpose and followed exact installation sequence and procedure as mention in oracle documentation
    i created domain also and every thing look correct but after installation procedure there are "Additional actions required just after every thing installed" :
    setting memory limit
    starting weblogic server (Admin Server)
    starting weblogic managed server
    and so on
    now Problem is when i execute C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin startWebLogic.cmd
    as mention in oracle documentation i am getting following error message : (i have only included last error lines instead of complete console log)
    oConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1036\profiles\default\
    sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_oepe180\profiles\default\syse
    xt_manifest_classpath;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\sysext_ma
    nifest_classpath;C:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manif
    est_classpath  weblogic.Server
    Listening for transport dt_socket at address: 8453
    Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m
    Caused by: java.lang.ClassNotFoundException: vXmx512m
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: ++Xmx512m.  Program will exit.
    Now to resolve this what i already tried are :
    I change JAVA_HOME and PATH to jdk6 which came with web logic installer
    Location is at :
    JAVA_HOME : C:\Oracle\Middleware\jdk160_29
    PATH : C:\Oracle\Middleware\jdk160_29\bin
    The above dose not include any space between path
    I ran the startWebLogic.cmd and got same error
    After that I also added
    CLASSPATH : C:\Oracle\Middleware\jdk160_29\lib\tool.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\jdk160_29\bin
    WL_HOME:  C:\Oracle\Middleware\wlserver_10.3
    I ran the startWebLogic.cmd and got same error
    I also used earlier path which I used with eclipse when I was working on other java development.
    JAVA_HOME : C:\Program Files\Java\jdk1.7.0_21
    PATH : C:\Program Files\Java\jdk1.7.0_21\bin
    I ran the startWebLogic.cmd and got same error
    Then I also gave PATH: C:\Oracle\Middleware\wlserver_10.3\server\lib      (including the existing one using ; )
    I ran the startWebLogic.cmd and got same error
    Now may be there is a file called setSOADomainEnv.cmd in
    < C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\ setSOADomainEnv.cmd>
    That include some values for memory set :
    set JAVA_OPTIONS=%JAVA_OPTIONS%
    set DEFAULT_MEM_ARGS=-Xms512m –Xmx512m
    set PORT_MEM_ARGS=-Xms512m –Xmx768m
    if "%JAVA_VENDOR%" == "Oracle" goto OracleJVM
    set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m -XX:MaxPermSize=768m
    set PORT_MEM_ARGS=%PORT_MEM_ARGS% -XX:PermSize=256m -XX:MaxPermSize=768m
    now as I change the red highlighted value to 512 value because I have less memory resource and I checked in installation documentation to change the above red highlighted value to 512 original is 1024 which is too high and it was crating problem and showing memory space problem so I change it to 512 and now I am not getting that memory space problem error but may be the above error is related with change value in setSOADomainEnv.cmd file or not
    Following are my domain, weblogic and soa home directory path and all these path are exactly what it suppose to be according to Oracle Installation Documentation:
    WebLogic :
    C:\Oracle\Middleware\wlserver_10.3
    C:\Oracle\Middleware\coherence_3.7
    C:\Oracle\Middleware\oepe_11.1.1.8.0
    SOA Oracle Home Directory :
    C:\Oracle\Middleware\Oracle_SOA1
    OSB Home Location :
    C:\Oracle\Middleware\Oracle_OSB1
    Domain name : soa_div_domain
    Domain Location :       C:\Oracle\Middleware\user_projects\domains
    Application Location :  C:\Oracle\Middleware\user_projects\applications
    Domain Location:        C:\Oracle\Middleware\user_projects\domains\soa_div_domain
    form here i am trying to start weblogic : C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\startWebLogic.cmd
    Please tell me any body want more details.
    Thanks.

    I think you are missing a character '-'
    USER_MEM_ARGS="Xms512m -Xmx512m -XX:MaxPermSize=128m"Add this character like follows
    "-Xms512m -Xmx512m -XX:MaxPermSize=128m"

  • Listening for the end of a movie

    Hi, I have some code that loads a movieclip into an empty
    clip
    var container:MovieClip =
    this.createEmptyMovieClip("container", this.getNextHighestDepth());
    container.attachMovie("twdc_mc", "twdc_mc", 1, {_x:300,
    _y:275});
    then i want to wait until the end of the movieclip, unload it
    and load another in its place - all without leaving frame one of my
    main timeline...so my initial thought was to add this:
    function getframes(numFrames,totalFrames) {
    if (numFrames == totalFrames){
    trace("removed") //changed the return variable to this for
    testing
    container.twdc_mc.onEnterFrame =
    getframes(container.twdc_mc._currentframe,container.twdc_mc._totalframes);
    (the use of a function because i want to re-use it)
    the problem is that the if statement is parsed and evaluated
    to false immediately, then it moves on to the next statement
    without looking back despite the existance of the onEnterFrame
    function
    So my question is how can I listen for this event without the
    need to add unLoad or removeMovieClip to the end of the offending
    mc?
    Thankyou in advance for any replies, I'm trying hard to get
    to grips with "as" but Im a php boy at heart and really struggling!
    Sam

    Hi Sam,
    in AS, you can't pass parameters to an event or callback
    function like onEnterFrame this way. You can either pass a function
    reference (without brackets, otherwise the function would execute
    immediately and the event is undefined after that):
    container.twdc_mc.onEnterFrame = getframes;
    or define a function 'on the fly':
    container.twdc_mc.onEnterFrame = function(){
    Since you want to use the first way, getframes() can't have
    any parameters, but instead it can use the scope of the event it is
    bound to through the 'this' keyword:
    function getframes() {
    // trace(this._totalframes);
    if (this._currentframe == this._totalframes){
    trace("removed")
    Now 'this' depends on the scope in which getframes() is
    called, so you can use it with the onEnterFrame event of the loaded
    clip:
    container.twdc_mc.onEnterFrame = getframes;
    and it will compare twdc_mc's position to it's end. Bound to
    another MC it would take that MC's values.
    cheers,
    blemmo

  • Issue with setting an Action Listener for a Command Button

    Hi all,
    I'm trying to set an action listener for a CoreCommanButton in a backing bean. Here's my code:
         CoreCommandButton editBtn = new CoreCommandButton();
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",null);
              editBtn.setActionListener(mb);
    //Action listener method
         public void doButtonAct(ActionEvent actionEvent)
    I keep getting a javax.faces.el.MethodNotFoundException error. However when I remove the ActionEvent parameter in doButtonAct(), I get a wrong number of arguments error.
    So i'm guessing there is something wrong with the parameters i accept in my action listener method. what can be causing this issue?
    Cheers.

    I figured this out.
    Since doButtonAct() requires an ActionEvent object as a parameter, i needed to define the parameter type when I create the method binding.
    Solution:
         Class argsString[] = new Class[] { ActionEvent.class };
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",argsString);

  • Table event listener for both columns and rows

    My table listener only gives me the printed values when I click on different rows and not when I click on different columns. Do I need 2 listeners (one inside the other one) to get a change recorded each time I click on a cell in the table? Here is the listener code:
          ListSelectionModel rowSM1 = jTable1.getSelectionModel();
          rowSM1.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
              System.out.println("I am here");
              ListSelectionModel lsm = (ListSelectionModel)e.getSource();
              if (e.getValueIsAdjusting()) {
                return;
              if (lsm.isSelectionEmpty()) {
                //no rows are selected
              else {
                selectedSiteRow = new Integer(lsm.getMinSelectionIndex() + 1).toString();
                System.out.println("selectedSiteRow = " + selectedSiteRow);
                SetupNum = selectedSiteRow; // row that the user selected
                ObjectNum = "1";
                objnum = "1";
                dataModels.remove("O"); // remove the object tables from the dataModels hashtable
                dataModels.remove("P"); // remove the object tables from the dataModels hashtable
                for (int i = 0; i < wholefile.size(); i++) {
                  setupnum = selectedSiteRow;
                  if (wholefile.elementAt(i).toString().charAt(0) == 'O') {
                    processLine(wholefile.elementAt(i).toString(), columnNamesO);
                    String keyO = "O";
                    DefaultTableModel modelO = (DefaultTableModel)dataModels.get(keyO);
                    jTable2.setModel(modelO); // change the table to the new table model
                  if (wholefile.elementAt(i).toString().charAt(0) == 'P') {
                    processLine(wholefile.elementAt(i).toString(), columnNamesP);
                    String keyP = "P";
                    DefaultTableModel modelP = (DefaultTableModel)dataModels.get(keyP);
                    jTable3.setModel(modelP); // change the table to the new table model
        );The words "I am here" only appear when I click on rows and not when I click on columns of that same row. Anyone know why?
    Also, each time I click on a row, "I am here" appears 2 times. I know I read that someone else had that problem. I will try to find the solution to that one in the forum.
    Thanks.
    Allyson

    I found out how to get the column, but I can't seem to get them together. Here is the listener for the column:
          ListSelectionModel colSM1 = jTable1.getColumnModel().getSelectionModel();
          colSM1.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
              if (e.getValueIsAdjusting()) {
                return;
              ListSelectionModel lsm = (ListSelectionModel)e.getSource();
              if (lsm.isSelectionEmpty()) {
                //no columns are selected
              else {
                SelectedC = lsm.getMinSelectionIndex();
          });These are 2 different listeners and I really want to find out what row,column has changed. Is there any way to combine these somehow? Thanks.
    Allyson

  • How do I listen for change in the global position of a Node

    Hi there,
    I want to create a Wire/Connection node between two scene nodes. I want this Wire node to be updated when one of the nodes is moving. In the common scenario I would listen for change events in the target nodes position and update the Wire :
    targetNode1.translateXProperty().addListener(new ChangeListener<Number>() {
    public void changed(ObservableValue value, Number oldValue, Number newValue) {             
    wire.setStartX(targetNode1.getTranslateX());
    wire.setStartX(targetNode1.getTranslateY());
    wire.setEndX(targetNode2.getTranslateX());
    wire.setEndY(targetNode2.getTranslateY());
    The problem is that the target nodes are children of another container nodes(that are actually moving). So listening for change events in the translate properties of the target nodes does not work(their parent nodes are actually moving)
    Is there way to listent for change in the global position of the target nodes relative to the Scene?

    It sounds very similar to a problem I posted about earlier...
    How to implement a UI similar to a UML Diagram with connections?
    I ended up making my own special bounds property, that updates when the parent's special bounds property changes.
    I also had to listen to the parentProperty change event to add/remove my listener on the parent node.
    All in all, a pain in the butt. There should be an easier way.
    The shortcoming of the solution is that all the nodes in the hierarchy must have my special bounds property implemented (ie. they're all classes under my codebase such that I can implement it), which for the moment is true... I'd like a cleaner solution however.

  • Is there a way to have the same action listener for few buttons?

    guys, lets say i have button1, button2 and button3
    how do i add the same action listener for 3 of them. doing 3 different action listener is very tedius! my assignment have almots 100 buttons but I need their action listener to be the same.

    Hi,
    Your class needs an action listener, so add implements ActionListener to you class creation string.
    Then on each button set an action command;
    button1.setActionCommand(BUTTON1);Now add an listener;
    buttons1.addActionListener(this);Finally create a method to perform a task
    public void actionPerformed(ActionEvent e)
       if (e.getActionCommand().equals(BUTTON1))
           xxxx   
      }This should do the trick.
    adelebt

  • Creating a generic selection listener for af:table

    Hi,
    I'm using JDeveloper 11.1.1.5.0, and I have a simple requirement to set up a custom selection listener for an af:table component.
    So far, I was doing this by using a custom function to invoke the EL to perform the makeCurrent operation. However, I came across Frank Nimphius' PDF on how to build a generic selection listener, and this seemed like a better way to go about it. The problem is, the CollectionModel class used in the sample code is now deprecated. Is anyone aware of the currently supported way to implement a generic selection listener?
    Thanks,
    Gill

    this snap shot of the code i write it to get the current employee id whcich is selected
        public void select(SelectionEvent selectionEvent) {
            // Add event code here...
             RichTable  _table = (RichTable)selectionEvent.getSource();
             CollectionModel _tableModel = (CollectionModel)((RichTable)selectionEvent.getSource()).getValue();
            JUCtrlHierBinding _adfTableBinding = (JUCtrlHierBinding)_tableModel.getWrappedData();
            DCIteratorBinding _tableIteratorBinding = _adfTableBinding.getDCIteratorBinding();
            //Acess the ADF iterator binding that is used with ADF table binding
            Object _selectedRowData = _table.getSelectedRowData();
            JUCtrlHierNodeBinding _nodeBinding =
                (JUCtrlHierNodeBinding)_selectedRowData; //get the row key from the node binding and set it //as the current row in the iterator
              Key _rwKey = _nodeBinding.getRowKey();
              _tableIteratorBinding.setCurrentRowWithKey( _rwKey.toStringFormat(true));
            DCIteratorBinding it = _adfTableBinding.getDCIteratorBinding();
           System.out.println( it.getCurrentRow().getAttribute("EmployeeId"));
        }this code i written 11.1.2

Maybe you are looking for

  • Line saver rental costs & complicated bill

    I paid £141 in advance for Line Saver Rental in Oct 2013.  This is still being advertised on the BT site at that rate for 12 months.  My latest bill is overly complicated with charges being amended back to Oct last year.  However from what I can make

  • [svn] 3403: Fix for SDK-17097 - Missing summary description of a class in package classes table

    Revision: 3403 Author: [email protected] Date: 2008-09-29 12:36:37 -0700 (Mon, 29 Sep 2008) Log Message: Fix for SDK-17097 - Missing summary description of a class in package classes table QA: Yes Doc: Tests: checkintests Ticket Links: http://bugs.ad

  • External USB ejects and locks up iMac

    I have a 27" Core i5 iMAC.  Brand new machine that runs great.  I am trying to transfer over my data from my PC to my new iMAC.  The PC data is on several external UISB drives that are formatted NTFS.  I have downloaded and installed the trial versio

  • Wacom Table driver

    I had been having multiple crashes per day in Lightroom & Photoshop since I upgraded to Windows 7 64bit.  I had thought it was some sort of compatibility problem since it only seemed to happen when I started Photoshop then Lightroom.  Eventually foun

  • IDVD project plays perfectly in preview but when burned NO AUDIO.....

    The iDVD (v 6.0.2 )project plays all video and menus/buttons perfectly in preview but when burned to NO AUDIO except on menus, none in the AUDIO TS folder, none on main video which has 11 chapters exported from FCP 5.0.4 as QT w/chapters. Also the bu