eammon bannon

Ranch Hand
+ Follow
since Mar 16, 2004
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 eammon bannon

This depends how much of Exchange's functionality you need to use. If all you require is email send/receive then treat Exchange as you would any SMTP/POP3 mail server and use the JavaMail API for this. If you need the extended set of Exchange functionality you are right you need a Java-COM bridge and JIntegra is a good one, but it is about $3000 for the initial licence. There are other bridges out there, have a google for "Java COM bridge" and you see.
19 years ago
Can I ask why you would want to create a new log file every minute? It sounds like a good way to crash the server - if its running for only a week you'll have more than 10000 log files!
Can I ask why you would want to create a new log file every minute? It sounds like a good way to crash the server - if its running for only a week you'll have more than 10000 log files!
19 years ago
Locking, when it comes to DBs, is always better left to the Database. Consider the effect synchronized DB access will have on the performance of you application! Think why you would lock access when updating a row:
1. deadlock
2. race conditions
Deadlock is a very well understood problem in the world of RDBMSs. Its best left to them to handle possible collisions. Some are better then others (it takes more concurrent to cause a deadlock in Oracle than it does in SQL Server for example) but almost all are going to be better at handling this than you are in your code.
Race conditions are more common, since JDBC is usually used in a multiuser/multithread environment. In this case a locking startegy is a better route to protecting against the bugs race conditions can throw up. Optimistic locking works in most situations, and is a much better solution.
You want outer join fetching. This is a process whereby the relationships from a row can be recovered as a graph of objects from one single sql query. In hibernate, you can configure outer join fething globally, plus the depth of outer join fetching, with "hibernate.use_outer_join=true" and "hibernate.max_fetch_depth=<whatever>" in hiberenate.properties. It is in fact recommended by the Hibernate people to do this.
(Please note: not all DBs implement outer join fetching - so best check your docs before trying to use it)
MVC stands for Model - View - Controller, and is a design pattern independent of Servlet/JSP technology. It represents a way of building systems with three types of demarcated component: the Model, the View and the Controller. A Model is typically data, in the servlet/JSP world it could be a JavaBean which represents a row in a database table for example. The model does nothing more than hold data. A View is a component which can display Model components, and in the Sevlet/JSP world it is probably closest to a JSP (assuming the JSP contains only display logic). The Controller is the part which (it could be considered) handles navigation through the application, and would probably be a Servlet. Again, it would contain no data and no GUI code (i.e. no Model or View).
MVC pre-dates JSP/Servlet technology by some considerable time, and its a good idea to try and understand it independently of those two technologies. One of implementations of MVC in the Java world is Swing, and there is a good explanation of this here http://www.javaworld.com/javaworld/jw-04-1998/jw-04-howto.html. In the J2EE world Struts, is the most common implementation. It might help you to look at how this works.
(One small note, you can't have a proper MVC implementation as a WebApp - MVC requires two way communication to the view (i.e. changes in the model will be transmitted to the view) but this isn't possible due to the restrictions of HTTP)
19 years ago
JSP
Presuming your mail server supports such addresses (and I'm assuming it does, otherwise you wouldn't have asked the question ), just create a new javax.mail.internet.InternetAddress object for the address and send the mail as you always would. InternetAddress will validate the address, but it won't validate against strict RFC822 defined syntax (specifically it doesn't check for the existance of an '@' symbol at all, so should not complain if there are two). You should be fine to just use JavaMail as you normally would.
[ April 13, 2004: Message edited by: eammon bannon ]
19 years ago
Standard tools? A licence is a written agreemment to grant permission to use your software not a piece of functionality. Do you mean you are looking for some software-based way to enforce a licence? If so do you mean the licence to install the software on the server or a way of enforcing licencing per client connection?
19 years ago
Ehm, nope Pawan. finalize() is a method you supply to the garbage collector which it will call before it cleans up the Object. And since there is never any guarantee that the GC will ever cleanup your Object relying on it to free up resources is flawed. So what you should do is:

[ April 08, 2004: Message edited by: eammon bannon ]
I might be wrong, its been a while since I looked at Crystal Reports, but I am pretty certain that the J2EE compliant version of CR ships with some example JSPs. You could look there for a bit of guidance.
19 years ago
JSP
Woops! I'll remind myself of the documentation before posting in future. Cheers for the correction Ilja.
19 years ago


1. what are these JSP,J2EE,EJB,STRUTS,..?
2. How they are different?
3. Where they are used?
4. How they are useful?


First and most important point - JSP,J2EE,EJB and STRUTS are nothing to do with JavaScript, serverside or not. Your questions are very basic stuff, so I won't answer them here - it would take too long, and is most likely to confuse not enlighten. I would recommend you read through the tutorials on Sun's site. And perhaps also Bruce Eckel's "Thinking in Enterprise Java" which is avaliable free online (google for it).
However, in your list of the technologies you already know you don't included Java. If its the case that you have not yet learned to program in Java, forget J2EE and go learn that first. There's plently of resources on Sun's site. Good luck.
19 years ago
JSP
You can find the number of open cursors avaliable per user in Oracle with this SQL:


select * from v$parameter
where name = 'open_cursors'


Check this, make sure the DB is not set to allow a too small value for your application. If you need more, the number is defined in INITSID.ORA.
You probably want check who's opening the cursors, and if they are closing them. You can do this, but I can't remember the SQL - sorry - have a glance at the documentation there is a way to do it.
Also its not the ResultSet which opens the cursor as such, but the Statement. Make sure you are closing this, which will release any JDBC resources that are being used.

(BTW: you should really have posted this in the JDBC forum)
[ April 07, 2004: Message edited by: eammon bannon ]
19 years ago


But, what is the fuss about "J2EE without EJB" lately.


Its not Hibernate that's causing that. It does offer a much better ORM solution than Entity Beans (and therefore removes the requirement to use EJBs to access the ORM layer, and indeed a container to run things in). So it is one of the tools which helps achieve J2EE without EJB, but not the reason on its own. An EJB container however offers much more than just an ORM mechanism.
I don't think Hibernate uses an alternative transaction mechanism - indeed as far as I remember, it provides convenience lookup classes for Transactions within all the big EJB containers i.e. its meant to run in conjuncion with not instead of these containers. But the primary difference is its only one layer of an application, specifically the data access layer - so if you are trying to do business transactions in this, then there is something wrong with your design.