Emir,

please see inline ....

Werner

On Sun, 12 Dec 2004 14:03:17 +0100, [EMAIL PROTECTED] wrote:

>
>Hi,
>It's me again. 
>I wasn't active for a long time, but time has come to work with Castor again.
>I got a request to create a web application fully developped in Java 
>technologies that will be frequently used by a lot 
> of users and will be frequently accessing a database (mysql probably), part 
> of which (2-3 tables) is, in fact, populated by 
> an external application. Also, some XML-based reports need to be generated.
>Of course, I decided to use Castor JDO for database access and Castor XML for 
>XML generation.

Most of your choices seem quite natural to me, though I'd really keep an eye on 
the 'part of which (2-3 tables) is, in fact, populated by 
an external application' part of the above statement. This situation, where an 
external application accesses the same data as your to-be-developed web 
application, cause some problems. In general, as long as your external 
application only 'populates' the database with data (that subsequently is used 
by 
your web application/Castor JDO), you should be fine. But if your external 
application tends to modify the data as well, things get a bit more 
complicated, especially when you consider using one of Castor JDO's caches.

>So, I would like to know if there's some kind of "tutorial" for using Castor 
>in Tomcat. :-)
No, there isn't, as it is almost as simple as using Castor in a stand-alone 
application. I assume some familiarity with Tomcat and setting up JDBC 
DataSources and binding objects to a JNDI naming context, so please let me know 
of that is not the issue. Basically, I'd advise you to 

a) create a JDBC DataSource with Tomcat (or within your wep application 
context, to be more precise), using e.g. DBCP's BasicDataSource class as 
shown in the JDBC documentation for Tomcat. Let me know what version of Tomcat 
you intend to use, and I'll point you to the right places for reading 
up.
b) bind a JDO instance to Tomcat's JNDI tree, configured to use this JDBC 
DataSource.

Once  that's been done, in your code do a JNDI lookup for the JDO instance, and 
use it to create Database instances as needed. And please make 
sure that you release this instances so that the connection pool used by the 
DBCP data source will not be drained.

>What is the overall performance of Tomcat as JSP/Servlet engine in real-world 
>apps? 
Compared to what ? Personally, I believe that Tomcat not only is a reference 
implementation of the Servlet/JSP specification, but a very good one, 
indeed. Especially with the 5.x release a lot of features have been introduced 
that only had been available in commercial products before.

>What are the alternatives?
There's a lot out there, many of them being commercial. Imho, you do not have a 
reason to switch. But then again, just my 0.02 cents.

> I know it's not the right palce to post this question, but I assume a lot of 
> you guys has worked with this.
>How can I setup Castor work in such a way that the 'common cache' is used for 
>all users accessing the web page (since 
> they will acces the same data most of the time, probably)?
As you'd with a standalone application. Just declare the <cache-type> element 
for those entities you want to be cached. But please (pretty please) bear 
in mind my little comment above where one and the same data is accessed by 
Castor and an external application.

>Also, customer wants to have some web services. 
>For that purpose I'll use Apache Axis most probably.
>Has anyone used this setup (Castor/Tomcat/Axis)? Are ther any tutorials or 
>'quick setup guides' for this?
>Are there any *known* obstacles which I can run into?
Not that I know. Go to http://www.ibm.com/developerWorks and search for a paper 
on Axis and Castor. This should contain all you need to get you 
going.

>Keith, Bruce, are there any licensing issues that I could run into? 
>
>Thank you for any help,
>Emir.
>
>
>
>----------------------------------------------------------- 
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-user
>



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to