Tomcat & JRE Redistribute License

2009-07-15 Thread Feris
Hi Everyone,
I'd like to distribute Mondrian - an open source OLAP engine - , it's web
interface app JPivot and my sample Derby application. For Mondrian, the
licensing question has been resolved.

This left me with other two dependence apps : Tomcat & JRE 6. Is it ok to
embed them as part of my distribution ? For your information, it is an open
sourced project.

Thanks,

Feris


Re: Tomcat & JRE Redistribute License

2009-07-15 Thread Feris
Hi Chris,

On Thu, Jul 16, 2009 at 5:13 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

>
>  Since it's pretty clear you're too lazy to locate them yourself, here's
> a link for you: http://www.apache.org/licenses/LICENSE-2.0.html
>
> You might be specifically interested in the section called
> "Redistribution". It's not a tough read.
>

I know confidence to have Tomcat redistributed. But I'm not sure for JRE,
better to leave it for users to download and install on their own.


> This is not relevant to the Apache License. You can re-package Apache
> httpd + Apache Tomcat and charge a jillian dollars for it if you want.
> You just need to tell your customers that they can get a free copy :)
>

Yes, correct :)

Thanks for all the clues. Appreciate it very much.

>
>
> - -chris
>

Best Regards,

Feris


Tomcat : Background Process

2006-07-26 Thread Feris Thia

Hi All,

How can I create a new thread after let's say uploading a file and I
want to create indexing process (another class) that is a background thread
process ? How can I achieve that ? Maybe some simple code can help me ?

And if I may... Is that possible that I monitor this thread ??


--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


JMS Alternative

2006-08-15 Thread Feris Thia

Hi All,

Is there any alternative JMS api in Tomcat ? And how can I implement multi
threading in JMS, let's say to send mass email (at about 100.000) with Java
Mail API with customized attachment ?

--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


Re: JMS Alternative

2006-08-16 Thread Feris Thia

Hi Richard,

Like to thank for the feedback. Yes, I realized that it's quite challenging.
Hm, ok.. if I may do so... what kind of technology stacks (API) that I need
to ?

Feris

On 8/16/06, Richard Mixon <[EMAIL PROTECTED]> wrote:


If you are wanting to send email, you probably are interested in the Java
Mail API - not the JMS API - they are for (usually) different purposes.
However one could conceivably use JMS as a conduit between the various
components of such a system (e.g. email assembly, delivery and the MTA).

Creating an effective, performant mass email subsystem can be quite
challenging. I believe I've seen a few that are commercially available and
have also participated in the development of one. It is not something that
can be easily answered in an email - it an entire project :)

That said, maybe someone else on the list knows of a framework that is
already built for such a task.

HTH - Richard

-Original Message-
From: Feris Thia [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 15, 2006 10:51 PM
To: Tomcat Users List
Subject: JMS Alternative

Hi All,

Is there any alternative JMS api in Tomcat ? And how can I implement multi
threading in JMS, let's say to send mass email (at about 100.000) with
Java
Mail API with customized attachment ?

--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


Writing Web.xml & Context.xml at Runtime

2006-08-18 Thread Feris Thia

Is it possible to change web.xml or context.xml entry at runtime ?? I need
to write administration configuration for my web application that will
change those xml's entries.
Thanks before.

--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


Re: JMS Alternative

2006-08-18 Thread Feris Thia

Hi Richard, Ronald, Nikola, and Filip

Thanks for all the answers. I now get clearer for my solution, it is clearly
has nothing to do with Tomcat but in my application design.

--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


Showing Up Console in Linux Environment

2006-09-07 Thread Feris Thia

Dear All,

I can show up tomcat console after I started the startup.bat batch script.
But when I run startup.sh, it shows nothing. How can I showing up the
console in Linux ? I'm using Mandriva 2005 with Sun's JDK 5.

--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


Re: Showing Up Console in Linux Environment

2006-09-07 Thread Feris Thia

Hi William,

On 9/7/06, William Bonnet <[EMAIL PROTECTED]> wrote:


Hi Feris

> I can show up tomcat console after I started the startup.bat batch
script.
> But when I run startup.sh, it shows nothing. How can I showing up the
> console in Linux ? I'm using Mandriva 2005 with Sun's JDK 5.

Have you tried to open a console or terminal from your desktop
environnement
(like Konsole, gnome-terminal, rxvt or whatever) and run startup.sh from
command line ?



Yes... I did, and Tomcat is activated since then. But no debugging console
showing any activities comparing to Window's startup.bat script.

Regards,


--
William  http://www.wbonnet.net

http://www.sunwizard.net Le site français des amateurs de stations Unix
http://www.blastwave.org An OpenSolaris Community Site
http://www.guses.org French speaking Solaris User Group




--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


Re: Showing Up Console in Linux Environment

2006-09-07 Thread Feris Thia

Hi William,


On 9/7/06, William Bonnet <[EMAIL PROTECTED]> wrote:


Hi

> Yes... I did, and Tomcat is activated since then. But no debugging
console
> showing any activities comparing to Window's startup.bat script.




You can have a look logs file to the catalina.out file. Use tail -f if you

want
to see logs output to your console.




It's working now. Thanks.

So we cannot directly get output from Tomcat's JVM ?


--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


Re: Showing Up Console in Linux Environment

2006-09-07 Thread Feris Thia

Hi Markus,

On 9/8/06, Markus Schönhaber <[EMAIL PROTECTED]> wrote:


Instead of
startup.sh
call
catalina.sh run



This is what I meant. Thank you very much Markus.

Regards

  mks



--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


Singleton and ServletContext

2006-09-08 Thread Feris Thia

Dear All,

Is there anyone can point me to any sample how to use singleton object
across web application in Tomcat ?

--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


HSQLDB and Tomcat ServletContextListener

2006-09-21 Thread Feris Thia

Dear All,

I'm using HSQLDB as embedded in-process mode for my web application. I used
to schedule every 1 minutes to check on the HSQLDB database. I open the db
when context initialized and close it when context destroyed. But when the
context reloaded I always get Java.lang.NullPointerException when trying to
execute SQL statement.

What is wrong ?? It looks like everytime the context is destroyed... the
hsqldb gets lock.

The snippet code like below :
===

import javax.servlet.ServletContext;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;

import java.nio.channels.ClosedByInterruptException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Random;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class ContextStartUp implements ServletContextListener {

private ServletContext context = null;
MyThread objThread = null;

ResultSet rs = null;
Connection conn = null;

public void openDB()
{

try {
conn = DriverManager.getConnection("jdbc:hsqldb:file:" +
context.getRealPath("/data/testdb") + ";ifexists=true;shutdown=true;", "sa",
"phidmspassword");

} catch (SQLException e) {
e.printStackTrace();
}
catch(Exception e)
{
e.printStackTrace();
}
}


public void closeDB()
{
Statement stmt = null;
try {
if(conn!=null)
{
stmt = conn.createStatement();
stmt.execute("SHUTDOWN COMPACT");
stmt.close();
conn.close();
stmt = null;
conn = null;
}
} catch (SQLException e) {
e.printStackTrace();
}
}

public class MyThread implements Runnable {

int nomor = 0;

Thread currentthread = null;

public MyThread() {
if (currentthread == null) {
currentthread = new Thread(this);
currentthread.setPriority(new Random().nextInt(5) + 1);
currentthread.start();
}
}

public void run() {
Statement stmt = null;

String sqltodo = "";
Thread myThread = Thread.currentThread();

while (myThread == currentthread) {
try {
stmt = conn.createStatement();

if (stmt.execute("A select statement.. "))
{
rs = stmt.getResultSet();

if (rs.next()) {
..
}
}


   sqltodo = Update queries ..;

stmt.executeUpdate(sqltodo);
stmt.execute("SHUTDOWN");
stmt.close();
}
else
{
stmt.close();
}
} catch (SQLException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally {
stmt = null;
}

try {
Thread.sleep(10);
} catch (InterruptedException e) {
}
}
}

}

public void initThread() {
openDB();
objThread = new MyThread();
}

public void stopThread() {
objThread = null;
closeDB();
}

public void contextDestroyed(ServletContextEvent event) {
context = null;
stopThread();
}

public void contextInitialized(ServletContextEvent event) {
try {
Class.forName("org.hsqldb.jdbcDriver").newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}

context = event.getServletContext();

    initThread();
}
}

==


--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA


jndi.properties

2006-05-03 Thread Feris Thia

Hi,

I try to put jndi.properties under the same folder with JSP page. But
it's not working. Where should I put it ?

--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jndi.properties

2006-05-03 Thread Feris Thia

Ic so we cannot just load it from the directory where jsp are and
use this code ?

=
InitialContext jndiContext = new InitialContext();
=

On 5/3/06, abdurrahman sahin <[EMAIL PROTECTED]> wrote:


i think , it is actully related to where you are looking for.
i think you can put it anyware as long as the diretory you put it is
accessible.

http://asahin.net

private static final String CONFIG_FILE="resources/jndi.properties";
FileInputStream fis = new FileInputStream(CONFIG_FILE);
myProperties.load(fis);





--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jndi.properties

2006-05-03 Thread Feris Thia

ic... i think this is what i need.

thx,

feris

On 5/3/06, abdurrahman sahin <[EMAIL PROTECTED]> wrote:

i never tried it with default ctor, used it as
new InitialContext(jndiProperties);
using DirectoryFinding methods may help you like below.
String realPath = request.getRealPath(request.getContextPath());
That should return the path up to where you have your servlet context.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jndi.properties

2006-05-03 Thread Feris Thia

Hi Tim,

I've read the article. I think I get all the ideas. In Tomcat
should be in classloader path right ? like in lib or classes folder ?
I'll try that.

Thanks

On 5/3/06, Tim Lucia <[EMAIL PROTECTED]> wrote:

No.  It has to be under a location accessible via the classpath.  The JSPs
are web content.  Read this:

http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html

Tim
--

Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jndi.properties

2006-05-03 Thread Feris Thia

ic It works ...

This is the best approach that I may Used

Thanks Sreeni ..

On 5/4/06, Sreenivasulu R Gaddam <[EMAIL PROTECTED]> wrote:

Instead of hardcoding, you can define a variable in
the web.xml as


jndiproperties

relativepathtowebapp/jndi.properties
jndi properties


and get the path name from the servlet context real
path as follows.

String propsFilePath =
ServletContext.getRealPath(ServletContext.getInitParameter("jndiproperties"));


Once you have the file path, then you can read using
FileInputStream.

FileInputStream in = new
FileInputStream(propsFilePath);
Properties props = new Properties();
props.load(in);

-Sreeni.



--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Connector with Static Content Caching

2006-05-08 Thread Feris Thia

Hi All,

Can I set worker2.properties from mod_jk connector to do static
content caching ? Or is there any better alternative solutions ?

--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]