Win a copy of Head First Android this week in the Android forum!

Bruno Collet

Ranch Hand
+ Follow
since Jun 08, 2004
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 Bruno Collet

Hi all,
I am trying to redirect the user to an error page in case of error. It works when using error-code but not exception-type.




For example, it will work when an error 500 occurs but not when an ordinary exception occurs. I also tried with concrete exception classes, without success.
Any help would be appreciated
16 years ago
I use JSF in my current project and, although my implementation doc is not detailed, I use class diagrams with dependency relationships.
Each JSF page is a class (which is true). Backing bean are also classes of course.
The dependency relationships have stereotypes such as navigation (between JSF pages) and ordinary (between JSF pages and backing beans, and between backing beans and business delegates).
In fact this is not a JSF problem: UML notation is not well suited to depict view layer.
A few months ago I posted a small document about MySQL/JBoss config, based on the problems I encountered.
Maybe this can help you.
See http://www.practicalsoftwarearchitect.com/tips/jbossmysql/jbossmysql.html
I found the problem: there was an "�" (French character) in a comment that I added. So now when removing the comment the parsing succeeds.
This is really a tricky error. I am not sure whether it is a JBoss bug or not.
From now on I promise to use only English in comments
16 years ago
Hi all,
I spent the whole day trying to solve this problem, without success. Now I ask the experts... I am using JBoss 4.0.0 with Tomcat.

When I add a new application policy to login-config.xml, I get the following exception at server startup:

Here is the part that I added in login-config.xml:

Unlike the error message suggests, it is not a parsing exception. The XML file is valid.
Am I missing something obvious?
Could it be something missing in other files (auth.conf?)?

It seems that I am almost the only one getting this problem, so it must be blindingly stupid.
Please help!
16 years ago
Hi Steve,
I used EJB Timer Service a few months back, with JBoss 4, and it almost (see furher) worked very well.
The system had to start a process at repeated interval to get some data through HTTP (in XML format) and persist these data in database. The only problem I had is that I was not able to set a timeout for this operation, because EJB Timer Service has no such things and that thread management is forbidden in EJB container. In this particular case the timeout was mandatory, or else an HTTP connection could remain open forever (because I cannot trust the remote servers to be always up).
This is the only reason I finally moved this feature to the servlet container.
Hope it helps.
You can find examples for all possible relationships in Sun's EJB Spec, which can be downloaded from Sun's website.
Hi Ilja,
Sorry for this late post - holiday time
You can find the answers to both of your questions in documents that can be downloaded from:
http://www.middlewareresearch.com/soa-blueprints/
Yes you are right Stan, I objected about DTO being "evil", not about them being "necessary".
I think that the "tell, don't ask" approach works well for domain objects (i.e. business objects, BO), but not for inter-component communication. I do not see how a system made of multiple components and complying with SOA basic rules, can work without using DTO.
But I suppose that the discussion is getting off topic...
And YES I saw the "apple pie" in your post, proof that I read it thoroughly
Hi,
I do not think that DTO are a necessary evil. Some argue that they are not even OO, but I disagree with that.
The 3 paradigms of OO are encapsulation, inheritance and polymorphism. Saying that a DTO is not OO because it does not encapsulate behavior is like saying that a type is not OO because it does not inherit from another type.
DTO is a useful pattern, and is mandatory for SOA systems. I have had a lot of frustration working with DTO, both coarse and fine grained, but I finally settled on what I call "custom-grained DTO". In particular, I have found that the performance consideration underlying coarse-grained DTO to be simply a bad idea. For those interested I explain my thoughts about this in http://www.practicalsoftwarearchitect.com/articles/customgrained/customgrained.html
With every appserver I have worked with there has to be a vendor-specific descriptor accompanying the ejb-jar.xml. In JBoss this file is jboss.xml, and I guess that there must be one for Orion too.
In this file you have to map the ejb names to the JNDI names. Here is an example from jboss.xml.



The thing to remember here is that the ejb-name tag in ejb-jar.xml is NOT the JNDI name. Maybe this is the solution to your problem.
EJB is not only for persistence. The EJB container offers a number of services including life cycle management, security, transactions, distribution, etc. (see J2EE tutorial).
Whether you should use EJB or not depends on whether you need these services or not. If you need a significant number of these services, then you should consider using EJB. Why? Because you need either to use another framework or implement the services yourself (which is very time-consuming). In contrast, if you don't need these services then EJB might be overkill for your application. In conclusion this is a trade-off between performance cost and features. But bear in mind that most entreprise applications need most or all of these services. Also, there are several EJB best practices and optimizations that significantly reduce the performance cost.
You should read Log4J tutorial.
A few beginning of answers:
- EJBs cannot directly access the file system because of their distributed nature.
- You do not need to explicitly load the log4j properties file. The log4j component does it for you. In this file you can configure appenders. Obviously you only need a FileAppender (i.e. an ordinary log file).

In case you use JBoss I have a small document showing a basic log4j config for JBoss on my website.
Hi all,
I would like to know if anyone knows how to easily control page transitions in a web application.
The goal is to maintain a coherent session state even when the user uses browser navigation buttons (back, forward) and direct link to internal application pages (bypassing the login).
Thanks for your help.
17 years ago
JSP
Hi,
I am not sure it can help, but I have written a small web page about MySQL config for JBoss on my website. It is for JBoss 4 though, but should be essentially the same for JBoss 3.x.
Let me know if it solves your problem.
17 years ago