Hastono Bayu

+ Follow
since Oct 13, 2003
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hastono Bayu

Hi jurgen

What's ur problem in using the deploytool in j2ee sdk 1.4 ?
I use this sun app server's product in my latest project (using servlet, sessoion & message driven bean)

i've encountered some problems before when using the deploytool too, but i've overcomed it. maybe i can share it for ur problem ?


Did u mean creating a HTTP request through EJB to another server?
OK, Thanx A lot..
I've figured out by placing the shared library in the EAR, so each JAR in the same EAR can use it. (Options #3)
I found it as quite easy practice using Sun App Server with the deploytool they provided.

Litlle more question : How about if i have two EAR using the same dynamic class library ?
Where should i put the library ?
Should it be in both EAR ?
As far as i learn, i need to put it in the server classpath (server clasloader) so both EAR can recognized it.. but again that will block the dynamic reloading process.

Any suggestion ??

Thanx in advance,

Hi all,
i need help concerning classloading in j2ee

i have one EAR, which consists several EJB-JAR files. In each of the JAR files i need to load some helper class as a shared resources (others jar can access it)

i put this helper class in a directory. Then i added this directory to the system classpath. The classloading works fine.
But the problem is i need to change this helper class and refresh the class without restarting the server. when i invoke the class, it called the old instances of the class, even i've replaced the file on the directory that hold it. What's happening ?

Can u help me to solve this thing out ? Or should i put the helper class inside the EAR too ? how i should call this helper class inside the EAR for each separated JAR ?
Need all ur help...


Thanx for the info,

I hope mysql will support this XA datasource soon


17 years ago
maybe this can help..
to create a connection pool, use the application server admin console
default on http://localhost:4848
on the JDBC - Connection Pool - create new here's an example
Name : MySQLPool
ResourceType : java.sql.DataSource
Vendor : Mysql
Data Source class name : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
and add the following property
user : db_user
password : db_password
port : 3306 (mysql default)
that's it. remember to put the MySQL connector/J jar file to the server classpath
and then create a JDBC Resources afterward
for ex,
JNDI name : jdbc/MySQL
PoolName MySQLPool --> use the pool u've created b4
status enabled
To create a connection to this pool simple use this code on the init section:
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/MySQL");
Connection conn = ds.getConnection() ;
//"creating statement.."
Statement stmt = conn.createStatement();
and do rest of the query as usual
hope it will help


17 years ago
I got the error message
"cannot add non-XA Resource to global JTS transaction" inside the server log
when i try to create a conection to
MySQL pool from a message driven bean in the onMessage() method. I used SUn ONE App Server 8 as the application server for my bean.
here's my connection pool setting for mysql
Name : MySQLConnPool
DataSource Class Name :com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
user : user
password : pass
port : 3306
the ping test was successful, and when i created a connection inside a servlet this error wasnt show up.
Can anyone help me please??
Do i need an XA DataSource ?? i try to find it in MySQL Connector/J but there's no such a class inside the package
Thanx in advance...

17 years ago
Your Game Canvas class must implements the CommandListener interface .
Check it out first
17 years ago