comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * What is the difference between a BMP EntityBean and a DAO ? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9714cc5261912ab * Hashtable: Serializable Or Not? - 4 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e3741f1a0eedb278 * Difference between Statement and preparedStatement (for SQL databases) ? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4e84745752ae8768 * Setting up a J2EE AS on Linux - 5 messages, 5 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/82c0aa389344470b * Am I the only one who questions JSTL, Struts Tags, XSL Tags? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/48683f1f07068c7d * java packages - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e73d6b637c63821a * How can we beat team system? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b4b3138168ddab7b * Division by zero: float vs. int - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6dc583f6638fa877 * How connect to hsqldb database in jar? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/abc3be4fb59cfd19 * java package - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/90918bac981d581 * Anyone using Amazon Web Service for a FULL eCommerce site? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/adeab65cb4701c24 * UTF-8 from MySQL - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/85120c01e1829a3b * Opposite of ResultSetMetaData.getColumnName() ?? Is not: putColumnName() - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f8f22c33b7f5480e ========================================================================== TOPIC: What is the difference between a BMP EntityBean and a DAO ? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9714cc5261912ab ========================================================================== == 1 of 1 == Date: Sat, Oct 16 2004 3:15 am From: [EMAIL PROTECTED] (Lars Willich) As I read in a couple of articles a BMP (Bean Managed Persistence is an EntityBean where the programmer has to care about the SQL statements. On the other side a DAO implements the direct access to an SQL database. But isn't that the same? What are the differences ? Lars ========================================================================== TOPIC: Hashtable: Serializable Or Not? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e3741f1a0eedb278 ========================================================================== == 1 of 4 == Date: Sat, Oct 16 2004 3:16 am From: "Jason Teagle" <[EMAIL PROTECTED]> The javadocs for Hashtable says that it implements Serializable, yet when I try and call myObjectOutputStream.writeObject(some_hashtable); it throws a NotSerializableException. HashMap does the same. Did I miss something? -- -- Jason Teagle [EMAIL PROTECTED] == 2 of 4 == Date: Sat, Oct 16 2004 3:31 am From: "Jason Teagle" <[EMAIL PROTECTED]> > The javadocs for Hashtable says that it implements Serializable, yet when > I try and call > > myObjectOutputStream.writeObject(some_hashtable); > > it throws a NotSerializableException. > > HashMap does the same. > > Did I miss something? I guess I did. The objects used as values for the keys in the map didn't implement Serializable - duh. -- -- Jason Teagle [EMAIL PROTECTED] == 3 of 4 == Date: Sat, Oct 16 2004 3:37 am From: Gordon Beaton <[EMAIL PROTECTED]> On Sat, 16 Oct 2004 11:16:24 +0100, Jason Teagle wrote: > The javadocs for Hashtable says that it implements Serializable, yet > when I try and call > > myObjectOutputStream.writeObject(some_hashtable); > > it throws a NotSerializableException. > > HashMap does the same. > > Did I miss something? I suspect your Hashtable contains objects that aren't serializable. This code doesn't give me any exceptions: public static void main(String[] args) throws Exception { FileOutputStream fos = new FileOutputStream("/dev/null"); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(new Hashtable()); oos.writeObject(new HashMap()); oos.close(); } /gordon -- [ do not email me copies of your followups ] g o r d o n + n e w s @ b a l d e r 1 3 . s e == 4 of 4 == Date: Sat, Oct 16 2004 3:55 am From: "Jason Teagle" <[EMAIL PROTECTED]> > I suspect your Hashtable contains objects that aren't serializable. > Yep, you are right; when I came to serialize it manually as my only apparent option, then it finally dawned on me since I had to implement serialization for a couple of levels down into my object hierarchy... oops {:v) -- -- Jason Teagle [EMAIL PROTECTED] ========================================================================== TOPIC: Difference between Statement and preparedStatement (for SQL databases) ? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4e84745752ae8768 ========================================================================== == 1 of 1 == Date: Sat, Oct 16 2004 4:07 am From: [EMAIL PROTECTED] (Ken Philips) Sometimes I can see pure Statement declaration for accessing SQL databases others use preparedStatements. What is the difference? Ken ========================================================================== TOPIC: Setting up a J2EE AS on Linux http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/82c0aa389344470b ========================================================================== == 1 of 5 == Date: Sat, Oct 16 2004 5:30 am From: [EMAIL PROTECTED] (Andy) Hi, I have no prior knowledge of J2EE / EJB and the likes and want to set up a J2EE application server on my PC running Fedora Linux 2. Can anyone please suggest what would be a good and easily available app server that I could setup and with which I could test out most of the code that I write. Also what all do I need to have installed before embarking on installing a J2EE App server. Any links which could help me setup my system are very welcome. So are names of books. Cheers, Andy == 2 of 5 == Date: Sat, Oct 16 2004 6:09 am From: Andrew Thompson <[EMAIL PROTECTED]> On 16 Oct 2004 05:30:57 -0700, Andy wrote: > I have no prior knowledge of J2EE / EJB and the likes and want to set > up a J2EE application server on my PC running Fedora Linux 2. Can > anyone please suggest what would be a good and easily available app > server that I could setup and with which I could test out most of the > code that I write. Apache/Tomcat should do the trick.. <http://jakarta.apache.org/> <http://jakarta.apache.org/tomcat/> HTH -- 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 == 3 of 5 == Date: Sat, Oct 16 2004 9:20 am From: Chris Dodds <[EMAIL PROTECTED]> Andrew Thompson wrote: > On 16 Oct 2004 05:30:57 -0700, Andy wrote: > > >>I have no prior knowledge of J2EE / EJB and the likes and want to set >>up a J2EE application server on my PC running Fedora Linux 2. Can >>anyone please suggest what would be a good and easily available app >>server that I could setup and with which I could test out most of the >>code that I write. > > > Apache/Tomcat should do the trick.. > <http://jakarta.apache.org/> > <http://jakarta.apache.org/tomcat/> > > HTH > Sun application server runs well on Fedora Core 2 http://java.sun.com/j2ee/1.4/download.html#sdk Chris == 4 of 5 == Date: Sat, Oct 16 2004 9:43 am From: Jon Martin Solaas <[EMAIL PROTECTED]> Andrew Thompson wrote: > On 16 Oct 2004 05:30:57 -0700, Andy wrote: > > >>I have no prior knowledge of J2EE / EJB and the likes and want to set >>up a J2EE application server on my PC running Fedora Linux 2. Can >>anyone please suggest what would be a good and easily available app >>server that I could setup and with which I could test out most of the >>code that I write. > > > Apache/Tomcat should do the trick.. > <http://jakarta.apache.org/> > <http://jakarta.apache.org/tomcat/> > > HTH > Tomcat is a webcontainer, not an j2ee server. JBoss is a nice j2ee server which is very easy to set up (just unzip, start with run.sh and drop your applications in server/default/deploy directory). It comes with a simple database (but can connect to any) and uses tomcat as it's webcontainer. Oracle JDeveloper 10g is also nice (just unzip), and comes with appserver (oc4j) embedded. You can register on otn.oracle.com and download for non-commercial/educational purposes (check the licence). Just make jdev.conf point to your java home on linux. You can easily make applications that will run on jboss with jdeveloper. Several other alternatives exist also, but I have no experience with them. Jonas is another opensource alternative to jboss and ofcourse you have websphere and weblogic, I suppose they run on linux, though i'm not sure about weblogic with their jrocket jvm ... -- jonmartin.solaas¤h0tm4i1 == 5 of 5 == Date: Sat, Oct 16 2004 9:54 am From: Sudsy <[EMAIL PROTECTED]> Jon Martin Solaas wrote: <snip> > Several other alternatives exist also, but I have no experience with > them. Jonas is another opensource alternative to jboss and ofcourse you > have websphere and weblogic, I suppose they run on linux, though i'm not > sure about weblogic with their jrocket jvm ... Both WebSphere and WebLogic run on Linux. I know; I've had both of them up on my servers at various times. JBoss did (does?) have some serious limitations like not being able to specify the deployment directory (it was created dynamically) but you can program around it. -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. ========================================================================== TOPIC: Am I the only one who questions JSTL, Struts Tags, XSL Tags? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/48683f1f07068c7d ========================================================================== == 1 of 2 == Date: Sat, Oct 16 2004 6:03 am From: "Donald Roby" <[EMAIL PROTECTED]> On Fri, 15 Oct 2004 13:52:26 -0400, Bryce wrote: > On Fri, 15 Oct 2004 11:02:43 -0400, Sudsy <[EMAIL PROTECTED]> > wrote: > >>Bryce wrote: >>> On 14 Oct 2004 18:09:42 +0200, Tor Iver Wilhelmsen >>> <[EMAIL PROTECTED]> wrote: >><snip> >>>>The problem with cramming all that stuff into J2EE is: If a potential >>>>employer wants J2EE skills, what does he really want? JDBC? EJBs? >>>>Servlets? JSPs? JNDI? SOAP? >>> >>> >>> My experience has been most employers are very specific on their J2EE >>> skills. Specially when a particular app server experience is desired. >> >>You mean like when they ask for 5 years experience with WebLogic? > Weblogic did exist 5 years ago. Since it was then at version 4-something, I suspect it had already been around awhile. > Yep. They ask for experience with a specific app server. I've tried to > explain to recruiters that experience with one of the major J2EE servers > should carry over, they don't understand. > The recruiter isn't the person that needs to understand that. The hiring manager should understand that and communicate his level of flexibility with the recruiter. >>And the product has been available for...how long? Truth be told, >>experience on one of the major J2EE servers should suffice. Knowledge of >>the underlying concepts is transferrable. > > But some drone in HR doesn't know that. The sheet in front of them says > "WebLogic" and if the resume in front doesn't say that, it goes in the > "no" pile (trashcan) > Having some friends in HR, I'd prefer they weren't referred to as drones. In the present context, the HR person's *job* is to provide a filtering service to the hiring manager, according to rules specified by the hiring manager on that sheet. Your "drone" is doing his job correctly. If a hiring manager writes that sheet requiring Weblogic-specific experience, then there are a couple possibilities: 1) He/she doesn't understand the carryover of concepts cited above. 2) There's a good reason. This might be simply to reduce the height of the resume pile, or the application may as currently coded depend heavily on the server-specific implementation. Making these decisions is the hiring manager's job. If you think someone is an idiot for specifying these requirements, then you don't want to work for them, so why should you care if they filter out your resume? If I am a hiring manager, I will certainly not specify a specific server experience as a requirement, but might well specify a preference, and a limit to the size of the pile HR forwards to me, which would have the same effect. == 2 of 2 == Date: Sat, Oct 16 2004 7:43 am From: Sudsy <[EMAIL PROTECTED]> Greg Smith wrote: >>Am I alone in this? > > > It surely does seem that i am alone. and i'm taking heat for it at the > office. but let me offer this question to you, how do you execute a > logical OR in struts taglib? Say, if x is empty or y is empty? i came > up with > > <logic:empty name="x"> > do something > </logic:empty> > <logic:notEmpty name="x"> > <logic:empty name="y"> > do something (the same as above) > </logic:empty> > </logic:notEmpty> > > i dont think this is as elegant a solution as > <% if (x.size()==0 || y.size()==0) { %> > do something > <%}%> Granted, tags don't <em>generally</em> do a good job of handling complex logic. Then again, most applications only require basic control flow. It seems that you're digging in your heels and trying to come up with specific examples where scriptlet code looks more "elegant". You're ignoring the fact that when you have a division of labour and the HTML coders are not Java programmers then you don't want to "pollute" the HTML with Java. It's as simple as that. One should always choose their battles carefully. In this case, you might want to just go with the flow and accept the standard approach. Everyone will be happier for it. -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. ========================================================================== TOPIC: java packages http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e73d6b637c63821a ========================================================================== == 1 of 2 == Date: Sat, Oct 16 2004 6:10 am From: "Mako Klaic" <[EMAIL PROTECTED]> what is java package? (for exaple javax.servlet) where are located package files? what file type is a package? im trying to include a package javax.servlet.http i have intalled both J2SE and J2EE, bunt i can't compile a source with this line of code: import javax.servlet.http or other..... == 2 of 2 == Date: Sat, Oct 16 2004 6:26 am From: Andrew Thompson <[EMAIL PROTECTED]> On Sat, 16 Oct 2004 15:10:15 +0200, Mako Klaic wrote: > what is java package? what is multi-posting? <http://www.physci.org/codes/javafaq.jsp#xpost> Please refrain from multi-possting Mako, and see my answer on the other group. -- 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: How can we beat team system? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b4b3138168ddab7b ========================================================================== == 1 of 2 == Date: Sat, Oct 16 2004 7:19 am From: [EMAIL PROTECTED] (Peter) Hi all The visual studio 2005 will build in a cvs called "team system". What are the features we need to have to beat it? thanks from Peter ([EMAIL PROTECTED]) == 2 of 2 == Date: Sat, Oct 16 2004 7:26 am From: Andrew Thompson <[EMAIL PROTECTED]> On 16 Oct 2004 07:19:06 -0700, Peter wrote: > The visual studio 2005 will build in a cvs called "team system". > What are the features we need to have to beat it? (shrugs) A big stick? Not using it? Does this have anything to do with Java? -- 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: Division by zero: float vs. int http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6dc583f6638fa877 ========================================================================== == 1 of 1 == Date: Sat, Oct 16 2004 8:01 am From: "Thomas G. Marshall" <[EMAIL PROTECTED]> Tor Iver Wilhelmsen coughed up: > "Thomas G. Marshall" > <[EMAIL PROTECTED]> writes: > >> "equals()" is about whatever version of equivalence the author >> intended it to be, mathematical or otherwise. > > No, it is about conforming to the "contract" specified by > Object.equals(). That's correct. And the "contract" /is/ the verion of mathematical equivalence set in place by sun. There are null issues to take into account of course, since equals() is passed, after all, an object. > And the docs for it states: > > "It is reflexive: for any non-null reference value x, x.equals(x) > should return true." > > If Java had support for pre- and postconditions, this would be easier > to enforce. As it stands, only the Javadocs indicate the contract. > > So unless you want to claim that new Double(Double.NaN) should be > treated like null, they will be equal. I would never make that claim. You have an interesting take on this, but you've over complicated this issue enormously. With regard to primitive floating point types, NaN /does not equal/ NaN. With regard to the java's notion of object representations of those primitive types, NaN /does equal/ NaN. I happen to agree with the .equals() contract set in place in the Java api's, and (again), don't really care that much about this issue at all. -- "His name was Robert Paulson. His name was Robert Paulson. His name was Robert Paulson..." ========================================================================== TOPIC: How connect to hsqldb database in jar? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/abc3be4fb59cfd19 ========================================================================== == 1 of 2 == Date: Sat, Oct 16 2004 8:06 am From: Brzezi <[EMAIL PROTECTED]> Hi. I`m writing a program, I`m usinig hsqldb database embded within it, finally I`d like pack all application files including database files (*.backup, *.data, *.script, *.properties) into one *.jar file, but I`v a problem, I don`t know how to connect then to this database, I don`t know how the jdbc URL to this databse should look like. Has somebody done something like this? Thanks in advance for any help. Pozdrawiam Brzezi -- [ E-mail: [EMAIL PROTECTED] ][ Ta sygnatura zostala automagicznie ] [ Ekg: #3781111 ][ wygenerowana programem Signify v1.14. ] [ LinuxUser: #249916 ][ Po ten i inne super programy, ] [ zajrzyj na http://www.debian.org/ ] == 2 of 2 == Date: Sat, Oct 16 2004 9:52 am From: Jon Martin Solaas <[EMAIL PROTECTED]> Brzezi wrote: > Hi. > > I`m writing a program, I`m usinig hsqldb database embded within it, finally > I`d like pack all application files including database files (*.backup, > *.data, *.script, *.properties) into one *.jar file, but I`v a problem, I > don`t know how to connect then to this database, I don`t know how the > jdbc URL to this databse should look like. > > Has somebody done something like this? > > Thanks in advance for any help. > > Pozdrawiam > Brzezi I'm not sure I understand what you want to do, but you can't store the actual data-files for the database inside a jar file. Maybe, but not very likely, there is some obscure feature of hsqldb that I don't know about allowing you to do this, but generally, a database need to shrink and grow it's data-files, delete files and create new ones. I don't see how that could happen inside a jar-file. -- jonmartin.solaas¤h0tm4i1 ========================================================================== TOPIC: java package http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/90918bac981d581 ========================================================================== == 1 of 2 == Date: Sat, Oct 16 2004 7:04 am From: "Matko Klaic" <[EMAIL PROTECTED]> I have tryied what you said, but it doesnt work. import java.io.*; import javax.servlet.*; import javax.servlet.http.*; error: package javax.servlet does not exist I understan now what a package is. where is javax.servlet located? or in whish directory? Thanks == 2 of 2 == Date: Sat, Oct 16 2004 9:15 am From: "VisionSet" <[EMAIL PROTECTED]> "Matko Klaic" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have tryied what you said, but it doesnt work. > > import java.io.*; > import javax.servlet.*; > import javax.servlet.http.*; > > error: package javax.servlet does not exist > > I understan now what a package is. > > where is javax.servlet located? or in whish directory? > I don't know what was wrong with replying to the existing thread, but still. The package you require is not included with J2SE, you need J2EE or it is available with a Servlet container such as Apache's Tomcat, which you will also likely need. -- Mike W SCJP, SCJD Self congratulation for a limited time only! ========================================================================== TOPIC: Anyone using Amazon Web Service for a FULL eCommerce site? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/adeab65cb4701c24 ========================================================================== == 1 of 1 == Date: Sat, Oct 16 2004 9:49 am From: [EMAIL PROTECTED] (David) I have been looking at the Amazon Web Service with interest, but it is unclear from the documentation if the whole transaction from start to finish is exposed as a web service or just the searching for a product. All of the associate web sites that they list seem to jump back to the Amazon Web site once the user clicks on 'buy'. I was just wondering if it is possible to use the Amazon Web Service to perform a whole transaction without the need to jump back to the Amazon website for the payment bit? If anyone knows of any good examples of web sites that use Amazons Web Service then please post them here, I would like to take a look and see whats possible. Thanks David Bevan http://www.davidbevan.co.uk ========================================================================== TOPIC: UTF-8 from MySQL http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/85120c01e1829a3b ========================================================================== == 1 of 2 == Date: Sat, Oct 16 2004 10:05 am From: Jonck <[EMAIL PROTECTED]> Hi everybody, I'm having problems retrieving strings from MySQL in UTF-8. I know (or at least I'm pretty sure) that the strings are being written to the database correctly, because when I use the mysql command-line utility and do a SELECT I see the correct strings there. However, when I retrieve the strings they are not formatted correctly. For example, if I write the string "Knäckebröt" to the database and then try to retrieve it, it comes out as "KnÃ?ckebröt". I read the Connector/J manual, where it tells me to do the following to write and read UTF-8 strings to and from MySQL: When opening a connection with MySQL I should use the following code: Properties props = new Properties(); props.setProperty("characterEncoding", "utf-8"); conn = DriverManager.getConnection(connectionString, props); However, when I now try to read a string from a resultset, for example ( where results is a JDBC ResultSet): String messageText = results.getString("messageText"); the text comes out garbled. Does anybody have any suggestions for me to be able to retrieve the text with the correct encoding? Thanks very much, Jonck == 2 of 2 == Date: Sat, Oct 16 2004 10:23 am From: Jonck <[EMAIL PROTECTED]> My apologies, I meant to post this to c.l.j.databases but it went here instead. I will repost to that group, please don't respond in this thread. Thanks, Jonck ========================================================================== TOPIC: Opposite of ResultSetMetaData.getColumnName() ?? Is not: putColumnName() http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f8f22c33b7f5480e ========================================================================== == 1 of 1 == Date: Sat, Oct 16 2004 10:10 am From: [EMAIL PROTECTED] (Arnold Peters) As well known I can retrieve the column names by a java code similar to the one below. But how do I put the column names into the database which I retrieve later? There is no function like putColumnName() ResultSetMetaData rsmd = rs.getMetaData(); int maxcol = rsmd.getColumnCount(); for(int col=1; col<=maxcol; col++) System.out.println(rsmd.getColumnName(col)); Arni ======================================================================= You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer". comp.lang.java.programmer [EMAIL PROTECTED] Change your subscription type & other preferences: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe Report abuse: * send email explaining the problem to [EMAIL PROTECTED] Unsubscribe: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe ======================================================================= Google Groups: http://groups-beta.google.com
