comp.lang.java.programmer
http://groups-beta.google.com/group/comp.lang.java.programmer
[EMAIL PROTECTED]

Today's topics:

* Servlet OutOfMemory on images. Please help me! - 5 messages, 4 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2b54ac9443545bf3
* Importing Address Book contacts - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa6b04b8af714f76
* Send and retrieve pictures from my computer at home using my cell - 1 
messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6e9842e6a7341b7
* newbie question - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b7086796e66a836
* Which is better... performance- and memory-wise? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb866c6ac7a64180
* Nio performance bottleneck - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/49cecf04009b5d30
* Advanced question about generics - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/70947db3058ccce1
* XML catalog system - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f91fae26f2cd849a
* Correct Semaphore Implementation in Java - 3 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8259aec1ceed4f8f
* Configure a singleton - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7e33c5a6bd77128b
* ERRor using jboss 4.0 and xercers, xalan ,xslt, to get xml - 1 messages, 1 
author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/54efbbf64ad7f59b
* Sending mail - Created By field contains junk information - 1 messages, 1 
author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f36d7268525953f7
* [J2ME]How to avoid memory fragmentation - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cb6a26addf63af68
* set classpath for jar file - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/49416430ef8125f3
* JVM shut down ala Eclipse or Jbuilder - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4bc2493416cd4232

==============================================================================
TOPIC: Servlet OutOfMemory on images. Please help me!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2b54ac9443545bf3
==============================================================================

== 1 of 5 ==
Date: Thurs, Nov 25 2004 11:06 am
From: Andrew Thompson  

On Thu, 25 Nov 2004 10:43:08 GMT, Animanera wrote:

>> [2] Your images are cached.
> 
> Why you say that image caching (in my case) is a problem?

I base that upon a word in your subject 'OutOfMemory'.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane



== 2 of 5 ==
Date: Thurs, Nov 25 2004 12:22 pm
From: Animanera  

Andrew Thompson wrote:
> On Thu, 25 Nov 2004 10:43:08 GMT, Animanera wrote:
> 
> 
>>>[2] Your images are cached.
>>
>>Why you say that image caching (in my case) is a problem?
> 
> 
> I base that upon a word in your subject 'OutOfMemory'.

Great! In a fast reading, I read it as "you are loading a chached image" 
and not as "you are storing your images in a cache".

Using createImage instead of getImage resolved my problem! Thank you 
very much! :)

But...I think that the problem will come back if users do a concurrent 
access to the function. Therefore, what you can suggest to me to resolve 
this possible problem? I think that I can't catch OutOfMemory (and 
insert a sleep) since it is thrown at a thread level and not at a method 
level, right?

Or, what do you think if I declare the static resizeImage method as 
synchronized?

Many thanks Andrew and Michael :)
Bye, Animanera.



== 3 of 5 ==
Date: Thurs, Nov 25 2004 12:35 pm
From: Thomas Schodt  

Animanera wrote:

> if I call the Garbage 
> collection immediately after the upload (via my code or via Jprobe), or 
> after 1-2 seconds the memory doesn't go down. But if I call it after 
> 5-10 seconds, the memory goes down. How I can interpret this fact?

Calling the System.gc() method only *suggests* that the JVM expend 
effort toward recycling unused objects in order to make the memory they 
currently occupy available for quick reuse.

When control returns from the System.gc() call, the JVM has made a best 
effort to reclaim space from all discarded objects.



== 4 of 5 ==
Date: Thurs, Nov 25 2004 1:16 pm
From: Andrew Thompson  

On Thu, 25 Nov 2004 12:22:27 GMT, Animanera wrote:

> Using createImage instead of getImage resolved my problem! Thank you 
> very much! :)

You're welcome.

> But...I think that the problem will come back if users do a concurrent 
> access to the function. Therefore, what you can suggest to me to resolve 
> this possible problem? 

I do not quite understand what you mean.  I suggest you check
if there are problems before you worry about it.  If problems 
become apparent, perhaps start a new thread (referencing this one).

>..I think that I can't catch OutOfMemory (and 
> insert a sleep) since it is thrown at a thread level and not at a method 
> level, right?

AFAIU, that is not the case.  In fact I have a vague recollection* that 
I managed to 'catch' OOM errors before, there are two points to note

1) java.lang.OutOfMemoryError sub-classes Error, not Exception, so 

try {
  // ...
} catch(Exception e) {
  // this will not catch an OOMError!
} catch(OutOfMemoryError oome) {
  // this will catch an OutOfMemoryError
  // YOU SHOULD NOT EVEN TRY TO CATCH OTHER ERRORS
  // BUT THE ONE YOU ARE DEALING WITH.  EVEN THAT 
  // IS MORE 'WISHFUL THINKING' THAN 'USEFUL' see 2)
}

2) The application's out of memory, so what are you going to do now?

The only strategy I found that was even half workable was 
to prepare a 'failure - ran out of memory' Dialog and 
*have it ready* to setVisible(true) if you hit an OOME.

As far as I recall, even *that* was not entirely reliable.

It is because my attempts with 2) were not reliable that I
abandoned even attempting to inform the user and simply 
dumped a trace to stderr and called System.exit(-1)*.

[ * Rough translation.  "I threw up my hands in despair." ]

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane



== 5 of 5 ==
Date: Thurs, Nov 25 2004 5:00 pm
From: Michael Borgwardt 
 

Andrew Thompson wrote:
>>..I think that I can't catch OutOfMemory (and 
>>insert a sleep) since it is thrown at a thread level and not at a method 
>>level, right?

There is no "thread level" or "method level". All errors and exceptions
are thread-specific.

> AFAIU, that is not the case.  In fact I have a vague recollection* that 
> I managed to 'catch' OOM errors before, there are two points to note
> 
> 1) java.lang.OutOfMemoryError sub-classes Error, not Exception, so 
> 
> 2) The application's out of memory, so what are you going to do now?

Well, theoretically if you catch an OOME several methods back into
the stack, then a lot of objects created by the method calls inbetween
should be egligible for garbage collection, so there should be some
memory available. Of course you don't know how much...




==============================================================================
TOPIC: Importing Address Book contacts
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa6b04b8af714f76
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 3:59 am
From: [EMAIL PROTECTED] ([EMAIL PROTECTED]) 

Hi, I would like to know if is there a library that gives the
possibility to import Address Book contacts in java.
Not exactly "import", but selecting contacts to use for sending
something.
Also by drag & dropping.
I haven't found anything.

Thanks




==============================================================================
TOPIC: Send and retrieve pictures from my computer at home using my cell
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6e9842e6a7341b7
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 12:40 pm
From: "MaSTeR"  

"Jimmy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Just wondering if anyone know if telcos (Bell, AT&T Rogers, Telus,
> etc.) provide public WAP Push Gateway or MMS Gateway service in the
> Greater Toronto Area?
> Just recently picked-up a cell phone with camera.  I like to send
> pictures directly to my linux box at home, whether is re-directed
> through email or http by telco, so I can delete them from my phone to
> save space.  Or, I can load it back from my server at home and see on
> my cell again.
> My linux box already has mail and web server running so I can recieve
> as email or have a little cgi script to save pictures to file.

You need C++. Java executes in a sandbox and cannot access anything on the
file system except its RMS. Unless you take picture with the program you
intend to use to do the transfers you have to llok somewhere else.






==============================================================================
TOPIC: newbie question
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b7086796e66a836
==============================================================================

== 1 of 2 ==
Date: Thurs, Nov 25 2004 9:44 am
From: cortez  

hello to all

excuse for the question of newbie, but I cannot install the plugins of 
eclipse, any help to be appreciated



        best regards

     Klingon



== 2 of 2 ==
Date: Thurs, Nov 25 2004 4:55 pm
From: Michael Borgwardt 
 

cortez wrote:
> excuse for the question of newbie, but I cannot install the plugins of 
> eclipse, any help to be appreciated

Eclipse plugins don't need to be installed explicitly. You just decompress them
and put the resulting directory into the "plugins" directory of eclipse.
The next time eclipse is started, the plugin should be available.




==============================================================================
TOPIC: Which is better... performance- and memory-wise?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb866c6ac7a64180
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 12:53 pm
From: "Chris Uppal"  

xarax wrote:

> > Not /quite/ identical, there's a good chance that the compiler will
> > generate explicit bytecode for the assignment in:
> >
> >     Object o = null;
> >
> > IIRC, the java 1.4.x series compilers did so (I haven't yet looked at
> > the output from the 1.5.0 compiler in cases like this).  Of course,
> > there's then the JITer to consider...
>
> Actually, earlier compilers did NOT generate the
> assignment, because the compiler noticed that the
> initial value was the same as the default value.

But by "earlier compilers" you mean 1.3 series or earlier ?  I remember
noticing the described behaviour in 1.4 series.  Not that it matters -- this is
nitpicking about nitpicking about nitpicking ;-)


> Also, JIT'd code is supposedly debuggable now, so
> an explicit assignment of a default value should
> not get optimized away by the JIT.

It's probably worth clarifying this a little -- it could be misinterpreted.  As
I understand it, the JITer is still allowed to remove the assignment to null
(and for all I know that's what it does), it's just that it's required to /put
it back/ if you place a breakpoint on it.  (Chances are it'll put it back if
you place a breakpoint anywhere in that method -- but that's an implementation
detail and I'm /very/ sketchy on the details).

    -- chris







==============================================================================
TOPIC: Nio performance bottleneck
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/49cecf04009b5d30
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 2:18 pm
From: "JLM"  


"Yu SONG" <[EMAIL PROTECTED]> a écrit dans le message de news: 
[EMAIL PROTECTED]
> JLM wrote:
>> Hello !
>>
>> In order to be sure that nio package was more performant than regular 
>> streams, i have tested it with this little piece of code :
>>
> ...
>
>>     for (int i = 0; i < 1000; ++i) {
>>         loBuffer.put("ceci est un test\r\n");
>>         loBuffer.flip();
>>         encoder.encode(loBuffer, loWriteBuffer, false);
>>         loWriteBuffer.flip();
>>         loChannel.write(loWriteBuffer);
>>         loBuffer.clear();
>>         loWriteBuffer.clear();
>>     }
>>     loChannel.close();
>> }
> ...
>>
>> I was surprised to see that, on my computer, the regular stream based 
>> part was running about 4 times quicker than the nio based part !!
>> Here is my question : is my code correctlty optimized ? Anybody already 
>> noticed this performance bottleneck ? Is my test the cause of this 
>> problem ?
>>
>
>
> You don't need to encode and flip (twice) each time.
>
> For most of my applications, I usually use a big enough buffer to process 
> all the data first, and then write this buffer to the file once or twice.

It is only a test case, and it is intentionaly fractionned : i wanted to 
test 1000 independent invocations of a complete write. You can assume that 
each loop is not related with the others. But in fact you are right on a 
point : my test is not good, because the two parts in my program have not 
exactly the same behaviors. To really have two equivalent parts, i had to 
change the source code on the twice part : i have to flush the output stream 
in every loop, instead of flushing once at the end. In that case, the NIO 
part is faster than the standard case. Honnor is safe ! ;-)
Thank you giving to me a clue to find the solution ! :-)

>
> -- 
> Song
>
> /* E-mail.c */
> #define User            "Yu.Song"
> #define At              '@'
> #define Warwick         "warwick.ac.uk"
> int main() {
> printf("Yu Song's E-mail: %s%c%s", User, At, Warwick);
> return 0;}
>
> Further Info. :   http://www.dcs.warwick.ac.uk/~esubbn/
> _______________________________________________________
> 






==============================================================================
TOPIC: Advanced question about generics
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/70947db3058ccce1
==============================================================================

== 1 of 2 ==
Date: Thurs, Nov 25 2004 1:51 pm
From: "xarax"  

"Vincent Cantin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I have a class Server<C extends Connection> that accepts some connections
> are for each of them creates an instance of C.
>
> Problem : the implementation of the class need to have C.class in order to
> create its instance but it doesn't know it unless I ask the user of my class
> to give it in parameter.
>
> So the user of the class write something like that :
>
>     Server server = new Server<MyConnection>(MyConnection.class);
>
> but I would like him to only write something like that :
>
>     Server server = new Server<MyConnection>();
>
> Is there something in the language of Java 1.5 that can do implicitly what I
> want ?

I believe there is nothing to do exactly what you
want as described.

However, you may want to consider passing a factory
object to the constructor. The factory object will
instantiate an object of the correct type. The factory
object should be declared generically (via an interface
type) so that the compiler can verify that it is delivering
the correct type.





== 2 of 2 ==
Date: Thurs, Nov 25 2004 5:04 pm
From: Michael Borgwardt 
 

Vincent Cantin wrote:
> So the user of the class write something like that :
> 
>     Server server = new Server<MyConnection>(MyConnection.class);
> 
> but I would like him to only write something like that :
> 
>     Server server = new Server<MyConnection>();
> 
> Is there something in the language of Java 1.5 that can do implicitly what I 
> want ?

That's IMO not possible, because generics don't exist on the bytecode level,
they're purely for the sake of the compiler. That means what gets *executed*
in the end is:

Server server = new Server();

With to MyConnection added whenever a method of server is called that
requires them.





==============================================================================
TOPIC: XML catalog system
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f91fae26f2cd849a
==============================================================================

== 1 of 2 ==
Date: Thurs, Nov 25 2004 6:06 am
From: [EMAIL PROTECTED] (terry) 

Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> On 24 Nov 2004 22:19:40 -0800, terry wrote:
> 
> > Anyone can give me a hand?
> 
> I'm no expert on the area of development to which you are refering.
> OTOH, I have a great deal of experience at getting the most 
> from newsgroups.  A couple of tips. 
> 
> Your question sounded like you wanted hand-holding, step-by-step 
> through each aspect of the process.  Usenet is a discussion forum 
> as opposed to a help-desk, and your question sounded more appropriate 
> for a help-desk.
> 
> If you want such personal tuition, offer some cash and I am 
> confident that the relevant people will contact you.  OTOH, if
> you are not prepared/able to pay money, you will need to put more 
> effort into the task and ask specific questions.
> 
> You might instead ask for links to tutorials, or good search 
> keywords as a start.  Work through a tutorial, and post with a 
> specific question when you get stuck.
> 
> HTH

I think this question is quite general and catalog-product system is a
quite common thing. May be there exists source code in the internet
which someone knows the link. I do not think that forum is not a right
place to post such a question.



== 2 of 2 ==
Date: Thurs, Nov 25 2004 2:54 pm
From: Andrew Thompson  

On 25 Nov 2004 06:06:08 -0800, terry wrote:

> ...I do not think that forum is not a right
> place to post such a question.

I never said it was the wrong place, feel free to ignore my 
advice if you wish.  But keep in mind that it is you asking 
'Anyone can give me a hand?' after getting no responses to 
your original enquiry.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane




==============================================================================
TOPIC: Correct Semaphore Implementation in Java
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8259aec1ceed4f8f
==============================================================================

== 1 of 3 ==
Date: Thurs, Nov 25 2004 6:32 am
From: [EMAIL PROTECTED] (Frank Gerlach) 

There seem to be quite a number of not very clean and simple
implementations
of java Semaphores in the internet. The following example is extremely
simple (the Java 1.5 implementation is overfeatured IMHO) and correct:

/** Semaphore class for managing limited resources (such as database 
*   connections)
*   Author: Frank Gerlach ([EMAIL PROTECTED])
*   Copyright: None. Use in any way you want.
*   located at: http://www.geocities.com/gerlachfrank/Semaphore.java
*/
public class Semaphore{ 
    int count; 
    /** Create the semaphore 
    *   @param initialcount number of resource items to manage
    */
    public Semaphore(int initialcount){ 
       count=initialcount; 
    }

    /** Acquire one resource item
    */
    public void P(){
       synchronized(this){
          if(count==0){
             try{
                wait();
             }catch(InterruptedException ie){
                //this should never happen
                System.err.println("caught InterruptedException in
wait()");
             }
          }
          count--;
       }
    }

    /** Release one resource item, thereby waking up a sleeping thread
    *   if free resource count was zero.
    */
    public void V(){
       synchronized(this){
          count++;
          if(count==1)notify();    
       }
    }
}



== 2 of 3 ==
Date: Thurs, Nov 25 2004 4:09 pm
From: Andrea Desole  

I wouldn't say it's correct. There are two things that don't convince me:
1) a thread shouldn't be able to call V without calling P. You can't 
release a resource if you don't get it
2) notify is not deterministic. It would be better to have a FIFO queue, 
or there is a chance, altough small, that a thread will wait forever
I also know that some JVMs don't work as they should, and in some cases 
a waiting thread can wake up without notify being called.
There are probably a lot of resources on the web about this


Frank Gerlach wrote:
> There seem to be quite a number of not very clean and simple
> implementations
> of java Semaphores in the internet. The following example is extremely
> simple (the Java 1.5 implementation is overfeatured IMHO) and correct:
> 
> /** Semaphore class for managing limited resources (such as database 
> *   connections)
> *   Author: Frank Gerlach ([EMAIL PROTECTED])
> *   Copyright: None. Use in any way you want.
> *   located at: http://www.geocities.com/gerlachfrank/Semaphore.java
> */
> public class Semaphore{ 
>     int count; 
>     /** Create the semaphore 
>     *   @param initialcount number of resource items to manage
>     */
>     public Semaphore(int initialcount){ 
>        count=initialcount; 
>     }
> 
>     /** Acquire one resource item
>     */
>     public void P(){
>        synchronized(this){
>           if(count==0){
>              try{
>                 wait();
>              }catch(InterruptedException ie){
>                 //this should never happen
>                 System.err.println("caught InterruptedException in
> wait()");
>              }
>           }
>           count--;
>        }
>     }
> 
>     /** Release one resource item, thereby waking up a sleeping thread
>     *   if free resource count was zero.
>     */
>     public void V(){
>        synchronized(this){
>           count++;
>           if(count==1)notify();    
>        }
>     }
> }



== 3 of 3 ==
Date: Thurs, Nov 25 2004 10:15 am
From: "Matt Humphrey"  


"Frank Gerlach" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> There seem to be quite a number of not very clean and simple
> implementations
> of java Semaphores in the internet. The following example is extremely
> simple (the Java 1.5 implementation is overfeatured IMHO) and correct:
>
> /** Semaphore class for managing limited resources (such as database
> *   connections)
> *   Author: Frank Gerlach ([EMAIL PROTECTED])
> *   Copyright: None. Use in any way you want.
> *   located at: http://www.geocities.com/gerlachfrank/Semaphore.java
> */
> public class Semaphore{
>     int count;
>     /** Create the semaphore
>     *   @param initialcount number of resource items to manage
>     */
>     public Semaphore(int initialcount){
>        count=initialcount;
>     }
>
>     /** Acquire one resource item
>     */
>     public void P(){
>        synchronized(this){
>           if(count==0){
>              try{
>                 wait();
>              }catch(InterruptedException ie){
>                 //this should never happen
>                 System.err.println("caught InterruptedException in
> wait()");
>              }

I havn't worked with this for a while, but shouldn't it be
    while (count == 0) {

because otherwise the arrival of a spurrious notify will cause the semaphore
to be granted when it is not yet ready.  Alternatively (or in addition),
shouldn't the monitor be a private instance object and not "this" for
exactly the same reason?

Also, in many of the real applications I have worked on, Interrupted
Exceptions are not "should never happen" but a real fact of life and need
real handling.  Shouldn't your design include something more meaningful,
such as either directly throwing InterruptedException so the application can
determine the appropriate course of action or something that lets them be
ignored or retried?

>           }
>           count--;
>        }
>     }
>
>     /** Release one resource item, thereby waking up a sleeping thread
>     *   if free resource count was zero.
>     */
>     public void V(){
>        synchronized(this){
>           count++;
>           if(count==1)notify();
>        }
>     }
> }

Also, what about the order in which the signals are granted?  This version
simply relies on notify to choose the order, which may not be in the order
they were requested.  And, of course, there is the whole time-out issue--I
don't want a broken subprocess to break my app as a whole.

IMHO, I think the reason there are so many versions of Semaphore is that the
abstract concept (no matter how well implemented) is not sufficient and
people need different behaviors for different applications.

Cheers,
Matt Humphrey  [EMAIL PROTECTED]   http://www.iviz.com/






==============================================================================
TOPIC: Configure a singleton
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7e33c5a6bd77128b
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 2:55 pm
From: "ShadowMan"  

Hi all,
according to your opionion, what is the best way to configure a Singleton 
through an external fileName.
I have two solutions:
- using a static method that configures a Singleton and return its instance
Example:  Singleton singleton = Singleton.init(fileName);

- use a public (not static) method to call directly on instance

Example:
Singleton singleton = Singleton.getInstance();
singleton.init(fileName)

I have to use it on a clustered environment..
-- 
ShadowMan 






==============================================================================
TOPIC: ERRor using jboss 4.0 and xercers, xalan ,xslt, to get xml
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/54efbbf64ad7f59b
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 3:14 pm
From: "satish mn via JavaKB.com"  


hi iam satish
Iam using jboss 4.0 and xercers, xalan ,xslt, to get xml 
and using it from jsp and outputting on the browser

 when refreshing the page it repeating contents of the page
 like hello satish hello satish
like so on..

 it createds 3 xml files using xslt and  it is read by jsp adds xsl to it and 
oput puts

It is working fine in the weblogic 5.1 , since it deletes the file every time 
while refershing

but it doesnt happening in jboss , it appending the contents to the same xml 
file 

need help 

Thanks in advance..

-- 
Message posted via http://www.javakb.com




==============================================================================
TOPIC: Sending mail - Created By field contains junk information
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f36d7268525953f7
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 4:35 pm
From: "Jack Andersson"  

I have written a small app that sends a mail, however when I receive the
mail the Created by-field contains information that shoudn't be there.

The code for the reply address is:

InternetAddress reply[] = new InternetAddress[1];
reply[0] = new InternetAddress("support");

However, when I receive the mail that the app has sent to med the Created By
(i e the reply to-address as I understand it) is

"support".GWIATA.OurCompanyDomain

When I try the following:

InternetAddress reply[] = new InternetAddress[1];
reply[0] = new InternetAddress("[EMAIL PROTECTED]");

the Created By-field becomes:

"[EMAIL PROTECTED]"[EMAIL PROTECTED]

Why is this? Is it a matter of configuration on the mail server? Or do I
have to set some kind of property before sending mail?






==============================================================================
TOPIC: [J2ME]How to avoid memory fragmentation
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cb6a26addf63af68
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 4:42 pm
From: "DNass"  

I have developped a mobile app,
and I'm actually trying to deploy this app
on a Sony Ericsson T610.
On the emulator it works just fine, but on the mobile
I have this system error message saying "this application is
using too much memory", I know that the app uses about 150k of RAM
and the mobile has 260 k
there for I thougth it was due to
a problem with the memory fragmentation.
I was wondering if somebody here had the same problems
and if yes could she/he share his experience

Thx in advance

PS: the app make connections to server via http
to retreive informations (text and/or images)






==============================================================================
TOPIC: set classpath for jar file
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/49416430ef8125f3
==============================================================================

== 1 of 2 ==
Date: Thurs, Nov 25 2004 10:43 am
From: "Rizwan"  

My question is about the classes which you mention will be included if we
add directory to the classpath.
what if the directory has a sub directory which also have classes? Will they
be included too automatically? If not then is there a setting option
available to do that? its lot of work to include each sub directory.
TIA

"hilz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "HS1" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello
> >
> > I have an application that uses some jar files in different folders. For
> > example, it needs
> >
> > c:\folder1\file1.jar
> > c:\folder1\file2.jar
> > c:\folder2\file1.jar
> >
> > I want to create classpath for those files. Do I have point out the
exact
> > jar files as above in classpath or I can create by doing something like:
> >
> > c:\folder1
> > c:\folder2
> >
> > Thank you
> > SH1
> >
> >
>
> You have to explicitly add every jar file to the class path. if you add
the
> directory to the classpath, it will add any classes inside it but not jar
> files.
> HTH
> hilz
>
>





== 2 of 2 ==
Date: Thurs, Nov 25 2004 8:16 am
From: Michael Borgwardt 
 

Rizwan wrote:
> My question is about the classes which you mention will be included if we
> add directory to the classpath.
> what if the directory has a sub directory which also have classes? Will they
> be included too automatically? If not then is there a setting option
> available to do that? its lot of work to include each sub directory.

If the subdirectories reflect a package structure, only to root of that
structure needs to be added to the classpath.




==============================================================================
TOPIC: JVM shut down ala Eclipse or Jbuilder
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4bc2493416cd4232
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 8:15 am
From: [EMAIL PROTECTED] (Sambucus) 

Hi all,
anyone who knows how to force a running jvm to shut down like Eclipse
or Jbuilder does when you press their little stop button?

I have this problem with some sockets refusing to shut down (I guess
it is because they are blocking for input). When I run my app from
eclipse and use a normal System.exit(); or
Runtime.getRuntime().halt(0); the app refuses to shut down, however,
if I press eclipses stop/shutdown button it imideatly shuts down the
jmv and all sockets. I would like to know if there is some way to
implement this from within my app?

Any help much appritiated!

/Andreas



==============================================================================

You received this message because you are subscribed to the Google
Groups "comp.lang.java.programmer" group.

To post to this group, send email to [EMAIL PROTECTED] or
visit http://groups-beta.google.com/group/comp.lang.java.programmer

To unsubscribe from this group, send email to
[EMAIL PROTECTED]

To change the way you get mail from this group, visit:
http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

To report abuse, send email explaining the problem to [EMAIL PROTECTED]

==============================================================================
Google Groups: http://groups-beta.google.com 

Reply via email to