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

Today's topics:

* When and why to use EJB in our project? - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/407fd30086649d1a
* JSP compilation time difference? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/71db042e9bc46415
* Multidimensional hash - 3 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb079f5a11951085
* Rules Engines - Best Practices? - 2 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a79bfcda56e2b81c
* Java 1.5 where to get info from ? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3d8a99f29fbf389b
* Unable to establish a socket connection - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3db1070c05ec0b49
* opinion on coding standard - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f96751a1d317c1a
* can setter method have more than 1 parameter in JavaBeans? - 1 messages, 1 
author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a3615012bac90dec
* search(Object criteria) - to vague? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8c9970db76f9ab70
* javax.comm - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4b1823ed49da2e4b
* Finding Date Difference - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9df8bc4e9c538dd
* Running programs in (networked) DOS window - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f76fd24178be761c
* Memory leak - 3 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/03d171ccb3bbc421
* display files that have been uploaded - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9ca190ea38dc5192
* Web page to build a web page - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ccb4904138d47a5e
* Beginning EJB - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d49babfdb472b21c
* My understanding in "new" keyword - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/62e90e8bce4915a9
* BigDecimal: Sun? IBM? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d8e6c9d469d029de
* 9.2 AQ trigger using JMS .... creating 2 rows in my AQ table! - 1 messages, 1 
author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c5942d5c802215a0

==============================================================================
TOPIC: When and why to use EJB in our project?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/407fd30086649d1a
==============================================================================

== 1 of 2 ==
Date: Fri, Dec 3 2004 7:37 am
From: [EMAIL PROTECTED] (Matt) 

When we want to invoke a remote object on remote machine, most people
use EJB to do that. Other than EJB, what are the alternatives? RMI and
CORBA? The real question is when and why we need to use EJB in our
project? I know there are overheads if we over-use or mis-use EJB.

Please advise. Thanks!!



== 2 of 2 ==
Date: Fri, Dec 3 2004 8:03 am
From: Michael Borgwardt 
 

Matt wrote:

> When we want to invoke a remote object on remote machine, most people
> use EJB to do that.

Not really.


> Other than EJB, what are the alternatives? RMI and
> CORBA?

Or SOAP. Probably dozens more.


> The real question is when and why we need to use EJB in our
> project?

The main reasons to use EJBs are:

- Buzzword-compilance
- Easy distributed transaction management
- Easy clustering




==============================================================================
TOPIC: JSP compilation time difference?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/71db042e9bc46415
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 5:29 am
From: [EMAIL PROTECTED] (jdhovland) 

Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> On Fri, 03 Dec 2004 01:46:01 GMT, Alex Kizub wrote:
> 
> > Always, with cash ..
> 
> Note 'cache' -> 'storage place, rather than 'cash' -> 'money as
> coin or notes'.
> 
> > ..in browser.
> 
> [ Normally I do not comment on misspellings, but this is a 
> technical matter where a person might get entirely the wrong 
> idea if they looked up 'cash' in a dictionary and tried to 
> relate that to browser behaviour. "What do mean I need to 
> pay my browser?!?"  ;-) ]

Thanks alot. Cash goes into a bank, cache is a bank that information
that is frequently used is kept.




==============================================================================
TOPIC: Multidimensional hash
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb079f5a11951085
==============================================================================

== 1 of 3 ==
Date: Fri, Dec 3 2004 7:57 am
From: Michael Borgwardt 
 

Todd B. wrote:
>> That's because such a thing does not exist, not exactly the way you 
>> imagine it.
>> Write a class that has your parameters as fields, implement equals() and
>> hashCode() for it, and use it as a key. Using Generics, you could 
>> probably do
>> that in a generic, typesafe way using an array of Object.
>>
>> It might be that the Apache Commons Collections have something like 
>> that, but I
>> doub it:
>> http://jakarta.apache.org/commons/collections/
> 
> 
> That is what I was afraid of that I would have to write a couple of 
> hundred lines of Java to convert a few lines of Perl.

It's more on the order of a couple of dozen lines of Java, unless
you want a reusable solution for a variable number of "dimensions" and
variable types in each dimension.



== 2 of 3 ==
Date: Fri, Dec 3 2004 6:52 am
From: "Todd B."  

Michael Borgwardt wrote:
> Todd B. wrote:
> 
>> I would like to create a multidimensional hash such as:
>>
>> my %hash{string}{integer}{integer}= double || "";
>>
>> or (less desirable):
>>
>> my %hash{integer}{integer}{integer}= double;
> 
> 
> comp.lang.perl is that way ----->
Yes, I am headed back to the light as soon as I can.
> 
>> I have googled and search Sun's (sic) documentation and have not found 
>> any examples.
> 
> 
> That's because such a thing does not exist, not exactly the way you 
> imagine it.
> Write a class that has your parameters as fields, implement equals() and
> hashCode() for it, and use it as a key. Using Generics, you could 
> probably do
> that in a generic, typesafe way using an array of Object.
> 
> It might be that the Apache Commons Collections have something like 
> that, but I
> doub it:
> http://jakarta.apache.org/commons/collections/

That is what I was afraid of that I would have to write a couple of 
hundred lines of Java to convert a few lines of Perl.

Thanks,

Todd



== 3 of 3 ==
Date: Fri, Dec 3 2004 6:49 am
From: "Todd B."  

Andrew Thompson wrote:
> On Thu, 02 Dec 2004 15:28:14 -0600, Todd B. wrote:
> 
> 
>>The other question is how to set a double to null?
> 
> 
> You can set a Double and Integer or an Object to null, but 
> you cannot assign null to any primitive like int, double, 
> float or boolean.
> 
Thanks for the clarification.

Todd




==============================================================================
TOPIC: Rules Engines - Best Practices?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a79bfcda56e2b81c
==============================================================================

== 1 of 2 ==
Date: Fri, Dec 3 2004 7:48 am
From: [EMAIL PROTECTED] (Cindi Jenkins) 

Will check out your book. Seems as if the author has updated it with
additional wisdom.

http://blogs.ittoolbox.com/eai/leadership/



== 2 of 2 ==
Date: Fri, Dec 3 2004 7:49 am
From: [EMAIL PROTECTED] (Cindi Jenkins) 

Gregory Toomey <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Cindi Jenkins wrote:
> 
> > Anyone know of best practices for rules engines. The only thing I
> > could find was at:
> > http://blogs.ittoolbox.com/eai/leadership/archives/002172.asp
> 
> RESE and predicate logic in the link points to artificial intelligence.
> This is a HUGE subject area so I dont know why you cant find much.
> 
> Do a search for deductive databases or expert systems.
> 
> gtoomey

I guess I was looking for something more distilled and understandable
by corporate types....




==============================================================================
TOPIC: Java 1.5 where to get info from ?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3d8a99f29fbf389b
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 5:57 am
From: "Paul Sagar"  

> Hi I've read a little about java 1.5 and the language changes but
> there also seems to be a whole load of API changes  & additions. Is
> there a site that lists not just all the language changes but also all
> the other changes that have taken place ?

A summary can be found at
http://java.sun.com/developer/technicalArticles/releases/j2se15langfeat/

and a discussion regarding new swing updates at
http://java.sun.com/developer/JDCTechTips/2004/tt1102.html#2






==============================================================================
TOPIC: Unable to establish a socket connection
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3db1070c05ec0b49
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 8:18 am
From: [EMAIL PROTECTED] (S J Rulison) 

If I type in System.out.println(getCodeBase.getHost()); in the Applet
source code, I get this compilation error message:
Applet1:java:34: cannot find symbol symbol: variable getCodeBase


If I type in System.out.println(getCodeBase().getHost()); in the
Applet source code, it compiles w/o any errors but when I run it I get
this runtime error message:
Check point 1
Check point 2
java.lang.NullPointerException
        at java.applet.Applet.getCodeBase(Unknown Source)
        at Applet1.<init>(Applet1.java:22)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance0(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at sun.applet.AppletPanel.createApplet(Unknown Source)
        at sun.plugin.AppletViewer.createApplet(Unknown Source)
        at sun.applet.AppletPanel.runLoader(Unknown Source)
        at sun.applet.AppletPanel.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Here is the source code for the Applet:

/*      Program Name: Applet.java

        Purpose: Demonstrate a socket connection from the APPLET side over
        the network.
*/
import java.applet.*;
import java.net.*;
import java.io.*;

public class Applet1 extends Applet
{
        //Constructor
        public Applet1()
        {
                try
                {

                        System.out.println("Check point 1");
                        Socket s = new Socket("10.44.1.250", 1427);
                        
                        System.out.println("Check point 2");
                        System.out.println(getCodeBase().getHost() );


                        //This generates a compilor error                       
                        // System.out.println(getCodeBase.getHost() );


                        System.out.println("Check point 3");
                }
                catch(Exception e)
                {
                        e.printStackTrace();
                        System.out.print("Socket connection unsuccessful.");
                }//End of catch block.
        }//Constructor

        public void init(){}
}//End of class Applet1.


Here is the source code for the server:

/*  Class name: Server1

        Purpose: Demonstrate a socket connection from the SERVER side over 
        the network.    
*/
import java.net.*;
import java.io.*;

public class Server1 
{
        public static void main(String[] Args)
        {
                try
                {
                        ServerSocket ss = new ServerSocket(1427);
                        Socket s;

                        while(true)
                        {
                                s = ss.accept();
                        }
                }catch(IOException e)
                {
                        e.printStackTrace(System.err);                  
                }
        }//End of main.
}//End of class Server1




==============================================================================
TOPIC: opinion on coding standard
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f96751a1d317c1a
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 5:13 am
From: David Zimmerman  



Tim Ward wrote:
> "Michael Borgwardt" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> 
>>For example, extreme programming strongly discourages "code ownership".
> 
> 
> As did "egoless programming" and pretty well every other "methodology"
> invented since the early 1980s.
> 
> If someone wants to "own" some code and not let anyone else work on it then
> in approximately 100% of cases this is simply because the code is crap and
> they don't want anyone to find out.
> 

I've always tried to maintain that when things are going well, "our 
code" is the reason, but if there are bugs, the bugs are in "my code".




==============================================================================
TOPIC: can setter method have more than 1 parameter in JavaBeans?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a3615012bac90dec
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 7:37 am
From: [EMAIL PROTECTED] (Matt) 

In JavaBeans, the getter and setter methods always have signatures like this:
        public void setXxx(Type xxx)
        public Type getXxx()

Can we declare a setter method that takes more than 1 parameter, like
        public void mysetter(Type xxx, Type yyy)
This article (http://www.it-careernet.com/itc/javabeantechnology.htm) 
in Indexed Properties section has 2 parametes in setter method. 

I am confused.

Please advise. Thanks!!




==============================================================================
TOPIC: search(Object criteria) - to vague?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8c9970db76f9ab70
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 6:38 am
From: "VisionSet"  



"John C. Bollinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

> I would not be comfortable with that.  I would at least want something
> along the lines of
>
> interface SearchCriteria {
>      List asList();
> }
>
> abstract class AbstractController {
>      <some return type> search(SearchCriteria criteria);
> }
>
> The specific details of the SearchCriteria interface are not much
> relevant -- you could even reduce it to a tag interface if that suits
> you.  The point is to apply at least a minimum level of type safety, so
> if you are using 1.5 then Michael's suggestion of applying generics to
> the problem might be a better solution.
>

mmm,
Lets introduce the DAO in to the picture.

View calls controller with some specific criteria that the controller makes
sense of because it is the client of the view. It then formats it correctly
to request results from the DAO.  What responsibilities does the concrete
SearchCriteria class have?

The controller can do searchCriteria.asDAOCriteria()
could return a String[], this puts DAO knowledge onus on the SearchCriteria
class.

That sort of thing okay?

--
Mike W






==============================================================================
TOPIC: javax.comm
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4b1823ed49da2e4b
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 9:42 am
From: Knute Johnson  

lin shen wrote:
> Has anyone out there tried to use javax.comm to communicate with a rfid
> reader?
> 
> lin
> 
> 

No, but I've gotten lots of other serial devices to work.  I've never 
heard of any successful parallel interface projects though.

-- 

Knute Johnson
email s/nospam/knute/




==============================================================================
TOPIC: Finding Date Difference
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9df8bc4e9c538dd
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 4:47 am
From: "Mick"  


"Andrew Thompson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 02 Dec 2004 19:44:08 GMT, Mick wrote:
>
> > C:\....._jsp.java:35: expected
> ...
>
> expected ..what exactly?  The compiler is usually more specific.

Yes it is but in this case that is all it had for 'expected'.

There was also this:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file

Mick

>
> -- 
> 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: Running programs in (networked) DOS window
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f76fd24178be761c
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 7:07 am
From: "TC"  

Steve Horsley wrote:

> TC wrote:
> > I'm new to Java and working on some examples so I hope this comes
> > out correct.
> > 
> > Win2K
> > J2EE 1.3
> > 
> > I have a networked drive (f:) where I want to run a java program.
> > This is another physical machine.  I'm using the DOS window to
> > access this drive.
> > 
> > Then, I want to use a local drive (c:) to run another java program.
> > These two programs will "talk" with each other via "topic" (JMS).
> > 
> > My question:  Will the program on f: be actually running on the
> > other machine or is the code and memory pulled over to the local
> > machine that is mapping the drive?
> > 
> > I hope that makes sense.
> 
> The program on F: will be downloaded into the memory of the local
> machine, and then executed by the local machine CPU. The only code
> run on the remote machine will be its file-sharing code.
> 
> Steve

That's what I figured.  Thanks!




==============================================================================
TOPIC: Memory leak
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/03d171ccb3bbc421
==============================================================================

== 1 of 3 ==
Date: Fri, Dec 3 2004 4:38 am
From: Michael Borgwardt 
 

Tim Ward wrote:
> Your application is quite likely not leaking memory - the problema are
> simply that you've chosen to write it in Java, which behaves like this,

Depends on the definiton of "inactive". To me, it means that all the
application's threads are blocked or waiting. And in such a state,
heap size should be constant.

So either the JVM does soemthing it shouldn't, or the application is
not, in fact "inactive".



== 2 of 3 ==
Date: Fri, Dec 3 2004 6:00 am
From: "John C. Bollinger"  

Anon wrote:

> I have a strange problem. There is a memory leak in my application
> which grows steadily even if no action is being performed on it. AFter
> some initial action, when the application is left running with no
> action ebing performed,  the memory usage  by means of the Task
> Manager by process java.exe (virtual machine) grows steadily. But if I
> minimize Command Prompt window, memory drops down (from 100-120MB)
> almost to 10MB. Then it grows again. The memory in the task manager
> keeps on increasing even with no action on the application. COuld
> anyone give a clue on this?

If you want to dig into the details then obtain one of the various 
programs called "heap profilers" and use it to examine your 
application's behavior.  Java applications do not have memory leaks per 
se, but they can be written in such a way that they hold on to objects 
that they no longer need, thus consuming more memory than they actually 
require and possibly demanding increasing memory without bound.  That 
does not sound like the problem in this case, however.  As Tim Ward 
suggested, a JVM might easily exhibit such behavior under normal 
operation for any random program.  If you want to limit the maximum 
memory consumption then your JVM may offer command-line options that 
help; for Sun's you would want to look at -Xmx.


John Bollinger
[EMAIL PROTECTED]



== 3 of 3 ==
Date: Fri, Dec 3 2004 8:00 am
From: "xarax"  

"John C. Bollinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Anon wrote:
>
> > I have a strange problem. There is a memory leak in my application
> > which grows steadily even if no action is being performed on it. AFter
> > some initial action, when the application is left running with no
> > action ebing performed,  the memory usage  by means of the Task
> > Manager by process java.exe (virtual machine) grows steadily. But if I
> > minimize Command Prompt window, memory drops down (from 100-120MB)
> > almost to 10MB. Then it grows again. The memory in the task manager
> > keeps on increasing even with no action on the application. COuld
> > anyone give a clue on this?
>
> If you want to dig into the details then obtain one of the various
> programs called "heap profilers" and use it to examine your
> application's behavior.  Java applications do not have memory leaks per
> se, but they can be written in such a way that they hold on to objects
> that they no longer need, thus consuming more memory than they actually
> require and possibly demanding increasing memory without bound.  That
> does not sound like the problem in this case, however.  As Tim Ward
> suggested, a JVM might easily exhibit such behavior under normal
> operation for any random program.  If you want to limit the maximum
> memory consumption then your JVM may offer command-line options that
> help; for Sun's you would want to look at -Xmx.

Probably also want to test the application using both
-Xms and -Xmx command line parameters specifying the
same value like: -Xms500m -Xmx500m

That will cause the JVM to not free heap memory back
to the operating system. The application will initialize
with 500MB and it will neither free nor allocate any
heap memory from the OS after initializing. Now then,
if later on the application yields an OutOfMemoryError,
then you probably have memory leak.







==============================================================================
TOPIC: display files that have been uploaded
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9ca190ea38dc5192
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 9:03 am
From: [EMAIL PROTECTED] (omnionli) 

I am having trouble finding a script that will display the files that
the end-user has uploaded to my server.

I am on a Linux account with my hosting service.

What I would like to accomplish is the following.

After the end-user has uploaded their file(s) to my server via a java
ftp applet:  I need to display (list, show) the files that the
end-user has uploaded to me on that webpage.

Any help in this matter or suggestions will be greatly appreciated.

ULTIMATELY!!!

1.  I would like a single script that prompts the end-user for their
user name and password (the username and password of the FTP
sub-account) that I created and supplied to them.

2.  Allow them to browse their local computer and upload files to me. 
Important note:  I have tried CGI and PHP scripts to accomplish this
and they work.  But I CANNOT use CGI or PHP because of the max file
upload limit on my hosting server.  I have checked with the admin of
my web server and they can only increase the max to 10 MB.  I will be
transferring much larger files, 50 - 100 MB at a time.  CGI = 2MB max,
PHP = 10MB max on my hosting server.  So this is where JAVA comes in.

3.  Along with a progress bar (indicating that a file is being
uploaded), I would like the files that have been uploaded to the host
server to be displayed so that the end-user will know that the files
made it across and not attempt to upload the same file again and
again.

!!! I have looked at UnlimitedFTP and I am uninterested in spending
$500.00 on their script.  I understand that this will solve all of the
above issues, but I was hoping for a different solution.




==============================================================================
TOPIC: Web page to build a web page
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ccb4904138d47a5e
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 5:38 am
From: "andreas kinell"  

> Does anyone have any suggestions or examples of creating a web page to
> allow an end user to design a form. I need to design an application
> where the end user (administrator) can design a form with standard
> html components such as text boxes, drop down lists etc. Attach drop
> down list to database tables, and enter expression for certain fields.
> Then once the form is saved another user (business) can display the
> form and fill it in, at which time the expressions would be evaluated
> based on the data entered.

since you're posting here i assume you want to program it in java.
try google with "html generator", "java". there are a lot of
applications around already.

andreas 






==============================================================================
TOPIC: Beginning EJB
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d49babfdb472b21c
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 5:28 am
From: Andrew Thompson  

On Fri, 03 Dec 2004 07:16:37 -0500, Darryl L. Pierce wrote:

> Andrew Thompson wrote:
> 
>> As as aside, I have noticed a spate of postings from Google groups 
>> where the message is repeated.  Is there some problem with the 
>> Google interface?  Are you using the beta-groups or the standard 
>> groups interface?
> 
> I noticed that as well. The first post is also posted as the first 
> response to the post. Maybe they just had a new release and this was a 
> bug that slipped through QA?

They are currently testing google groups-beta*.  Maybe
that is causing some hiccups.

* You can see it in full glorious one *color* per person here..  ;-)
<http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/96d5fffdd7632438>
or thread form here..
<http://groups-beta.google.com/group/comp.lang.java.programmer/browse_frm/thread/96d5fffdd7632438/9c5d31f8feb21d00>

I cannot say I like the text after one post..
'- Show quoted text -'  ..which effectively hides top-posting.   :-(

[ Oh, and this thread had not made it to the 'beta' message lists yet
..go figure. ]

-- 
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: My understanding in "new" keyword
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/62e90e8bce4915a9
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 9:51 am
From: Grant Wagner  

Starshine Moonbeam wrote:

> AHA! Primitive types. That's what I was thinking of. You don't need to
> use new for the primitive types.
>
> int x = 4;
>
> is the same as
>
> Integer xx = new Integer(4);
>
> x == xx; // returns true

That's autoboxing in Java 1.5 (5.0, whatever). For the source:

public class IntTest {
    public static void main(String[] args) {
        int x = 4;
        Integer xx = new Integer(4);
        System.out.println(x == xx);
    }
}

if you try to compile it prior to 1.5, you get:

IntTest.java:5: operator == cannot be applied to int,java.lang.Integer
        System.out.println(x == xx);
                             ^
1 error

Personally I find the autoboxing behavior distasteful. It seems to me it
will result in a whole generation of programmers that don't understand that
an -int- is not the same as an -Integer-. It may also result in a new
generation of programmers complaining about how "slow" Java is as you see
code like:

Integer ii = new Integer(0);
Integer jj = new Integer(0);
for (ii = 0; ii < 100000; ++ii) {
    for (jj = 0; jj < 100000; ++jj) {
        // do stuff
    }
}
// WHY IS JAVA SO SLOW!

--
Grant Wagner <[EMAIL PROTECTED]>





==============================================================================
TOPIC: BigDecimal: Sun? IBM?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d8e6c9d469d029de
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 5:21 am
From: wald  

Hey group,

I'm considering using the java.math.BigDecimal class for a 
simulation program I'm working on. Reading up on the subject, I've 
come across a bunch of (seemingly outdated?) pages describing 
alternative IBM implementations and specifications improving on 
the functionality [1].

Now, several questions pop up because basically I'm confused by 
these different sources:

* what's the status of the Sun implementation of IBM's 
specifications? There's definitely something going on [2], but it 
isn't really clear to me if it's already implemented in J2SE 1.5.0 
or not.

* if J2SE 1.5.0 doesn't implement it yet, I guess I could use the 
IBM prototype class that's available. But: (i) does it work 
decently with J2SE 1.5.0? (ii) the IBM AlphaWorks licensing [3] 
does not make me feel very comfortable using it in research 
programming, and also mentions a 90 day usage limit... are there 
open source alternatives that can be used without concern? I'm 
talking academic use here.

Anyway, I hope someone here can provide some answers,

Wald

[1] http://www2.hursley.ibm.com/decimal/
[2] 
http://jcp.org/aboutJava/communityprocess/review/jsr013/index.html
[3] http://www2.hursley.ibm.com/decimalj/aworksla.html




==============================================================================
TOPIC: 9.2 AQ trigger using JMS .... creating 2 rows in my AQ table!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c5942d5c802215a0
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 7:40 am
From: [EMAIL PROTECTED] (c) 

Hello.

(the JMS part of this questions is at the bottom)

I have a trigger that's creating two rows in my AQ table, when I
believe it should only be one.

Here's a part of it:

CREATE OR REPLACE trigger order_queue
AFTER UPDATE
OF status_id
ON my_order
FOR EACH ROW
WHEN (new.status_id = 8)
...
dbms_aq.enqueue(queue_name => 'jms_bytes_que', 
                       enqueue_options => enqueue_options, 
                       message_properties => message_properties, 
                       payload => message, 
                       msgid => msgid);

The only difference in the 2 rows that get entered is the step_no
field: one row = 0 and the other  = 1.

Is it my lack of JMS understanding that's causing this? I believe
step_no is part of the JMS requirement.

thanks.

c



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

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