 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- how to set row height at runtime in a JTableHi
i am trying to set rowheight of row in a JTable using
setRowHeight(row,rowheight)
it is not affecting on Table.but if i use setRowheight(rowheight) it
applying
entire table ,please help me to solve this problem
after setRowHeight(row,rowheight), i am calling firechanged() method
also ,i t will not affecting please hemp me
- 1
- ?s about Process ClassI have a DOS program I am trying to supply input to using Java.
Reading from The Java Class Libraries, 2nd Ed. java.lang.Process class -
the material presented seems to imply that I will be able to do
this.
The program most definately uses just stdio... (in) being the keyboard and
(out) being the consol.
Well I can't get it to work and being the presistant bugger that i am I have
switch tactics so I can more up the learning curve.
I have resorted to just trying to display the output of mem.exe.
here is the source ::: test.java
import java.io.*;
import java.lang.*;
public class test
{ public static void main(String[] args)
{
int ch;
int status;
try
{
Process process = Runtime.getRuntime().exec("mem.exe");
InputStream in = process.getInputStream();
BufferedInputStream buf = new BufferedInputStream(in);
//try
//{
//status = process.waitFor();
//}
//catch (InterruptedException e) {status = -1;}
try
{
while((ch = buf.read()) != -1)
{
System.out.print((char)ch);
}
}
catch (IOException e) {System.out.println(e);}
//in.close();
//buf.close();
//process.destroy();
//Runtime.getRuntime().gc();
//Runtime.getRuntime().exit(-1);
//System.out.print('\n');
}
catch (IOException e) {System.out.println(e);}
}
}
It works the first time I run the class file with java test.
However, the next attempt hangs and requires a system restart inorder to get
the code to display the results.
The commented code in test.java are my attempts to do various things to
clean up this issue of not displaying the results.
Does anyone have a clue or suggestion...
thanks,
publius36
- 2
- Problem in connecting to a proxyHi,
i need to see if a user enters the correct username/password to
authenticate to a proxy. My problem is... through the following code,
i am
able to connect to a proxy with even invalid username/passwords.
Suppose
if the valid username and password to a proxy is test/test , i am able
to connect to the proxy using x/x . the response code returned is
always 200. Please advice..
################################
public static boolean isValidProxyAccount(String proxyServer,String
proxyPort,String proxyLogin,String proxyPassword) throws IOException
{
String go_url = new String ("http://www.google.com/");
boolean VALID_STATUS = true;
try{
URL url = new URL(go_url);
System.getProperties().put("proxySet",
"true");
System.getProperties().put("http.proxyHost", proxyServer);
System.getProperties().put("http.proxyPort", proxyPort);
HttpURLConnection con = (HttpURLConnection)
url.openConnection();
Base64Encoder b1 = new
Base64Encoder(proxyLogin+":"+proxyPassword);
con.setAllowUserInteraction(true);
String enStrProxy = "Basic "+ b1.processString();
con.setRequestProperty("Proxy-Authorization", enStrProxy);
int code = con.getResponseCode();
String retMsg = con.getResponseMessage();
System.out.println("code::"+code);
System.out.println("retMsg::"+retMsg);
System.getProperties().put("proxySet", "false");
System.getProperties().remove("http.proxyHost");
System.getProperties().remove("http.proxyPort");
con.disconnect();
if (code != 200){
VALID_STATUS = false;
throw new IOException("Failed to connect to CCO: "+retMsg);
}
}catch (Exception ex){
System.out.println(ex.getMessage());
throw new IOException(ex.getMessage());
}//catch
return VALID_STATUS;
}
- 3
- JacOrb Multihomed serverHi everybody,
we have problems running a corba-server on a multi-homed Win2k-Box.
The machine has two network-cards. JacOrb is using the wrong IPAddress
for IOR's.
I tried the property OAIAddr. Only setting the property to 127.0.0.1
and running server and client on the same machine was successful.
Using the real address failed.
Does anyone have an advise for me ?
Thanks in advance
Ruediger
- 5
- EMPTY_SET.iterator() and generics
In the old days, before generics, I wrote
private SortedSet onhand;
Iterator getInventoryIterator() {
return (onhand == null ? Collections.EMPTY_SET ? onhand)
.iterator();
}
... the idea being to create the SortedSet only if there are
actually some Inventory objects to store in it, and to return
a suitable Iterator whether or not the SortedSet exists.
Now, in an effort to leave prehistory behind me and adopt
generics with all their benefits, I change the SortedSet to a
SortedSet<Inventory> and change the return type of the method
to Iterator<Inventory> -- but how do I rewrite the guts of the
method to get the compiler to understand that all is well? The
problem seems to be that Collections.EMPTY_SET.iterator() returns
an Iterator<Object>, and the compiler complains when I try to
return this in place of the desired Iterator<Inventory>. I've
tried a few variations, but have only succeeded in moving the
warning message around, not in eliminating it:
return (onhand == null
? (Set<Inventory>)Collections.EMPTY_SET : onhand)
.iterator();
return (Iterator<Inventory>)
(onhand == null ? Collections.EMPTY_SET ? onhand)
.iterator();
This seems like a lot of trouble to take over the empty set,
but there ought to be *some* clean way to do it. Ideas?
--
Eric Sosman
email***@***.com
- 9
- Reflection and access to type parameter?Given the SSCCE below, the need to pass A.class and B.class in
lines 25 and 25 seems redundant. However, I can find nothing in
the language that would let that be done in the constructor,
between lines 18 and 19. The obvious would be
Class<T> x = T.class;
but that of course does not work. Is there any bridge at all
between reflection and generics? I suspect the answer is no
and the code below is the best that can be done, but I'm
not sure.
1 import java.lang.reflect.Method;
2 public class TestEnums
3 {
4 public static enum A
5 {
6 V1,
7 V2;
8 }
9 public static enum B
10 {
11 X1,
12 X2,
13 X3;
14 }
15 public static class C<T extends Enum<?>>
16 {
17 public C(Class<T> x) throws Exception
18 {
19 T[] eVal = x.getEnumConstants();
20 for (Enum<?> v : eVal) System.out.println(v.toString());
21 }
22 }
23 public static void main(String[] args) throws Exception
24 {
25 C<A> ca = new C<A>(A.class);
26 C<B> cb = new C<B>(B.class);
27 }
28 }
- 10
- Multiple Exception Definitions in One FileIn Ada I could have a package that consisted of a group of exception
declarations, and any compilation unit that "withed" in that package
could use them. On the other hand if I want to use my own customized
exceptions in Java, it looks like I have to declare each one individu-
ally in its own file. Is this really what I have to do, or is there a
way to declare a bunch of exceptions in one file so that I can use
them elsewhere?
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_
- 10
- DES in javaHi,
I need to write a method in Java for
encrypt a String with DES.
the interface is:
public String encrypt(String nameofthestringtoencript);
the return String have to be DES(nameofthestringtoencript)
What is the procedure to follow and the java methods
to do it?
Thanks in advance.
- 11
- Read contents of a web pageI need to read the entire contents of any webpage, and return it as a
String. The other part of my assignment was to read a file and return its
contents. I did that with the following code:
private String filename;
private String contents;
public TextFileReader(String aFileName){
filename = aFileName;
}
public String readText() throws IOException{
String lineSep = System.getProperty("line.separator");
BufferedReader input = new BufferedReader(new
FileReader(filename));
String nextLine = " ";
StringBuffer contents = new StringBuffer();
while((nextLine = input.readLine()) != null){
contents.append(nextLine);
contents.append(lineSep);
}
return contents.toString();
}
----------
So, what do I have to change to be able to read webpages?
- 12
- Hiding default console in Windows Hello. Is it possible to hide the default console window in MS-Windows
in Java? If so, how?
When writing a Swing/JFC application in Java, it would be really nice to
somehow hide the DOS window that appears.
Thanks in advance.
--
Randolf Richardson - kingpin+email***@***.com
The Lumber Cartel, local 42 (Canadian branch)
http://www.lumbercartel.ca/
- 12
- JMS: the confusion BEFORE writing my first Application.I read in the sun jms doc that jms is the java interface to
Middleware, like MQ series.
Does this mean I actually need MQ series? ITs to expensive. Im
already in the programming world, so this is not a school project. My
boss came to me and told me that he would like to connect to a remote
MQ series machine. With it.
Now I have taken the channel and decided to write something at my desk
with out connecting to the remote mq. I mean, even if i didnt have to
do this project, i would still like to learn it.
I really thought that j2ee already had a queing facility built in so I
didnt need to buy mq series.
If i do need a middle where queue piece, then are there any free ones.
I thought i could go into the j2ee command line tool and just set up
the queues the way they have it in the example
Can you straighten out my confusion?
jodasi
- 13
- jbuilder 2005 backward compatabilityHi
I have a project that created by jbuilder X, in the "design" panel,
everything work great, but when i use jbuilder 2005 to open it, it
only display gray. Do you know why?
thanks
from Peter (email***@***.com)
- 14
- ports/71078: Update port: java/eclipse-pmd upgrade to supportSynopsis: Update port: java/eclipse-pmd upgrade to support eclipse3
State-Changed-From-To: open->feedback
State-Changed-By: linimon
State-Changed-When: Thu Sep 2 23:17:52 GMT 2004
State-Changed-Why:
Please submit port updates in diff -u format as versus the current
port. This makes it much easier for ports committers to understand
what is being changed. Thanks.
http://www.freebsd.org/cgi/query-pr.cgi?pr=71078
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 14
- GUI program locking up...I'm using Netbeans 5.0 beta for an IDE, with swing components. The
situation is something like this:
The program is a board game - the user chooses a building from a panel,
and then is supposed to get a message to choose what resource to pay
for it with. Here's a trace of the code:
Game (main object):
....
board[i].activate():
Game.game.setPlayer(worker);
Game.game.playerMessage("Choose a wooden building
from the building panel.");
Game.game.waitForBuild(type) :
built = false;
state = type + Game.BuildWood -
1;
mainPanel.buildings.getBP().setSelectedIndex(type-1);
while(!built)
{ Thread.yield(); }
No problems yet. This works fine, unless a building that needs to call
chooseResource is selected.
So, the user clicks one of these buildings, which activates the
following code, which is where the freeze occurs:
String r = Game.game.chooseResource():
state = Game.chooseResource;
resource = "";
while(resource.length()==0)
Thread.yield();
return resource;
Now chooseResource does work in any other context - resource gets set
by a mouseClicked event handler in a panel out there. But at this
point, the GUI stops responding. The playerMessage never gets printed,
and the click event never gets triggered. I did some investigating,
printing out numbers inside the two inmost loops, and the
chooseResource loop is continually running. I know the code's ugly,
but even so, the cause of this behavior is beyond me. Any suggestions
would be greatly appreciated!
- 16
- Riddle me thisOn Mon, 07 Nov 2005 11:35:27 GMT, "Sharp Tool"
<email***@***.com> wrote, quoted or indirectly quoted someone
who said :
>All these distribution dont include negative numbers?
A normal is clustered about a mean, nominally 0, with symmetric tails
left and right.
Poisson is a distribution of positive numbers.
Just what do these numbers measure?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
| Author |
Message |
hilz

|
Posted: 2004-12-27 12:29:00 |
Top |
java-programmer, learning J2EE
Hi all,
I have been a java developer for around 5 years, and I think it is time to
move into the J2EE arena.
Just by looking at monster.com, it becomes very obvious how important J2EE
has become, and if anyone is planning to make Java their bread and
Given that J2EE is not used in my current job, what is the best way to learn
it on my own and in my free time?
I looked at the websites of community colleges and universities around my
area, and I found that they only offer beginner and intermediate Java
classes, with no emphasis on J2EE.
What do you guys think is a good way to achieve this goal? How do
programmers usually make the transition from Java programmers to J2EE?
I have already experimented with Tomcat and some basic jsp stuff, but i am
sure J2EE is much more than that.
Any idea is greatly appreciated, and if you have a success story, please
share it here!
Cheers
hilz
|
| |
|
| |
 |
hilz

|
Posted: 2004-12-27 12:32:00 |
Top |
java-programmer >> learning J2EE
Premature clicking!
here is the corrected version of the question.
Hi all,
I have been a java developer for around 5 years, and I think it is time to
move into the J2EE arena.
Just by looking at monster.com, it becomes very obvious how important J2EE
has become, and if anyone is planning to make Java their bread and butter,
one has to learn J2EE.
Given that J2EE is not used in my current job, what is the best way to
learn
it on my own and in my free time?
I looked at the websites of community colleges and universities around my
area, and I found that they only offer beginner and intermediate Java
classes, with no emphasis on J2EE.
What do you guys think is a good way to achieve this goal? How do
programmers usually make the transition from Java programmers to J2EE?
I have already experimented with Tomcat and some basic jsp stuff, but i am
sure J2EE is much more than that.
Any idea is greatly appreciated, and if you have a success story, please
share it here!
Cheers
hilz
|
| |
|
| |
 |
Rhino

|
Posted: 2006-7-4 1:58:00 |
Top |
java-programmer >> learning J2EE
I've been reading a lot of job descriptions lately and I have the distinct
impression that most professional Java programming jobs are looking for J2EE
skills. I've been coding in Java for quite a while but I've largely confined
myself to J2SE. I've written a variety of applications, applets, servlets
(using Tomcat), and even some J2ME midlets. Unfortunately, I'm not seeing
much demand for _any_ of those skills so I think I need to learn J2EE to be
attractive to employers in the job market.
So, assuming you agree that J2EE is the way to go - and please tell me if
you don't agree since I'd be quite happy to do a job that uses the skills I
already have - how do I go about learning J2EE quickly but relatively
painlessly? And inexpensively! I'm afraid money is tight and I don't have
hundreds or thousands of dollars to spare to buy expensive software or
shelves full of books.
There is a lot of buzz about open source projects lately so I was giving
some thought to participating in one of those projects so that I could learn
these technologies. But that fact of the matter is that it's mostly alphabet
soup to me right now: I'm not really sure what most of the technologies
actually are.
For example, I was at JBoss.org just now and found lots of documentation
that seemed moderate to advanced but very little in the way of basics. I was
not able to find anything that says what JBoss actually _is_. I _thought_ it
was a servlet container the way Tomcat is but
http://www.jboss.com/docs/index describes it an an application server and
lists both JBoss and Tomcat as "JEMS Products" - without explaining what
JEMS is. In short, I find myself getting snarled up trying to understand
what the different pieces are and how they interrelate but not knowing how
to find out.
Now, let me emphasize that I probably don't _care_ that much about JBoss in
particular. I'm really just using this as an example to explain where I am
and where I want to go.
I think I basically need some kind of grand orientation tour to find out
what all of these products and techologies are, at least in basic terms.
I've been seeing a lot of acronyms in the job descriptions and I think I
need some kind of a roadmap or overview or something so that I know what the
different pieces _do_ and how they fit together. I can look up the meaning
of an acronym easily enough on my own but knowing the JAXB stands for Java
Applications Xylophone Brigade (or whatever it REALLY stands for) doesn't
tell me what JAXB _does_ and how it integrates with JBoss. Or is it a
replacement for JBoss? I really don't know if they tie together in some way,
are completely independent, or are alternatives to one another.
Can someone point me to some kind of J2EE-newbie orientation to help me
start to find my way? Right now, I feel a bit as if I've been kidnapped,
blindfolded, thrown out of a plane over a country I've never heard of, and
landed in a place where I don't know any of the rules. The natives speak
English but they have a very exotic vocabulary and use words like JMeter,
SOAP, and JMX a lot. I have no idea if those are cities in their country,
the names of the political parties, their favourite TV shows, pop stars, or
swear words.
If anyone can suggest an efficient way to get oriented, I would appreciate
it a lot!
|
| |
|
| |
 |
Larry

|
Posted: 2006-7-7 3:30:00 |
Top |
java-programmer >> learning J2EE
Rhino wrote:
> I've been reading a lot of job descriptions lately and I have the distinct
> impression that most professional Java programming jobs are looking for J2EE
> skills. I've been coding in Java for quite a while but I've largely confined
> myself to J2SE. I've written a variety of applications, applets, servlets
> (using Tomcat), and even some J2ME midlets. Unfortunately, I'm not seeing
> much demand for _any_ of those skills so I think I need to learn J2EE to be
> attractive to employers in the job market.
>
> So, assuming you agree that J2EE is the way to go - and please tell me if
> you don't agree since I'd be quite happy to do a job that uses the skills I
> already have - how do I go about learning J2EE quickly but relatively
> painlessly? And inexpensively! I'm afraid money is tight and I don't have
> hundreds or thousands of dollars to spare to buy expensive software or
> shelves full of books.
>
> There is a lot of buzz about open source projects lately so I was giving
> some thought to participating in one of those projects so that I could learn
> these technologies. But that fact of the matter is that it's mostly alphabet
> soup to me right now: I'm not really sure what most of the technologies
> actually are.
>
> For example, I was at JBoss.org just now and found lots of documentation
> that seemed moderate to advanced but very little in the way of basics. I was
> not able to find anything that says what JBoss actually _is_. I _thought_ it
> was a servlet container the way Tomcat is but
> http://www.jboss.com/docs/index describes it an an application server and
> lists both JBoss and Tomcat as "JEMS Products" - without explaining what
> JEMS is. In short, I find myself getting snarled up trying to understand
> what the different pieces are and how they interrelate but not knowing how
> to find out.
>
> Now, let me emphasize that I probably don't _care_ that much about JBoss in
> particular. I'm really just using this as an example to explain where I am
> and where I want to go.
>
> I think I basically need some kind of grand orientation tour to find out
> what all of these products and techologies are, at least in basic terms.
> I've been seeing a lot of acronyms in the job descriptions and I think I
> need some kind of a roadmap or overview or something so that I know what the
> different pieces _do_ and how they fit together. I can look up the meaning
> of an acronym easily enough on my own but knowing the JAXB stands for Java
> Applications Xylophone Brigade (or whatever it REALLY stands for) doesn't
> tell me what JAXB _does_ and how it integrates with JBoss. Or is it a
> replacement for JBoss? I really don't know if they tie together in some way,
> are completely independent, or are alternatives to one another.
>
> Can someone point me to some kind of J2EE-newbie orientation to help me
> start to find my way? Right now, I feel a bit as if I've been kidnapped,
> blindfolded, thrown out of a plane over a country I've never heard of, and
> landed in a place where I don't know any of the rules. The natives speak
> English but they have a very exotic vocabulary and use words like JMeter,
> SOAP, and JMX a lot. I have no idea if those are cities in their country,
> the names of the political parties, their favourite TV shows, pop stars, or
> swear words.
>
> If anyone can suggest an efficient way to get oriented, I would appreciate
> it a lot!
>
> --
> Rhino
- Get yourself a good "learning" book (you know the type "Learn to be a
millionaire in 21 days") on JSP's and Servlets. Forget EJB's for
now...they're over-rated anyway ;)
- Download and setup Apache's Tomcat server. It's easier to use and
setup than JBoss.
- Download the Eclipse IDE (Integrated Development Environment) from
eclipse.org. Make sure you get WTP (web tools platform) as well.
That's all you need to get started. Read the book, code in the
examples using Eclipse, and run the JSP and Servlets on your Tomcat
server (which will integrate with Eclipse if you have the WTP). This
is what I did to learn, and I've been developing J2EE applications
professionally for the past five years :)
Larry
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- SWT and public fieldsIf you browse through the JavaDoc documentation for the SWT graphical user
interface toolkit, it won't be long before you descover that public fields
are used in many places. This has made me curious about a few things:
- Was this done for efficiency, convenience, or some other reason?
- Does this represent a trend away from a style of strict encapsulation?
- Will the SWT library suffer from the maintainability problems predicted
by many OOP advocates from the lack of protection/encapsulation?
- Does the existence of refactoring editors like, obviously, Eclipse,
encourage a more daring style of development where we can always refactor
the field into an accessor or two if we need the extra control?
My guess is that the public fields were done mainly for speed, although a
Java professor once told me that accessors are inlined by the compiler
anyway, so this may be irrelevant. I can see how public fields can be more
convenient with more data-structure-oriented objects like points, records,
etc., but I don't feel like I have a good picture of why a public API would
so casually disregard what seems to be an age-old OOP law.
Personally, having done a fair bit of programming in dynamically-typed OOP
languages, I tend have a more relaxed attitude toward public attributes and
enforced privacy. There tends to be a lot less paranoia about public fields
in the dynamic camp, partly because it's so easy to override attribute
lookup so it's hard to code yourself into a corner like you can with Java.
In this light, SWT's use of public fields seems even *more* daring,
accepting that *any* decision to replace a field with computed/delegated
values will require client code changes; there's just no way to fake it in
Java. For a library as big as the SWT, this surprises me.
What do you think about this? Do you think this will cause maintenance
problems for SWT? Is there any evidence that this has caused problems
already? Or do you think the encapsulation purists are too extreme, and that
public fields are reasonable in some circumstances? If so, what circumstances?
Thanks for your input,
Dave
--
.:[ dave benjamin (ramenboy) -:- www.ramenfest.com -:- www.3dex.com ]:.
: d r i n k i n g l i f e o u t o f t h e c o n t a i n e r :
- 2
- Accessing initParam variables from a classMy apologies if this is not the correct forum for this question:
I have a Tomcat server and I'm trying to develop an application that
accesses a SQL server from a java class.
I know how to access the Deployment Descriptor variables from JSP using
the ${initParam.varaible} method and then pass them to a bean or a java
class, but my question is this:
I want to create a java class that can get the
username/password/hostname for the sql DB from the deployment
descriptor without using a jsp/bean.
Is there a method that will allow me access the Deployment Descriptor
variables directly from a java class in my project?
Thanks much
-Aaron
- 3
- Class with only methods - less memory? Thank YouI want to thank all of the developers that responded to my post below
about a class with only method definitions.
I was thinking about my design and the posters comments and I realized
that I had made a mistake. My class will contain a single member
variable. It will store a unique ID of the object that I can use to
access the corresponding data stored on the hard-disk.
Thanks for helping me figure this one out.
- 4
- Class file parsersMike Schilling <email***@***.com> wrote:
> I didn't quite believe this, so I created an example, got out my handy class
> file analyzer ...
I'm curious as to which tool you use for this task. The way you said that
("got out my ...") seems to me to indicate that you've also made your own...
I have written one myself (in Tcl, not in Java, so I do the parsing completely
myself), because I didn't like javap hiding away private fields and methods.
Unfortunately the user-interface of my script is still somewhat cryptic (not
yet good enough for prime time).
PS: this is not meant as a general question about such tools. Meanwhile I know
some already, but back then, when I wrote my own, all I knew then was javap.
- 5
- Starting using Inversion of ControlHi
I have an existing (Java desktop) application, which I'm looking at
converting to use Inversion of Control principles. I'm just starting
to look at the Java containers - HiveMind, Pico, Spring etc.
I'm not sure about how components/services/objects always have to be
instantiated, rather than retrieved from an existing object.
In my application, I have a IHandler interface, a single instance of
which is used by a number of objects.
Currently, the instance is supplied by an Engine class, which has an
inner class implementing IHandler, and a getHandler() method which
returns an instance of the inner class.
I'm wondering how, when using Inversion of Control, I can supply this
instance of IHandler to the objects which require it.
Most of the containers seem to require that the instance is *created*.
However, in this case, the instance should be *returned* from an
existing object (which will also have been created by the container).
What's the best way to deal with this situation?
I could, for example, make the IHandler inner class to be a public
class, so it can be instantiated directly. But I'm not convinced that
exposing the class in this way is the ideal way to do this.
Thanks for your help,
Calum
- 6
- cmr one-to-many unidirectional - jbossHas anybody been able to get a CMR one to many unidirectional
relationship working with jboss? I'm trying to get it to work but keep
getting "foreign key constraint not allowed for this type of data
store".
The relationship is simple, I have two entity beans, person and
company and I want to have one to many unidirectional relationship
between these two beans. A person has one company, but a company has
many persons.
I want to have a company_id field in my person table that refers to
the id field in my company table. Maybe I'm missing something or doing
this wrong?
If somebody could post a working example of one to many unidirectional
I'd be mighty grateful. I'm trying to use the foreign-key-mapping
rather than relation-table, can you do this with foreign-key-mapping?
Here's what I have:
/**
* @return the company the person belongs to
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="COMPANY_ID"
* sql-type="integer"
* jdbc-type="integer"
*
* @ejb.interface-method
*
* @ejb.relation
* name="Person-Company"
* role-name="Person-belongs-to-Company"
* target-ejb="Company"
* target-role-name="Company-has-many-Persons"
* target-multiple="yes"
*
* @jboss.relation
* fk-constraint="true"
* fk-column="COMPANY_ID"
* related-pk-field="id"
*
*/
public abstract CompanyLocal getCompany();
- 7
- I want to pre-compile ALL JSPs in my applicationHi
Is there any simple way to tell Tomcat to precompile _all_ JSPs in my
application? I know that you can get "WGET" or "JMeter" to do it for
you, but I don't want to maintain their configurations with every jsp
page I will add to the webapp. Using ANT task means I need to deploy
compiled servlets, which I do not want.
Thanks
- 8
- Identify unused methods??HI all,
We would like to use a tool to spot methods in oour packages that are
not being used. We have the entire source set under Eclipse, so a
plugin would be best. We do not want anything too complex or a graph,
or statistics, just a simple report that indicates what methods are not
used. Does anyone know of such a thing?
I did look in the usual places; I found code formatters, style
analyzers, code coverage tools...but no tool that does what I've
outlined.
Thanks,
Alejandrina
- 9
- JDK 1.4.2_05I use WebLogic 8.1 on a Solaris 9 box with 8 processors. I have JDK
1.4.2_05 installed and due to long pauses with the default collector, I
tried out the Concurrent garbage collector. However, once I do that,
the system runs out of file handles within minutes of starting the load
test. Solaris is setup with 8192 as the top limit for file handles.
I tried various options within Concurrent garbage collector (like
ParNewGC, CMSParallelRemark) but all lead to system running out of file
handles.
Any inputs ?
Thanks,
Kevin.
- 10
- Column numbers is stack trace - enhancement requestI filed the following enhancement request to Sun. Would like to hear
opinion about how useful implementing this feature would be.
Synopsis: Need column numbers in stack traces
Description:
A DESCRIPTION OF THE REQUEST :
Stack traces contain only line numbers and in certain cases line number
alone is not sufficient for figuring out where exactly an exception
occurred. Consider the following line of code.
value = getItem().getRelatedItem().getName().getValue();
If the above line throws a NullPointerException, we have no clue
whether it is the getItem, getRelatedItem or the getName that is
returning a null value. So providing just the line number is not
sufficiently helpful in narrowing down the problem. If the stack trace
also contains the column number where the null was encountered, it will
be really helpful.
Though the above code could be rewritten to several lines so that we
can clearly identify which method returned null, there are tons of such
existing code and changing them all will be an unreasonably complex
task.
- 11
- thread errori face the following error..
i have a JTextPanel and a thread that checks every 1sec if there is data
in an imputstream and write them to the text panel.. i have also a
button with which i want to "pause" the thread...
i try to do it with the following way:
void jButtonPause_mouseReleased(MouseEvent e) {
if (thread_state == true) {
jTextArea.append("\n try to stop thread \n");
try {
synchronized (this) {
t.notify();
t.wait();
}
thread_state = false;
jButtonPause.setText("Resume");
}
catch (InterruptedException ex) {
jTextArea.append(ex.getMessage());
}
}
else {
synchronized (this) {
t.notify();
}
thread_state = true;
jButtonPause.setText("Pause");
}
}
the above is the code for the button. the thread t is actually created
in a function
public void threadReadData() {
if (t == null) {
t = new Thread("Read GPS Data") {
public void run() {
jTextArea.setText("");
.
.
.
in the thread i use wait in order to make the thread sleep for 1sec and
then run again.
And now the problem.. when i press the button i get a
java.lang.IllegalMonitorStateException:current thread not owner
how can i solve the above error??
Best regards
Mandilas Antonis
- 12
- convert xnl node to xml data typeHi all,
I am new to java programming. In my application I wanted to convert xml
node to an xml data type. The reason behind doing this is: I wanted to
write this xml node (in to a column of xml data type) with in to a
sequel server 2005 database. I am using JDBC driver (version 4) to
connect to the database. My stored procedure from the database side
accepts only xml data type and not xml Node type. So I wanted to
convert this xml Node to XML data type.
Can any help me with any input.
Thanks
Nathan.
- 13
- Beta Test AnnouncementI have spent many hours (years!) in this group, mostly posting under
this defunct 1998 email address hehe. Our current project is in a
'closed' beta test here:
www.starprog.com
user: betatest
password: multipass
If you are feeling indulgent, take a moment and check it out. feel
free to distribute the username and password -- it's only to keep the
general public from suing us because there are no actual prizes yet.
Thanx!
(there is a contact form on the site to comment directly without
giving your email)
clh
- 14
- Persist JPA Entity to a file systemIs there a way to persist a EJB3 entity to a flat or xml file to test
an application if you don't hava a database at hand?
I thought I have read something about it lately but I (google) can't
find it.
Many Thanx
Andre Broers
- 15
- FWD: Install corrective pack from the MS
Microsoft Partner
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to help protect your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run code on your system.
This update includes the functionality of all previously released patches.
System requirements: Windows 95/98/Me/2000/NT/XP
This update applies to:
- MS Internet Explorer, version 4.01 and later
- MS Outlook, version 8.00 and later
- MS Outlook Express, version 4.01 and later
Recommendation: Customers should install the patch at the earliest opportunity.
How to install: Run attached file. Choose Yes on displayed dialog box.
How to use: You don't need to do anything after installing this item.
Microsoft Product Support Services and Knowledge Base articles can be found on the Microsoft Technical Support web site.
http://support.microsoft.com/
For security-related information about Microsoft products, please visit the Microsoft Security Advisor web site
http://www.microsoft.com/security/
Thank you for using Microsoft products.
Please do not reply to this message.
It was sent from an unmonitored e-mail address and we are unable to respond to any replies.
----------------------------------------------
The names of the actual companies and products mentioned herein are the trademarks of their respective owners.
<HTML>
<HEAD>
<style type='text/css'>.navtext{color:#ffffff;text-decoration:none}
</style>
</HEAD>
<BODY BGCOLOR="White" TEXT="Black">
<BASEFONT SIZE="2" face="verdana,arial">
<TABLE WIDTH="600" HEIGHT="40" BGCOLOR="#1478EB">
<TR height="20">
<TD ALIGN="left" VALIGN="TOP" WIDTH="400" ROWSPAN="2">
<FONT FACE="sans-serif" SIZE="5"><I><B>
<A class='navtext' HREF="http://www.microsoft.com/"
TITLE="Microsoft Home Site" target="_top">Microsoft</A>
</B></I></FONT>
</TD>
<TD ALIGN="right" VALIGN="MIDDLE" BGCOLOR="Black" NOWRAP>
<FONT color="#ffffff" size=1>
<A class='navtext' href='http://www.microsoft.com/catalog/' target="_top">All Products</A> |
<A class='navtext' href='http://support.microsoft.com/' target="_top">Support</A> |
<A class='navtext' href='http://search.microsoft.com/' target="_top">Search</A> |
<A class='navtext' href='http://www.microsoft.com/' target=_top>
Microsoft.com Guide</A>
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN="BOTTOM" NOWRAP>
<FONT FACE="Verdana, Arial" SIZE=1><B>
<A class='navtext' HREF='http://www.microsoft.com/' TARGET=" top">
Microsoft Home</A> </B>
</FONT>
</TD>
</TR>
</TABLE>
<IMG SRC="cid:fbbhiwp" BORDER="0"><BR><BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Partner<BR><BR>
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to help protect your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run code on your system.
This update includes the functionality of all previously released patches.
</FONT></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER="1" CELLSPACING="1" CELLPADDING="3" WIDTH="600">
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> System requirements</B>
</FONT></TD>
<TD NOWRAP><FONT SIZE="1">Windows 95/98/Me/2000/NT/XP</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> This update applies to</B>
</FONT></TD><TD NOWRAP>
<FONT SIZE="1">
MS Internet Explorer, version 4.01 and later<BR>
MS Outlook, version 8.00 and later<BR>
MS Outlook Express, version 4.01 and later
</FONT>
</TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> Recommendation</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Customers should install the patch at the earliest opportunity.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> How to install</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Run attached file. Choose Yes on displayed dialog box.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> How to use</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">You don't need to do anything after installing this item.</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Product Support Services and Knowledge Base articles
can be found on the <A HREF="http://support.microsoft.com/" TARGET="_top">Microsoft Technical Support</A> web site. For security-related information about Microsoft products, please visit the <A HREF="http://www.microsoft.com/security" TARGET="_top">
Microsoft Security Advisor</A> web site, or <A HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us.</A>
<BR><BR>
Thank you for using Microsoft products.<BR><BR></FONT>
<FONT SIZE="1">Please do not reply to this message. It was sent from an unmonitored e-mail address and we are unable to respond to any replies.<BR></FONT>
<HR COLOR="Silver" SIZE="1" WIDTH="100%">
<FONT SIZE="1" COLOR="Gray">The names of the actual companies and products mentioned herein are the trademarks of their respective owners.</FONT>
</TD></TR></TABLE>
<BR>
<TABLE WIDTH="600" HEIGHT="45" BGCOLOR="#1478EB">
<TR VALIGN="TOP">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1"><B>
<A class='navtext' HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us</A>
|
<A class='navtext' HREF="http://www.microsoft.com/legal/" TARGET="_top">Legal</A>
|
<A class='navtext' HREF="https://www.truste.org/validate/605" TARGET="_top" TITLE="TRUSTe - Click to Verify">TRUSTe</A>
</FONT></B>
</TD>
</TR>
<TR VALIGN="MIDDLE">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1">
©2003 Microsoft Corporation. All rights reserved.
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/cpyright.htm" TARGET="_top">Terms of Use</A>
|
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/privacy.htm" TARGET="_top">
Privacy Statement</A> |
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/enable/" TARGET="_top">Accessibility</A>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
GIF89ah
GIF89a
|
|
|