Aleks V. Pascoal

Ranch Hand
+ Follow
since Apr 21, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aleks V. Pascoal

Hi guys!

I want to implement something in my web application that allows me to check credentials (user / password ) entered on the system login page with a certificate in a token.

I'm guessing that I must do something like that:

1) Configure JBoss to use SSL
2) Once someone entered user/pass, extract data from the certificate to verify against the info on the database

I don't know how to extract the info from the certify and neither how to load the certifiy info. I mean, just by using SSL the browser will load the certify from the token?

Best regards!
11 years ago
Guys,
please correct me if I am wrong, but Jboss can't perform HTTP Load Balance between AS instances in a cluter. Am I correct? Do I need and external load balancer?

Tks and regards,
Aleks
14 years ago
Hey Guys,
got my score today!! It was my first 100%!

Thanks all for the comments before the test...


Aleks
18 years ago
Hey guys, is there any site where we can see the results?
18 years ago
Guys,
please correct where I'm wrong and complete what you can.

Thanks!

Client Tier:
Web Client:HTML / Javascript/ Browser / etc
Java Client: Applet / Midlet / Swing / etc
* Client machine.

Web Tier:
JSP / Servlets / JavaBeans/ WebServices (Serlvet)/ What else?
* Container Web - J2EE Machine

Bussiness Tier:
EJB / WebServices (SessionBean) / JavaBeans / What else?
* Container EJB - J2EE Machine

EIS Tier:
Database / Legacy / etc
* EIS Machine (ORACLE / Mainframe / etc)

EIS Tier is reach using JDBC, JCA, JMS (Maybe).
18 years ago
Hey, can you make an example about these trick questions? I mean, the arguments for for-each are pretty straight: Collection or array.
And the variable must be the type of elements of the array or Collection, or Objects if no generics used.

Thanks!
18 years ago
Types of Java clients: applets, midlets or applications.

Please tell me if I'm correct and the follow apply to all of then

To create an user interface allows more flexibility and more interation with users, less bandwidth consume (since presentation logic doesn't need to come from server) and maybe less conections with the server (Ex: to reorder a list a browser need to send a new request to the server, an java client may not do that). But the implementation is more complex.
18 years ago
I'm not familiar with J2ME and Swing, may you post some ideas about these topics?

Thanks!
18 years ago
Guys,
may you share your thoughs on this item. I think we all know the diferences but it's hard to put it on the paper. It will be good if you can put situations to chose each plataform ou maybe tell how this will be tested.

Thanks!
18 years ago
1) Yes, you can specify direction using open arrow. But, I'm almost sure that it doesn't make sense to put the arrow at the same side of the diamond, because composition means that parts have they're life cycle associate with the hole, so, the role must have access to its parts.

2) When you use "lollipop" notation (circle for interfaces), use a simple line to connect to classes, and that wil indicate the relation implements.
18 years ago
Hey guys,
here are my thoughts about this topic. Please post comments.

Assignment
Atributte a value to a variable. It may be a literal, a primitive or a reference to an object. Operator: "=".
Ex: int i = 10;
name = new String("Aleks");
long l = i;
i++; // same as i = i + 1;
i+=2; // same as i = i +2;

Conditional
Check the value of an expression and made a decision about witch peace of code execute
if-else: check logical expressions true/false
if (expression) { doThis} //if expression true doThis
else if (expression2) {doThat} //if expression2 true doThat
else { doThose } //otherwise doThose


switch: compare variable with values to make a decision
switch(variable){ // byte, short, int, char or Enum.
case value1: //Must be a constante value
doThis;
break;
case value2:
doThat;
break;
default: //just in case variable is diferent of all values
doDefault;
break;
}
?: ternary operador, it's almost a resume of if-else
variable = expression ? return1: return2;
//if expression true returns return1, else returns return2.

Logical operators: "==", "!=", "&&", "||".

Iteration
Executes repeateddly the same code while some conditions are mantained.
Obs: break exits any loop and continue jumps to the next step of the loop.

while:
while (condition){ //while contidion is true continues
...code...
}
do-while: always executed at least once
do{
} while(condition)
for: loop determined.
//declaration/inicialization = executed once before the loop
//condition = tested on each iteration, repeated while it's true
//increment = repeated after each loop
for (declaration/inicialization; condition ; increment ){
}
for-each: enhaced loop, used with arrays or Collections
//declaration - variable with the same type of elements
//colection - Collection or array
//On each iteration take the next elementof the collection e assign to
//the variable.
for (declaration : colection){ ...code... }
[ June 29, 2005: Message edited by: Aleks V. Pascoal ]
18 years ago
Thanks guys!!

You've said all I wanna hear! I made the code but need someone to check it for me!!
18 years ago
You're absolutely right... As a matter fact I've just wanted to make the shortest code, but it's important to show the creation of the pages.

But, what about my goals... I mean the relations, multiplicity, etc... are right?
18 years ago
Guys,
I made an example about item 3.3, trying to cover all it asks.

Here is what I've tried to say with the code:


There is an association between Book and Author;
Each book may have 0..2 authors;
Just books know about its authors;
An author may be in many books;

There is a composition between Book and Page;
Each book must have at least 1 page;
Since pages are creates inside the book, each one may only be in one book;
Books know about its pages, but pages don't know about the book they're in;


Please validade it!!!
If someone has more examples please post it!


class Book{

private Author[] authors;
private Page[] pages;

Book(Author[] authors, int n) throws LengthException {
if (authors.length > 2) throw new LengthException("A Book may have 2 authors maximum");
this.authors = authors;
if (n < 1) throw new LengthException("A Book must have at least 1 page");
this.pages = new Page[n];
}

public Author[] getAuthors(){ return authors;}

}


class Author{

private String name;

Author(String name){ this.name = name; }

public String getName(){ return name;}

}

class Page{

private String content;

Page(String content){
this.content = content;
}

public String getContent(){ return content;}

}

class LengthException extends Exception{
LengthException(String msg){
super(msg);
}
[ June 27, 2005: Message edited by: Aleks V. Pascoal ]
18 years ago
Guys,
let's make it more clear.

1) Association: any relation between two objects/classes. Composition and Aggregation are types of associations.

2) Composition: the object only exists, or only makes sense inside ther other, as a part of the other. Ex: People - heart. You don't creat a heart and than passes it to a person.

3) Aggregation: the object exists outside the other, is created outside, so it is passed as an argument (for example) to the construtor. Ex: People - car. The car is create in a diferent context and than becomes a person property.

Ok, now correct me.