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! - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2b54ac9443545bf3 * How to use Transactions in stateless session bean? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ee73b722c1d5e795 * Tomcat, Apache and Application in / context path - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c5b39f1a1691dde * Really simple: how to call a class from another class - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a159dd89d802c683 * Struts validator - rule in one place - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61562a78fe61e939 * 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 * array - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/53af4d09d2b14807 * Best way to do this - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8e38d69ac964c0ee * Any HSQLDB Users - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ad06f3ca0fc6d9c0 * Ejb: best way to implement an update method with BMP - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2fadf7c755facb41 * Correct Semaphore Implementation in Java - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8259aec1ceed4f8f * Which is better... performance- and memory-wise? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb866c6ac7a64180 * Does anybody konw jkjni.dll file about Tomcat - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9b6eafd6558f120f * Vector takes a lot memory - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f00ea165043778e1 * Advanced question about generics - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/70947db3058ccce1 * Importing Address Book contacts - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa6b04b8af714f76 * 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 1 == Date: Fri, Nov 26 2004 12:07 pm From: Animanera Michael Borgwardt wrote: >> Simpler (and, maybe, better) solution should be declaring the resize >> method as SYNCHRONIZED therefore only ONE user at a time can execute >> the method (is it right, also if the method is static?). = no >> possibilities to saturate the memory; > > > Should work, but limits your throughput more than necessary. > > A clean alternative would be to keep count on how many calls are inside > the method at any one time and permit only a limited number (e.g. 5). > > java.util.concurrent.Semaphore does exactly that, but is available only > in Java 1.5, or you can use the package it was based on: > http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html > Yes I think that I'll use this package (there is Java 1.4 on server of my ISP). Thank you very much. Bye, Animanera :) ============================================================================== TOPIC: How to use Transactions in stateless session bean? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ee73b722c1d5e795 ============================================================================== == 1 of 2 == Date: Fri, Nov 26 2004 1:08 pm From: Michael Borgwardt harry wrote: > Thanks Sudsy, I understand that bit but am still confused as to how to use > transaction in stateless session beans? i.e how to start, rollback & commit > them in my code? You don't. The container does it for you. Basically, a transacion is started when the method is called, it is committed when the method completes, and it's rolled back when the method throws an EJBException or when you call EJBContext.setRollbackOnly(). == 2 of 2 == Date: Fri, Nov 26 2004 2:23 pm From: "harry" Thanks chaps, got it working now - yippeeeeeeeeeeeeeeeee! "Michael Borgwardt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > harry wrote: > > Thanks Sudsy, I understand that bit but am still confused as to how to use > > transaction in stateless session beans? i.e how to start, rollback & commit > > them in my code? > > You don't. The container does it for you. Basically, a transacion is started > when the method is called, it is committed when the method completes, > and it's rolled back when the method throws an EJBException or when you call > EJBContext.setRollbackOnly(). ============================================================================== TOPIC: Tomcat, Apache and Application in / context path http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c5b39f1a1691dde ============================================================================== == 1 of 2 == Date: Fri, Nov 26 2004 4:09 am From: [EMAIL PROTECTED] (Joshua) Juha Laiho <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > [EMAIL PROTECTED] (Joshua) said: > >I have Apache configured with Tomcat using mod_jk2. For example: > > > >Apache runs on port 80 > >Tomcat runs on port 8080 > > > >I can access Tomcat resources by connecting to port 80 through apache. > > > >I have deployed a war file using the Tomcat Web Application Manager. > >This by default uses the name of the war file as its context path. > > > >What I want is to deploy an application in Tomcat so that when I > >access http://<address> on the default port 80 the webapp is served > >instead of http://<address>/<context path>/. > > Two choices; > 1. > - you could set up Apache so that requests to anything (except starting > with /<context path>/ are redirected either internally or externally > to resources within /<context path>/ This sounds like the easiest way forward. Any pointers on how please? > 2. > - deploy your webapp so that it takes over the Tomcat root context > (might need manual creation of context XML file) Thought about this one, but doing so would obviously lose the functionality provided there at present e.g. manager. I tried taking a copy of the root folder and creating a new deployment from the copied folder. The index page comes up but if you click on manager the link is broken. > - configure mod_jk2 to take over the Apache root "directory" > (have done this with mod_jk, but the configuration for mod_jk2 > is wildly different) == 2 of 2 == Date: Fri, Nov 26 2004 5:43 am From: [EMAIL PROTECTED] (Joshua) Juha Laiho <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > [EMAIL PROTECTED] (Joshua) said: > >I have Apache configured with Tomcat using mod_jk2. For example: > > > >Apache runs on port 80 > >Tomcat runs on port 8080 > > > >I can access Tomcat resources by connecting to port 80 through apache. > > > >I have deployed a war file using the Tomcat Web Application Manager. > >This by default uses the name of the war file as its context path. > > > >What I want is to deploy an application in Tomcat so that when I > >access http://<address> on the default port 80 the webapp is served > >instead of http://<address>/<context path>/. > > Two choices; > 1. > - you could set up Apache so that requests to anything (except starting > with /<context path>/ are redirected either internally or externally > to resources within /<context path>/ I've done some more digging around to try get this option working. I've read up about ProxyPass in Apache. I have entered something like the following in my httpd.conf: ProxyPass / http://<address>:8080/<context path>/ What this does now is requests are going through apache but under the covers Tomcat is serving the content. Is this the method you had in mind? An issues to be aware of with this? Only concern I have with this is, and it might not be an issue because I wont necessarily have other webapps on this server, it is no longer possible to access a web app from tomcat through apache - e.g. http://<address>/<context path>. <snip> ============================================================================== TOPIC: Really simple: how to call a class from another class http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a159dd89d802c683 ============================================================================== == 1 of 1 == Date: Fri, Nov 26 2004 1:37 pm From: Johan Poppe Loic skrev: >hello > >sorry but it's been a long time since I programmed in java and have >had a mind block. I have a separate class in the same program folder, >called decode.java and I want to send it a string from the main class >which is called read.java. The main method in decode.java is expecting >a string: > >public static void main(String binarydata){ >//code >} > >so what do I do in read.java to send it this data? You call the method with a string as argument. decode.main("100001100010"); A few other things: - The classnames for your classes are not decode.java and read.java, but just decode and read. decode.java and read.java are the names of the files containing the source code. - The most common Java naming conventions in java is to capitalize class names, ie. Decode and Read. - Calling the static main method of other classes is a somewhat peculiar design. It's not wrong, but it's a bit strange. -- Riktig sitering gjør meldingene dine lettere å lese: < url: http://home.online.no/~vidaandr/news/OBSquoting.html > ============================================================================== TOPIC: Struts validator - rule in one place http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61562a78fe61e939 ============================================================================== == 1 of 2 == Date: Fri, Nov 26 2004 4:57 am From: [EMAIL PROTECTED] (Per) Hi there, I have a question concerning Struts validator framework: If have the same attribute for example salary in two forms is there any possibility to define the validation rule in one place. So that my form-field can depend on that rule. regards <form-validation> <formset> <form name="userFormVF"> <field property="userId" depends="required"> <arg0 key="prompt.userId"/> </field> <field property="salary" depends="double"> <arg0 key="prompt.salary"/> </field> </form> <form name="userFormDVF"> <field property="userId" depends="required"> <arg0 key="prompt.userId"/> </field> <field property="salary" depends="double"> <arg0 key="prompt.salary"/> </field> </form> </formset> </form-validation> == 2 of 2 == Date: Fri, Nov 26 2004 10:36 am From: Sudsy Per wrote: > Hi there, > > I have a question concerning Struts validator framework: > > If have the same attribute for example salary in two forms is there any > possibility > to define the validation rule in one place. > So that my form-field can depend on that rule. <snip> What you could do is write a small application which would generate the validation XML file automatically. You could implement the ability to share field definitions between forms, etc. I'm actually working on such a tool to make it easier for some people to generate the configuration files for validation and multi-page forms. Of course you end up creating a new file format which contains meta-date about your FormSet... ;-) -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. ============================================================================== 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: Fri, Nov 26 2004 8:35 am From: GaryM "Jack Andersson" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > No useful information there, I'm afraid. Can you post your whole mail-sending code? ============================================================================== 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: Fri, Nov 26 2004 3:26 pm From: "DNass" unfortunatly obfuscating the bytecode isn't enougth :( I still thing it has something to do with memory fragmentation but don't know how/what to change so that this app becomes stable thanks anyway :) "DNass" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > when I see the content length of the file received and the amount > of free memory (with the method Runtime.getRuntime().freeMemory()) it seems > that > my app can handle the response but then I have the error message. > > Thank you JScoobyCed, I am going to try to > obfuscate the app and let you know. > > > "JScoobyCed" <[EMAIL PROTECTED]> a écrit dans le message de > news:[EMAIL PROTECTED] > > DNass wrote: > > > > > 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 > > > > If the application has pictures, try to decrease their sizes. This will > > help lowering the app size. Then use an obfuscator to optimize the byte > > code and reduce again the size. > > Now if the file received by HTTP is bigger than the available memory, it > > might crash the app too. > > > > JScoobyCed > > DNass > > ============================================================================== TOPIC: array http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/53af4d09d2b14807 ============================================================================== == 1 of 1 == Date: Fri, Nov 26 2004 7:45 pm From: Alexey Dmitriev Gerard Krupa wrote: > nick wrote: > > > char a[], b, c; > of course you should know that vars definition in one line is bad practice -- Alex ============================================================================== TOPIC: Best way to do this http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8e38d69ac964c0ee ============================================================================== == 1 of 1 == Date: Fri, Nov 26 2004 7:12 am From: [EMAIL PROTECTED] (Fran Garcia) I´m developping an applet that plays a wav file and now I wanna add a slider to showing the position for the wav file, but I have no idea to do it. How can I communicate the read for the wav file and the slider. Listener, Timer or what? Thanks in advance Fran García ============================================================================== TOPIC: Any HSQLDB Users http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ad06f3ca0fc6d9c0 ============================================================================== == 1 of 2 == Date: Fri, Nov 26 2004 10:24 am From: IchBin Hello All.. I have posted the new Screenshots of DatabaseManagerSwing Class. Hope you enjoy. Feedback is possible. Not sure when it will be integrated but it is coming! I have to pass the changes along to Fred. I have an unused web site. Screenshots are there at: http://home.ptd.net/~weconsul/ Thanks in Advance... IchBin __________________________________________________________________________ 'The meeting of two personalities is like the contact of two chemical substances: if there is any reaction, both are transformed.' - Carl Gustav Jung, (1875-1961), psychiatrist and psychologist -- Thanks in Advance... IchBin == 2 of 2 == Date: Fri, Nov 26 2004 3:31 pm From: Andrew Thompson Please refrain from multi-posting. <http://www.physci.org/codes/javafaq.jsp#xpost> -- 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: Ejb: best way to implement an update method with BMP http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2fadf7c755facb41 ============================================================================== == 1 of 2 == Date: Fri, Nov 26 2004 4:39 pm From: Andrea Desole I want to write my first update method for an EJB using BMP. My favourite solution would be: bean.setA(); bean.setB(); bean.update(); The problem is that an update can only be made in the ejbStore method, which is called at the end of a method configured to be used with a transaction, in this case bean.update(). But, even if I use a transaction with update, I will then have a call to ejbLoad when I start it, which basically means that my new values for A and B will be overwritten with the old ones. I think there are mainly two possibilities: 1) call update(A,B) instead of setA, setB, update 2) setting a flag in setA and setB. ejbLoad will then check the flag: if the flag is set the object will not be loaded personally, I find both solutions not that great. Is it another drawback of EJBs, or there is a better solution? I'm seriously considering a change of technology... == 2 of 2 == Date: Fri, Nov 26 2004 9:15 am From: Sudsy Andrea Desole wrote: > I want to write my first update method for an EJB using BMP. My > favourite solution would be: > > bean.setA(); > bean.setB(); > bean.update(); > > The problem is that an update can only be made in the ejbStore method, > which is called at the end of a method configured to be used with a > transaction, in this case bean.update(). But, even if I use a > transaction with update, I will then have a call to ejbLoad when I start > it, which basically means that my new values for A and B will be > overwritten with the old ones. I think there are mainly two possibilities: <snip> I suggest a careful reread of the documentation. The container will "bracket" your method calls (setA, setB) with calls to ejbLoad and ejbStore. You need to understand your BMP entity bean's responsibilities. A good book (with examples) is "Enterprise JavaBeans Component Architecture" published by Sun Microsystems Press, ISBN 0-13-035571-2. I would expect that you could also find a good tutorial on Sun's web site. In fact, typing "+bmp +tutorial" into the search string box at <http://java.sun.com> provides the following: <http://java.sun.com/developer/onlineTraining/J2EE/Intro2/jdbc_bmp/jdbc_bmp.html> Pay particular attention to the bean lifecycle. -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. ============================================================================== TOPIC: Correct Semaphore Implementation in Java http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8259aec1ceed4f8f ============================================================================== == 1 of 2 == Date: Fri, Nov 26 2004 4:20 pm From: "xarax" "Andrea Desole" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Frank Gerlach wrote: > > Andrea Desole <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > > > >>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 > > > > That is right. There is nothing in my implementation preventing abuse. > > There should always be something like a P() .. V() brace in the using code. > > > > > >>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 > > > > Remote possibility > yes. I can't say how likely it is, but I also think it doesn't happen > very often. Still, it can happen. > > > > >>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. > > > > Hmm. Can you elaborate on this ? > not really. It's something that someone showed me on a book (for more > information look on "Effective Java", by Joshua Bloch, item 50). It just > says that in many JVM implementations, apparently because of something > related to the Posix standard, this problem can occur. They are called > spurious wakeups. I think this is what Matt Humphrey in this thread > calls spurious notify. In fact, both Matt and the book are suggesting to > use a loop. The problem is not related to spurious wake-ups. The code in the procure method P() was broken, because it only used "if(count==0)" rather than "while(count==0)". The code poster asserted a fallacy about the efficacy of the implementation, that it was impossible to return from the "wait()" without being immediately able to take ownership of the semaphore. The while loop is required not due to spurious wake-ups, but rather due to the fact that "wait()" releases the monitor and then tries to re-acquire the monitor before returning to the code that called wait(). A timing issue arises when two or more threads concurrently attempting P() which will cause the broken code to proceed with two threads holding the semaphore. The while loop fixes that bug. -- ---------------------------- Jeffrey D. Smith Farsight Systems Corporation 24 BURLINGTON DRIVE LONGMONT, CO 80501-6906 http://www.farsight-systems.com z/Debug debugs your Systems/C programs running on IBM z/OS for FREE! == 2 of 2 == Date: Fri, Nov 26 2004 5:44 pm From: Andrea Desole > > The problem is not related to spurious wake-ups. The code > in the procure method P() was broken, because it only used > "if(count==0)" rather than "while(count==0)". The code poster > asserted a fallacy about the efficacy of the implementation, > that it was impossible to return from the "wait()" without > being immediately able to take ownership of the semaphore. > > The while loop is required not due to spurious wake-ups, > but rather due to the fact that "wait()" releases the monitor > and then tries to re-acquire the monitor before returning to > the code that called wait(). A timing issue arises when two > or more threads concurrently attempting P() which will cause > the broken code to proceed with two threads holding the > semaphore. The while loop fixes that bug. > the code is synchronized, I don't see any problem with more threads accessing P, except the lack of a FIFO queue. Can you be clearer? I'm not sure I get this. ============================================================================== TOPIC: Which is better... performance- and memory-wise? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb866c6ac7a64180 ============================================================================== == 1 of 2 == Date: Fri, Nov 26 2004 4:22 pm From: Grant Wagner Gerbrand van Dieijen wrote: > On Wed, 24 Nov 2004 11:47:22 -0500, Dave Stallard wrote: > > > >for (Iterator i=c.iterator();i.hasNext();) > > Object o = i.next(); // You don't need the coercion for Object > > > >Of course, in the new Java you should be able to write something like: > > > >foreach (Object : c) > > > > It's not the same, and the first (for (Iterator i) is even incorrect: it > will fail when c is empty. import java.util.*; public class IteratorTest { public static void main(String[] s) { ArrayList<String> c = new ArrayList<String>(); // c.add("Test"); System.out.println( "The ArrayList is " + (c.isEmpty() ? "" : "not ") + "empty" ); for (Iterator i = c.iterator(); i.hasNext();) { Object o = i.next(); System.out.println(o); } // no errors or exceptions, even when c 'isEmpty()' } } -- Grant Wagner <[EMAIL PROTECTED]> == 2 of 2 == Date: Fri, Nov 26 2004 4:42 pm From: [EMAIL PROTECTED] (Gerbrand van Dieijen) On Fri, 26 Nov 2004 16:22:24 GMT, Grant Wagner wrote: > for (Iterator i = c.iterator(); i.hasNext();) { > Object o = i.next(); > System.out.println(o); > } > Arg, you're right. I'm very ashamed I didn't thought about that, or figured it out before :-( -- Gerbrand van Dieijen ============================================================================== TOPIC: Does anybody konw jkjni.dll file about Tomcat http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9b6eafd6558f120f ============================================================================== == 1 of 1 == Date: Fri, Nov 26 2004 8:36 am From: [EMAIL PROTECTED] (mdh) "MaoXuePeng" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > I want a jkjni.dll file used to do some test about Tomcat, anybody know > that? Can you mail it to me? > My mail is [EMAIL PROTECTED] > > Thanks! > MaoXuePeng. Depending on exactly what you are trying to do and the version of Tomcat you are using, you may find you don't actually want or need this jkjni module. The documentation for Tomcat 5.0.28 has a warning about absolutely positively not using the JNI module in production Tomcat deployments (though they don't really say why -- I presume the code just isn't stable enough). I have been working with Tomcat 5.0.28 and Apache 2.0.52 on SuSE Linux 9.0 for a few weeks and find I get the following notices in the ./logs/catalina.out logfile related to jkjni: INFO: JK2: ajp13 listening on /0.0.0.0:8009 Nov 26, 2004 1:00:42 AM org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: no jkjni in java.library.path Nov 26, 2004 1:00:42 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=4/57 config=/opt/tomcat5028/conf/jk2.properties Nov 26, 2004 1:00:42 AM org.apache.catalina.startup.Catalina start The reference to APR is "Apache Portable Runtime", a library that allows higher level interfaces to Apache to use OS-independent hooks for their functions to simplify life for developers. I have apr-1.0.0 installed and my connector is accepting connections from Apache so the JK connector is working so I suspect that the jkjni module is not necessary for what I'm doing. If you are using an LDAP directory instead of a database for your application, you may find you need JNI. mdh ============================================================================== TOPIC: Vector takes a lot memory http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f00ea165043778e1 ============================================================================== == 1 of 1 == Date: Fri, Nov 26 2004 4:39 pm From: "Thomas G. Marshall" Thomas G. Marshall coughed up: > Michael Borgwardt coughed up: >> homecurr wrote: > > ...[rip]... > > >>> Another good data structure than Vector? >> >> Your problem is not with Vector, though it shouldnÄt be used anymore >> (instead, ArrayList). > > In general, switching from "legacy" classes to the collections > framework is a good idea, but you need to be aware that you will be > unable to extend a synchronized version of ArrayList. You can only > grab a synchronized version of ArrayList at runtime, which means that > if you wish to extend ArrayList /and/ have it synchronized, you must > override every method with a synchronized one. Sorry for the Deja Vu feeling you're experiencing. This is because of Verizon's @#$%ed up NNTP servers of late fooling me into thinking that the message was not posted and requiring a repost. I'm very sorry. -- Whyowhydidn'tsunmakejavarequireanuppercaselettertostartclassnames.... ============================================================================== TOPIC: Advanced question about generics http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/70947db3058ccce1 ============================================================================== == 1 of 1 == Date: Fri, Nov 26 2004 8:38 am From: [EMAIL PROTECTED] (Adam Jenkins) Michal Kleczek <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Hi, > actually it is the same as the original solution - but more verbose. > To avoid wiriting "MyConnection" twice you should use a static generic > method: [snip] > Client code: > > Server<MyConnection> s = Server.create(MyConnection.class); I still count two "MyConnection"s in that statement, so I'm not sure what you've gained. ============================================================================== TOPIC: Importing Address Book contacts http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa6b04b8af714f76 ============================================================================== == 1 of 1 == Date: Fri, Nov 26 2004 5:07 pm From: "Ann" "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message news:[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 With MS Outlook Express you can 'export' it as a csv file. Also, I don't remember how I did it, but I have a MS Access file of these addresses too. ============================================================================== 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: Fri, Nov 26 2004 9:09 am From: "Ann" windows task manager "Sambucus" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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
