Mercurio Savedra

Greenhorn
+ Follow
since Dec 04, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mercurio Savedra

Yes David that is right but I am looking for some excellent & recommended stuff that the community maybe have already identified , specifically I am very interested in java patterns for security requirements. Any help will be good

Thanks in advance

Hi guys , i am looking for a complete reference related to design patterns and i just have this site
http://java.sun.com/blueprints/patterns/index.html . From my opinion it seems to be an incomplete list of patterns.
Does somebody know a good site with more information of patterns and to get started with patterns too.

Thanks in advances
I agree EJB3.0 and Hibernate are not same because from my point of view each one is a provider of JPA specification.
From my undestanding JPA is a specification that has different providers ,some of them are
Hibernate, OpenJPA and if I am not wrong EJB 3.0.

Right now at the project phase only we have a set of options for persistence layer ( EJB 3.0,OpenJPA, Hibernate). I would appreciate
what ORM framework features could be useful to take into account in the selection process and any advice or tip would be valuable too.

The proposed architecture is base in a presentation layer, logic layer and a persistence layer.

Thanks in advance


Thanks a lot for your valuable answers guys, but if you would have to decide between EJB 3 and Hibernate regarding that this solution is proposed for a bank system that requires high performance and high transaction load.What alternative will be the best in response time,high performance and high transaction load ?

Hi guys , right now I am involved in a project with J2EE and We are designing the proposed architecture. At this moment our architecture consist of
a MVC model (throught Struts framework) and include a persistence layer. Regarding this persistence layer We have identified EJB 2.0, EJB 3.0 and Hibernate
as candidates but we dont have previous experiences implementing persistences layers with these tecnologies. Could you give us some advices ,tips or material
to take into account in our architecture desicions.
Hi friends

I am right now developing a java application that is compressed as jar. The application uses a postgresql jar and log4j jar, then as the sun tutorial mention I write in the manifest file the classpath attribute. I use absolute path for each jar and write too the attribute that indicate the main class. Then I generate my jar file and put it in a folder in C called PrinterControl .

Here is my manisfet file content

Manifest-Version: 1.0
Class-Path: C:/jars/log4j-1.2.15.jar C:/jars/postgresql-8.3-603.jdbc2.jar
Main-Class: com.mercantil.printer_control.controller.Process_Controller

When I try to run the application this crashed and return a message that say java.lang.NodefClassFound
I think that the class loader can�t find the main class .

I decided to create a folder inside C:\ PrinterControl called lib and inside lib I moved the jars and changed the manifest just like this:

Manifest-Version: 1.0
Class-Path: lib/log4j-1.2.15.jar lib/postgresql-8.3-603.jdbc2.jar
Main-Class: com.mercantil.printer_control.controller.Process_Controller

Generating the jar and running and simply everything is Ok

Someone can explain why in my first choice it didn�t work?. Why it lost the classpath for jar internal classes and didn�t found the main class ?

I would appreciate a lot your comments and help
16 years ago
this is just that i want to do , but some information how to protect the jar content and how configure the classloader
16 years ago
Can I use any tool or utility to make a content of a JAR file not accessible to unzip?
16 years ago
I am right now in a project as a Test designer and we are planning to use Rational Performance Tester during Workload Tests. For the project we have identified several criteria for the system tests as Performance, Reliability, Security, Availability, and Scalability. We known what each criteria mean, however our team is very interested in determining some metrics to asses accurately each criteria . Where can we find metrics to asses Performance, Reliability, Security, Availability, and Scalability ? Do you know some paper, course or material for that ?
16 years ago
Hi guys I need clarify this issue

I am working with the SunFtpClient Class in a project that involve
download file contents from Ftp server on Unix Machine. I create some
Files in notepad, write the content and then I save as UTF-8 encoding.

Next I transfer the file content from my machine to the ftp server
in binary mode. Here everything is Ok. But the problem is right here
I execute this piece of code and kaboom the problem appears. Let�s review
the code and next I specify the problem



The Message.txt Content is the following
One Two Three Four Five Six

The LocalMessage.txt Content is the following
?One Two Three Four Five Six

SomeBody Could Ask What is the problem?

The problem is that although I use UTF-8 in InputStreamreader as the Convert
Encoding ,the BOM bytes are not filtering and I suppose that the ? character in the content of file LocalMessage.txt is the result of those bytes. Why InputStreamReader converter=new InputStreamReader(ftp.get("Message.txt"),"UTF-8"); is not working well

I appreciate your comments


















17 years ago
I forgot this





Tkx
17 years ago
Hi friends pls some help my problems is the following

I have a ftp server running on linux and in my program I download files from the ftp server using class specified below.When I download the file content not all content is coming ok. For example I have a string with
Ra�l����1234%#=?[a_@ and when I read content using my methods this part is retirved ok Ra and this one is retrived wrong �����
whith characteres very stranges.

I suppose that the problem is with the encoding, then all day I tried some settings in the class new InputStreamReader.First the encoding UTF-8 because I have created the file using this encoding. Something like this:

in = new InputStreamReader(new GZIPInputStream(localFtp.get(serverFile)),"UTF-8");

but does not work

After I realized that I use the statement localFtp.ascii();
declaring that the content will be downloaded in ascii encoding so
I made this change :

in = new InputStreamReader(new GZIPInputStream(localFtp.get(serverFile)),"US-ASCII");

but still does not work

Please somebody can help me this is very urgent

Here is my code

Tkx

17 years ago
Some information

Creational Patterns - Factory Pattern

Factory of what? Of classes. In simple words, if we have a super class and n sub-classes, and based on data provided, we have to return the object of one of the sub-classes, we use a factory pattern.

Let�s take an example to understand this pattern.

Example: Let�s suppose an application asks for entering the name and sex of a person. If the sex is Male (M), it displays welcome message saying Hello Mr. <Name> and if the sex is Female (F), it displays message saying Hello Ms <Name>.

The skeleton of the code can be given here.
public class Person {
// name string
public String name;
// gender : M or F
private String gender;

public String getName() {
return name;
}

public String getGender() {
return gender;
}
}// End of class

This is a simple class Person having methods for name and gender. Now, we will have two sub-classes, Male and Female which will print the welcome message on the screen.
public class Male extends Person {
public Male(String fullName) {
System.out.println("Hello Mr. "+fullName);
}
}// End of class

Also, the class Female
public class Female extends Person {
public Female(String fullNname) {
System.out.println("Hello Ms. "+fullNname);
}
}// End of class

Now, we have to create a client, or a SalutationFactory which will return the welcome message depending on the data provided.
public class SalutationFactory {
public static void main(String args[]) {
SalutationFactory factory = new SalutationFactory();
factory.getPerson(args[0], args[1]);
}

public Person getPerson(String name, String gender) {
if (gender.equals("M"))
return new Male(name);
else if(gender.equals("F"))
return new Female(name);
else
return null;
}
}// End of class

This class accepts two arguments from the system at runtime and prints the names.

Hope this help
Hi Friends

I write in this opportunity in order to explain my problem. I am working right now
in a J2EE application with a Web Tier (Struts ) and Ejb Tier (using BMP). The application is deployed in WAS 5.1 and the Database is DB2 over AS400.

Well I deployed the app in WAS and tested it with a single user and no problem everything was ok. Then I ran a Stress Test with 100 users and in System Err appear several times the following error

Row or object SPVPER in CPLAFVAC type *FILE in use

I am aware that the tables or rows are locked but I would like to obtain your feedback because I don�t know what could be the best practice here to avoid this problem, maybe some adjustment in the database or in the EJBs and This could be activities for the java developers or should be done for db2 DBA

Thanks lot friends
17 years ago
Hi Friends

I write in this opportunity in order to explain my problem. I am working right now
in a J2EE application with a Web Tier (Struts ) and Ejb Tier (using BMP). The application is deployed in WAS 5.1 and the Database is DB2 over AS400.

Well I deployed the app in WAS and tested it with a single user and no problem everything was ok. Then I ran a Stress Test with 100 users and in System Err appear several times the following error

Row or object SPVPER in CPLAFVAC type *FILE in use

I am aware that the tables or rows are locked but I would like to obtain your feedback because I don�t know what could be the best practice here to avoid this problem, maybe some adjustment in the database or in the EJBs and This could be activities for the java developers or should be done for db2 DBA

Thanks lot friends