| Design question: business delegate or not? |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- Eclipse 2.1.1 does not save my workspaceHi,
Sometimes when I close out Eclipse 2.1.1, it doesn't say my worksapce
settings. Because of this, I cant find projects that I create prior
to this happening
Can anyone shed some light on this issue?
Thank You
- 3
- Translator Tools? I was about to throw in the towel on this
project I've inherited. It's about 5,000
Java files, totally undocumented and uncommented.
I asked and looked for tools that would help
me make sense of this mess, so far to no avail.
Now the owner of the company is willing to
consider redoing it in C++. ( In my opinion
there was no good reason for the previous software
engineer to write this in Java. It's a pretty
straightforward Windows desktop app that would
be much easier to understand and maintain had
it been written in VC++. There's some evidence
he chose Java just so he could get some experience
with it,)
Anyhow, I'm not rewriting this by hand.
I came across the following in Bruce Eckel's
'Thinking In Java', "I've even heard it
suggested that you start with Java, to gain the
short development time, then use a tool and support
libraries to translate your code to C++, if
you need faster execution speed."
Has anybody heard of or better still used
such translator tools? Even if it only did
80-90% and the rest required manual intervention
it might work.
TIA for any advice.
Gerry Murphy
- 4
- Displaying error values with Struts Validator FrameworkHi,
I'm using the struts validator framework to validate an email address
in a form.
If the user enters an invalid email address (ie
invalidEmailAddress.com) I'd like to display the following error
message:-
"invalidEmailAddress.com is an invalid e-mail address"
However all I seem to be able to do with the validator framework is
output the following:-
"Email address is an invalid e-mail address"
with messageResources.properties and validator.xml set as follows:-
validator.xml:-
<form name="addressForm">
<field property="emailAddress"
depends="email">
<msg name="email" key="errors.email" />
<arg name="email" key="form.address.label.emailAddress" />
</field>
</form>
messageResources.properties:-
errors.email={0} is an invalid e-mail address.
form.address.label.emailAddress=Email address
I'm using <html:errors /> to output the error list in a jsp.
Is there any way to substitute the actual entered value into the
errors.email message using the struts validator framework? I know it
can be done in the validate() method of the ValidatorForm class but
it there method of simply using the validator framework?
Thanks in advance for your help.
smrimell.
- 5
- JAVA RMI thr HTTP throws NoRouteToHostExceptionHi,
I am developing an application that would be used in a firewall
environment. As part of my test environment, I have blocked port 1099
and have allowed port 80 access on the server. So all the RMI calls
from the client should be tunnelled thru port 80 in the server.
I have ported the java-rmi.cgi script (unix version) to windows
version. So I am confident that my RMI client, java-rmi.cgi are
correct. But I am getting NoRouteToHost Exception and my application
has to exit.
My understanding is that when the RMI client tries to connect 1099 (rmi
port) and if it fails, it will try to connect to port 80 and later all
the rmi calls should be embedded within http commands. Does my
web-server (apache) needs to be configured for this?
I have also tried setting http.proxtHost, but of no avail.
Please let me know of your solutions.
>> Manjunath
- 7
- Accessing a Java COM component from .NET.NET framework 1.2
Hello.
We've been accessing a Java COM component from classic ASP for a while now,
which works fine. We now need to access it from .NET, but we have no idea
how to reference this component as we can't find the .dll (or whatever type
of file Java COM components compile to). We do know a couple of things
about the component:
CLSID: {E7DEFE93-E26E-11d2-B3A0-0000E8512796}
Component name: PaymentClient.com.COMClient
Searching the registry for either string yields results, but the only DLL
referenced is msjava.dll which is obviously not what we're looking for.
Can someone give us any hints on how to access this object from .NET.
Thanks,
Mike
- 7
- identical JPanels, repetitive
I need to make a tabbed pane with four tabs, each pane shows text and
images from a List<Room> collection.
I can manually create the four tabs from the netbeans GUI builder, and
maybe use some copy paste so that the four tabs are similar if not
identical.
Staying within the GUI builder, how would four identical JPanel's, which
make up the tabs for a JTabbedPane, get created?
Could I somehow make a JList show as tabs?
thanks,
Thufir
- 7
- Run your own Auction Site, Pay per click directory, Google groups email harvestor, Email spider nowFree download full version , all products from Mewsoft dot com
http://netauction10.url4life.com/
Run your own Auction Site. Auction software for your site
----------------------------------------
Run your own auction site in minutes. Open source code in perl. Create
your own auction site in just a few minutes. NetAuction is the
complete auction package for every business from the personal to the
corporate business. SQL database backend for the highest scalability
and performance.
Directory, Pay per click search engine software
------------------------------------------------------------------
Open source code in perl. Build your own pay per click search engine
and build your entire sites in minutes with this software. NetEngine
is turn key Pay per click search engine and content management with
built in portal tools. SQL database backend for the highest
scalability and performance.
Groupawy
---------------
Google Groups Email collector. The first email spider for google
groups. Millions of valid and active emails in one easy location to
collect.
Spiderawy
---------------
Email spider machine. Multithreads and Multiplexed connections per
thread with built in database system for the highest scalability and
performance. Email and URL spider and extractor.
Site builder software
--------------------------------
Open source code in perl. Build and manage your sites with the fastest
browser based site builder and content management software ever.
NetBuilder is a complete package very easy to use for building your
sites online and offline with all the tools you ever need to manage
any site of any size.
Email list manager tools, free download full version
---------------------------------------------------------------------
Full Email lists tools suite. Email Extractor, Spider emails from
online web pages, Filter lists, Merge lists, Remove unsubscribe lists
from lists, Splitter to split larg email list file to smaller files,
Deduplicator to remove duplicated emails.
- 12
- Difference in opinion with look and feel !Hi,
I have an interesting problem while using the look and feel. This is my
function:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
Well the tool bars, the menu are all system's look and feel. i.e i am
using Windows OS. so i get all windows look and feels. But when i use
the file chooser, I get an open dialog box with look and feel of Sun
Microsystems' solaris.
Does anyone have any idea why this is coming up like this?
Interestingly I am not even able to reproduce this an other project.
Plz help,
Thank you,
Regards,
Rajesh Rapaka.
- 13
- Nio performance bottleneckHello !
In order to be sure that nio package was more performant than regular
streams, i have tested it with this little piece of code :
// ----------------------------
ByteBuffer loWriteBuffer = ByteBuffer.allocateDirect(1024);
CharBuffer loBuffer = CharBuffer.allocate(512);
Charset charset = Charset.forName("ISO-8859-1");
CharsetEncoder encoder = charset.newEncoder();
long llMillis, llMillis2, llMillis3;
llMillis = System.currentTimeMillis();
try {
FileChannel loChannel = new RandomAccessFile(new
File("C:\\Temp\\Test.txt"), "rw").getChannel();
for (int i = 0; i < 1000; ++i) {
loBuffer.put("ceci est un test\r\n");
loBuffer.flip();
encoder.encode(loBuffer, loWriteBuffer, false);
loWriteBuffer.flip();
loChannel.write(loWriteBuffer);
loBuffer.clear();
loWriteBuffer.clear();
}
loChannel.close();
}
catch (IOException leIO) {
leIO.printStackTrace();
}
llMillis2 = System.currentTimeMillis();
try {
Writer loWriter = new BufferedWriter(new OutputStreamWriter(new
FileOutputStream("C:\\Temp\\Test2.txt"), charset));
for (int i = 0; i < 1000; ++i) {
loWriter.write("ceci est un test\r\n");
}
loWriter.flush();
loWriter.close();
}
catch (IOException leIO) {
leIO.printStackTrace();
}
llMillis3 = System.currentTimeMillis();
System.out.println("Results : nio = " + (llMillis2 - llMillis) + " ms /
standard = " + (llMillis3 - llMillis2) + " ms");
// ----------------------------
I was surprised to see that, on my computer, the regular stream based part
was running about 4 times quicker than the nio based part !!
Here is my question : is my code correctlty optimized ? Anybody already
noticed this performance bottleneck ? Is my test the cause of this problem ?
Thank you !
Jean-Luc
- 14
- JavaScript redirect and JSP submitHi,
I've been trying to get the right way to send parameters to a JSP from
a HTML form. The referred JSP must get the values of the selects form,
because it executes queries and does stuff with that values. But the
only thing I've got it's a Tomcat error report.
The menu.jsp is something like this:
... // HTML stuff
<script language='JavaScript'>
function valida()
{
var ok=true;
var indexAccion = document.forms[0].accion.selectedIndex;
var indexTablas = document.forms[0].tablas.selectedIndex;
var indexBDatos = document.forms[0].BDatos.selectedIndex;
if (indexAccion==0 || indexTablas==0 || indexBDatos==0)
{
alert("Elige un criterio");
ok=false;
}
if (ok)
document.forms[0].submit();
window.location.href =
document.forms[0].accion.options[indexAccion].value;
}
</script>
... // HTML stuff
<form method='post' ***SHOULD BE THE accion.selectedIndex.value***>
<select name="accion">
<option value="inicio" selected>Selecciona una opcion
<option value="visualiza.jsp">Visualizar registros de la tabla
<option value="modifica.jsp">Modificar registros de la tabla
</select>
<select name="tablas">
<option value="inicio" selected>Selecciona una tabla
<option value="tbl1">Tabla 1
<option value="tbl2">Tabla 2
</select>
<select name="BDatos">
<option value="inicio" selected>Selecciona una base
<option value="db1">Base 1
<option value="db2">Base 2
</select>
<br><br><br>
<input type="button" value="Aceptar" onclick='valida()'>
</form>
Any ideas to figure it out?
Regards,
- Omar.
- 14
- Samsung Blu-ray pre-orders incredible: Java Blu-ray authoring in high demandNotes on initial responses to Samsung blu-ray launch, people already
buying players before content, and Java BD-J authoring of Blu-ray discs
* Posted while eating late lunch on Nokia 9300 and Opera Mini Java
browser.
http://bluray.highdefdigest.com/news/show/Sony/Samsung/Hardware/Blu-ray_Assault_to_Begin_Samsung_Proclaims_Incredible_Pre-Sales/111
Blu-ray Assault to Begin; Samsung Proclaims 'Incredible' Pre-Sales
After months of speculation, excitement and street date delays, the
Blu-ray
format is set to launch over the next week amid a flurry of marketing
hype
for the format's first player and discs.
Samsung began shipping its first stand-alone Blu-ray disc player, the
BD-P1000, to stores last week in anticipation for its on-sale street
date of
June 25. Sony will prime the pump for the player's debut by issuing
its
first seven Blu-ray disc titles tomorrow, June 20; Lionsgate will
launch its
support for Blu-ray with another six titles on June 27.
Samsung plans to have its player in over 2,000 storefronts nationwide,
including such major chains as Best Buy and Circuit City. In
conjunction
with Sony, the companies will also provide demo players and discs to
retailers to offer side-by-side comparisons with rival HD DVD in order
to
subjectively sell the format to potential consumers.
The electronics manufacturer also claims that interest in the BD-P1000
and
Blu-ray so far has been strong. "Pre-orders have been incredible,"
Samsung
spokesman Jose Cardona told Video Business.
---------------------------------------------
http://www.tgdaily.com/2006/06/20/sony_pictures_blu-ray_movies_today/
With Toshiba having launched its HD-A1 and HD-XA1 HD DVD videodisc
players
in April, Samsung is preparing to be the first brand to formally
launch a
competitive Blu-ray Disc player in North America, with its BD-P1000
set to
premiere on Sunday. Despite that firm date, customers nationwide are
already reporting having purchased BD-P1000s from Best Buy store
shelves -
just sitting there nonchalantly like any other DVD player, as if shelf
stockers didn't know the difference. But today, those early adopters
will
finally be able to play real BD media - not just upconverted SD media
- as
Sony Pictures releases the first batch of BD movies today.
Video outlets today should already have received, and will likely have
displays ready for, 50 First Dates (Adam Sandler, Drew Barrymore),
Hitch
(Will Smith), House of Flying Daggers, the original Terminator, the
sci-fi
"new cult classic" The Fifth Element (Bruce Willis), Underworld
Evolution,
and XXX (the film, not the rating). One title, A Knight's Tale,
originally
scheduled for release today, is being pushed back to 25 July. The
high-energy motorcycle violence film Ultraviolet joins the line-up
next
Tuesday. Lion's Gate Home Entertainment is due to follow up next
Tuesday
with the BD releases of 2006 Best Picture Crash, Terminator 2:
Judgment Day,
the horror flick Saw, Lord of War (Nicholas Cage), and the Marvel
Comics
vigilante piece The Punisher.
------------------------------------------------------------------
Java: Brave New Disc-Authoring World
http://www.pcworld.com/news/article/0,aid,126163,00.asp
Blu-ray Disc relies on BD-Java (BD-J) for its disc-authoring
environment;
HD DVD uses Microsoft's XML-based iHD, or Internet High Definition. "I
think
BD-J is better future-proofed," says Eklund. "But it is complex," and
implementing it properly will take more time, he says.
The switch to BD-J required adding programmers and engineers to the
disc-production mix.
BD-J has two different profiles. Sony's first content will be in what
Eklund
refers to as BD-MV, or "movie mode." "The menus will still be quite
different than what you're accustomed to with DVD," he promises.
"BD-MV is a
powerful format for creating interactive menus, and it will give a
better,
more seamless experience than what users are getting from DVD. You
don't
have to jump around between menu pages as you do with DVD. We use a
graphics
layer to present all of the text information, so you don't have to go
back
and access the disc in order to access the menus. We also have a tool
called
a pop-up menu that the user can use to access disc features during the
movie's playback, so, for example, you can get to a commentary track."
As powerful as BD-MV is, it has its limitations. "We are currently
still
investigating how we're going to author picture-in-picture content,"
says
Eklund. "But I'm sure we will be exploring that later on in the year."
- 14
- How to create same RSA signature objects in Java and C#Hello,
I have looked through the documentation for the Java and C#
security classes, and I can't find an answer to the following question.
How can the same RSA signature object (class java.security.Signature in
Java
and System.Security.Cryptography.RSACryptoServiceProvider in C#)
be constructed?
What I would like to see is that signatures generated in Java are
recognized as valid by C#, and vice versa. I am assuming this implies
that the RSA signature parameters must be the same in both
languages, but I can't figure out how to make that happen.
According to some sketchy notes I've found through googling,
it is possible, so I'll keep trying. Thanks for any information.
Robert Dodier
- 14
- How Do I Configure a Tomcat Server for Production?Hello,
I am pretty new to Tomcat. I am wondering if there are any standard
configurations that need to be added/modified as part of a Production
deployment aside from database URLs and those types of values.
Currently, we have mostly the same configuration for Production as we
do for development.
As the load increases are there any obvious values that we should be
changing?
Thanks, Jesse
- 14
- Database access for server and clientI am trying to create a small Internet application to access a mySQL
database on specific client machines around the country and query their
database and send the query result to our web server and then process
further data on the web server. Here is the layout: There are
several client machines around the country that have a mySQL database
installed and will give us certain query privileges for this database.
I need users on these client machines to be able to run an Internet
application from our web server which queries their local database and
then sends information to our server.
I see two options: a trusted, signed applet or a full java application
- also digitally signed - that is deployed through the Java Web Start
technology. (This is a very simple query on the client with a simple
drop-down list for the user to select from the query result - nothing
complicated.)
Does anybody have any suggestion as to which method is preferable? The
end users who will be running this application are not very computer
savvy and might not be able to figure out browser messages like "Your
browser understands the <APPLET> tag but isn't running the applet, for
some reason." For this reason I thought that the Java Web Start method
might be preferable, but I have no idea how reliable this method is and
what kind of kinks I will have to work through.
I also wonder if the Microsoft .net environment might offer an
alternative (our web server is Microsoft IIS and the clients are all
Windows XP or Windows 2000).
Any thoughts?
Thank you.
Anke
- 16
- Eclipse 3.1 crash on sun's jvmHi list,
Eclipse just crashed the jvm when I ran it.
the jvm dump suggest that the gtk smooth lib is to be blamed.
since this happened to me twice on two different machines, I think it
may (or have already) happen(ed) to many other people.
after removing gtk2-engines-smooth eclipse started to work again.
snippet from the jvm dump file:
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
C [libc.so.6+0x66533]
C [libc.so.6+0x66af2] __libc_free+0x82
C [libglib-2.0.so.0+0x2cc92] g_free+0x22
C [libsmooth.so+0x12416] SmoothFreeArrowStyles+0x46
C [libsmooth.so+0x2784a]
C [libsmooth.so+0x278bf]
Omry.
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
|
| Author |
Message |
Gert Vanthienen

|
Posted: 2005-11-11 0:04:00 |
Top |
java-programmer, Design question: business delegate or not?
L.S.,
We're in the process of developing an application using JSF, Hibernate and Spring and we're facing a design question on which we would like your ideas.
The application has it's own database, which is accessed using Hibernate, for most of it's entities (e.g. Problem), but it also has to work with data from a legacy system.
The legacy data is accessed through a set of Spring components (<bean/>s), which use JMS to exchange XML messages with the legacy system. These services provide us with e.g. Article instances.
The Problem instances, which are retrieved using Hibernate, should hold a reference to an Article. Since Hibernate does not know about the Article class, we have added an articleId property to the Problem class and whenever we retrieve a Problem using our ProblemService class, the ProblemService will look at this property and retrieves the corresponding Article instance.
This process happens for a couple of entities (Article, Supplier, TracingInformation, ...)
This approach however has a number of drawbacks:
1) our Problem class contains several 'duplicate' properties: articleId/article, supplierId/supplier,... leading to confusion
2) resolving the correct Article, Supplier, ... instances happens for every Problem ever instantiated in the ProblemService, causing overhead whever the information is not required by the JSF web client (especially for lists of data)
3) whenever someone adds functionality to the ProblemService, we have to be careful to always fill in the missing entities when a new Problem instance is created
We have thought of two possible solutions so far:
1) creating a Hibernate UserType to convert the article id stored in the database to an Article instance and visa versa
- This approach would solve drawbacks 1 and 3, but doesn't help us much with drawback 2.
- There is another issue with this approach: we need Spring's ApplicationContext in our UserType (<type .../> declaration in Hibernate mapping), but this would require rebuilding the ApplicationContext or having some kind of singleton to obtain the ApplicationContext (it is now created by a web application listener) (unless there is a Spring way of doing this, e.g. using a TypeDefinitionBean)
2) creating a business delegate for the Problem class
- This would solve all drawbacks, since the business delegate could quite easily use the Spring components already available to retrieve an Article instance on the fly when needed
- The business delegate should only have to expose the article property and the object sent to our DAO should only contain the articleId
- The business delegate solve the resolving of the Article, Supplier, ... entities once and for all, so nobody can forget to add these to their newly created Problem instance
The 'Business Delegate' solution seems the most appropriate, but wouldn't it add a considerable amount of extra coding for the features it provides?
Which solution would you recommend? Do you see an easier solution for the problem?
Thank you in advance for any feedback,
Gert Vanthienen
email***@***.com
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Eclipse Runtime ErrorI am running Eclipse 3.1.1. I created a project, called PizzaShop.
Inside pizza shop, I have src\ lib\ and build\classes\ folders. Inside
src\, I have a pizza folder for the pizza package. That too is mirrored
in build\classes\pizza.
When I go to debug as ->debug, Eclipse tells me:
java.lang.NoClassDefFoundError: pizza/SystemTest
Exception in thread "main"
What does that mean and how do you tell Eclipse which main to run? I
think I tell it that when it pops open the configuration menu, and I
tell it "pizza.TakeOrder" for the main class to run. But, obviously, it
cannot find the main, and there is a public main() in the TakeOrder
file.
So confused, Scott
- 2
- Focusing a JPanel?Is there a way to give a JPanel focus on a mouse click besides explicitly
saying "panel.requestFocus()"? I tried "panel.setFocusable(true)", but it
had no discernable effect. Using J2SE 1.4.2.
--
Ryan Stewart, A1C USAF
805 CSPTS/SCBE
- 3
- GUI Object DesignI am pretty new to Java and I am trying to get my hands around OOD.
In the course of designing a GUI, I am working on breaking down the
components into the necessary objects so that the code will be as
versatile as possible.
As I work through it though, I am confronted with the situation where
I feel that I am over analyzing and creating too many objects.
Let's say that I have a pretty basic window application. It has a
window with a menu bar and three menus, each with a few items.
The main window is an object inherited from JFrame.
Is it best to make the menu a seperate object, inherited from
JMenuBar, and then make each menu a seperate object, inherited from
JMenu, and then make each menu item a seperate object, inherited from
JMenuItem? Or, is a lot of this typically placed within a single,
larger object?
I guess I am wondering where you draw the line. How do I know when I
have gone too far and am creating too many objects unnecessarily?
I imagine a lot of this dicussion is personal preference and some
aspects are open to debate. I am just looking for some guidance as I
learn more about this.
Thanks.
- 4
- Java server accessI have a javaApplet that needs to access a directory on the server, list
the files in directory, then access the selected file. My first idea
was to use a servlet on the server then I found out that the server that
this needs to work with doesn't support servlets or Tomcat. The server
supports PHP and CGI and the hosting company does not want to add java
support.
Can anyone give me an idea on how to go about this?
David Miller
- 5
- Array iteration question/*Can i calculate the page totals, column totals, and rowtotals in one pass
through the array instead of the three passes i have coded? I have already
added an outer for loop to combine the three seperate iterations into one
but it still loops through the array multiple times and i would like to have
it loop through only once*/
import java.io.*;
import java.util.*;
import java.text.NumberFormat;
class P3
{
static PrintWriter screen = new PrintWriter (System.out,true);
public static void main (String [] args) throws IOException
{
final int COLLEGES = 4;
final int GENDERS = 2;
final int LANGS = 4;
int langAccum, genderAccum, collegeAccum, totalAccum = 0;
float percentage;
StringTokenizer data;
File file = new File ("p3input.txt");
FileReader inputFile = new FileReader (file);
BufferedReader inFile = new BufferedReader(inputFile);
String [] languageNames = {"C++" , "Cobol" , "Java" , "VB"};
String [] collegeNames = {"CCSU", "ECSU", "SCSU", "WCSU"};
String [] genderNames = {"Male", "Female"};
int [][][] enrollment = new int[COLLEGES][GENDERS][LANGS];
NumberFormat percent = NumberFormat.getPercentInstance();
// load array with values from file
for (int college = 0; college < COLLEGES; college++)
{
data = new StringTokenizer (inFile.readLine());
for (int gender = 0; gender < GENDERS; gender++)
for (int lang = 0; lang < LANGS; lang++)
{
enrollment[college][gender][lang] = new Integer
(data.nextToken()).intValue();
totalAccum += enrollment[college][gender][lang];
}
}
screen.println ("\nStudent Enrollment Survey Results:\n");
// first iteration to calculate percentage by language
screen.println ("Language\tPercentage");
for (int lang = 0; lang < LANGS; lang++)
{
langAccum = 0;
for (int college = 0; college < COLLEGES; college++)
for (int gender = 0; gender < GENDERS; gender++)
langAccum += enrollment [college][gender][lang];
percentage = (float) langAccum / totalAccum;
screen.println(languageNames[lang] + "\t\t" + percent.format(percentage));
}
screen.println("\n");
// next iteration to calculate gender percentage
screen.println("Gender\t\tPercentage");
for (int gender = 0; gender < GENDERS; gender++)
{
genderAccum = 0;
for (int college = 0; college < COLLEGES; college++)
for (int lang = 0; lang < LANGS; lang++)
genderAccum += enrollment [college][gender][lang];
percentage = (float) genderAccum / totalAccum;
screen.println(genderNames[gender] + "\t\t" + percent.format(percentage));
}
screen.println("\n");
// last iteration to calculate college percentage
screen.println("Colleges\tPercentage");
for (int college = 0; college < COLLEGES; college++)
{
collegeAccum = 0;
for (int lang = 0; lang < LANGS; lang++)
for (int gender = 0; gender < GENDERS; gender++)
collegeAccum += enrollment [college][gender][lang];
percentage = (float) collegeAccum / totalAccum;
screen.println(collegeNames[college] + "\t\t" +
percent.format(percentage));
}
inputFile.close();
}
}
- 6
- Encryption & DecryptionHi all
I've been asked to look into the encryption and decryption of attachments
sent in emails. The specific scenario is as follows:
- a file is created
- the file is to be encrypted
- the file is attached to an email and sent to a recipient
- once received, the file should be decrypted
- the file is read
At first glance, I think I should be reading up on the JCA (Java
Cryptography Architecture) and use a public key encrypt and a private key to
decrypt. Is this right?
Are there any online implementations or tutorials that you would suggest I
read to learn more about this?
--
Rogue Chameleon...
- 7
- adjusting boundries of JPanels in JPanel in JFrameHi, I tried searching through the google groups, but am obviously using the
wrong search words.
I have a JFrame with a JPanel in it. The JPanel is using the following
layout:
new BoxLayout (parentPanel, BoxLayout.LINE_AXIS)
Then I added two JPanels to the parentPanel.
But then I would like to click and drag the separator between the two panels
to change the size of the two JPanels.
Any hints?
Thanks,
Novice
- 8
- Problem with deploytool.I am trying to build a web service starting from hand-written wsdl using
JAX-RPC and wscompile tool from Sun Java System Application Server 8.0.
I don't want any data binding, so i invoke wscompile tool with -f
nodatabinding option with deploytool I create war, and I try to deploy it.
And deployment fails!
Reading server log I have found that reason for this failure is ejbc:
[#|2004-09-29T21:09:41.174+0200|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.out|_ThreadID=11;|
error: [failed to localize] unable to find member rodzajProblemu in
jaxrpcmapping meta for exception whose wsdl message is:
{http://www.eAdministracja.gov.pl/wsdl/ZDGUsluga}problemPrzetwarzania|#]
Message refers to part of my schema cited below:
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ug="http://www.eAdministracja.gov.pl/UrzadGminy/typy"
targetNamespace="http://www.eAdministracja.gov.pl/UrzadGminy/typy">
<complexType name="ProblemPrzetwarzania">
<sequence>
<element name="rodzajProblemu">
<simpleType>
<restriction base="string">
<enumeration value="Merytoryczny"/>
<enumeration value="Systemowy"/>
</restriction>
</simpleType>
</element>
<element name="oznaczenieProblemu" minOccurs="0" type="string"/>
<element name="opisProblemu" type="string"/>
</sequence>
</complexType>
<element name="problemPrzetwarzania" type="ug:ProblemPrzetwarzania"/>
</schema>
Identifiers are polish words, so don't bother with making up what do
they mean.
I have checked mapping.xml generated by wscompile, and ejbc is right -
there is nothing about rodzajProblemu, but if there is no class bound to
element problemPrzetwarzania except SOAPElement, there is no mapping,
so deploytool shouldn't try to compile any bean!
Should I consider it to be bug or I am doing sth. wrong?
- 9
- Suspending threads by ThreadPoolExecutorHi all,
Does ThreadPoolExecutor may suspend idle threads ?
I wonder wether suspended threads eat less resources than active ?
I imagine the solution when ThreadPoolExecutore suspends each idle
threat after idleness of 60 seconds and after next 60 seconds of being
suspend the thread got killed ?
Is it reasonable ?
Regards,
Maciej
- 10
- Export ApplicationHello.
I am using Netbeans 3.5 IDE and have created several applications which is
fine and dandy. The only thing I cannot do is work out how to export these
apps to another PC i.e. to run them on a machine without having the IDE
installed. I believe this would be via a JAR file but cannot seem to get
these to work. Any help in this area would be great as I am going round in
circles. Also, how do I encrypt the code ?
Regards
Stephen Gray
(Apologies if this is the wrong forum)
- 11
- 12
- 13
- Runtime.getRuntime().exec causing Windows 16-bit error!Hi there,
I'm trying to do something i've done many times before without problem, even
from signed applets...
trying to run a system command from Java.
I'm doing this:
import java.io.*;
public class SysCommand{
public static void main(Stirng[] args){
try{
Process proc =
Runtime.getRuntime().exec(
new String[]{"command.com",
"/C",
"echo",
"%windir%"});
BufferedReader reader =
new BufferedReader(
new InputStreamReader(
proc.getInputStream()));
System.out.println(reader.readLine());
proc.waitFor();
proc.destroy();
}
catch(Throwable th){
th.printStackTrace();
}
}
}
I'm trying to find out where the Windows directory is (i need to copy some
DLL's into there as part of an installation process).
When i run this, Windows raises a dialog box saying:
_______________________________________________________________
|16 bit MS-DOS Subsystem
|
|
|
| C:\WINNT\system32\ntvdm.exe
|
| Error while setting up environment for the application. Click 'Close'
to terminate |
---------------------------------------------------------------------------
---------
I'm running JDK 1.4.2_02 on a Win2K box.
Any ideas?
Thanks,
Paul
- 14
- command line memory profiler toolHello,
I'm looking for a simple command line tool (no windows) to help find a
memory leak in a large amount of old java code. Need to keep the test
machine identical to the production box, which is without xwindows.
Thanks for your help,
Erik
- 15
|
|
|