yc lim

Greenhorn
+ Follow
since Jul 26, 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 yc lim

hi all,
i have just started trying EJBs and have some problems accessing a remote MDB on Websphere using my swing client. i specify my InitialContext.PROVIDER_URL as following



but i keep getting



how can i know what url/port to use to access my MDB, or how can i configure one? Thanks you~
Thanks for the help . i manage to find the how to deploy the webservice. By using the Admin class they provide

19 years ago
Hi all,
im wondering if i can deploy Axis webservice using Ant or anything without starting the tomcat. It seems that i need to start up the server and run
java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
-lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
to deploy my webservice. im finding ways that i can compile and package everything using ant. any hints are greatly appreciated. thanks all!
19 years ago
erm i found the solution for this.. should use the Ear Classloader instead of the System ClassLoader instead..

thanks for the info!

i tried it .. but have some problem with that

i create a Configuration.properties file and tried put it into the APP-INF/classes folder and APP-INF/lib
But i still hit a NullPointerException when i

Properties userProps = new Properties();
java.net.URL url = ClassLoader.getSystemResource("Configuration.properties");
userProps.load(url.openStream());

how should i write my Configuration.properties ? is it the same as the struts, ApplicationResource.properties? Am using weblogic 8.1 btw.
did i miss any steps ? sorry, im a noob in programming

[ September 17, 2004: Message edited by: yc lim ]
[ September 17, 2004: Message edited by: yc lim ]
hi all,
i am trying to call a webservice in a ejb and found that i need to declare the url of that webservice inside my ejb classes. does anyone here know how can i externalize my url values to a xml or text file instead so i don't have to compile everytime the url change . thanks in advance
hi all, i get the deprecated message while using the java.util.Date setYear, setDate etc methods. i don't understand whats wrong with using this setters, and whats the alternative for that. thanks ~
19 years ago
hi, i have create users and group under my security realm at the console and specified which folder to protect at my weblogic.xml . i am able to log in and access the pages under the protected folder using the users created but , how can i actually log out? thanks in advance
19 years ago
Hi experts,
Im working on some ticket booking system and had encounter something that i don't understand.
Whenever i add create a Entity Bean, and if there is a existing record with the same primary key, it will throw me a TransactionRolledbackException. Everything works well if i throw the exception to the web tier(Servlet) and handle it. But i wanted to store some value into the Exception so that my Servlet can get it, i try creating a Customoize Exception that extends TransactionRolledbackException like this :

public class TicketBookedException extends TransactionRolledbackException {
private String x;
//getter and setter
}

and throw this Exception to the web tier :

try {
//book ticket
} catch (TransactionRolledbackException e) {
TicketBookedException tbe = new TicketBookedException();
tbe.setX("xxx");
throw tbe;
}

but when i catch it in my web tier :

try {
bookingManager.book();
} catch (TransactionRolledbackException e) {
TicketBookedException tbe = (TicketBookedException)e;
//...
}

i keep getting a ClassCastException. im quite sure this is legal because i try it on a non ejb senerio by creating 3 simple java class and it works (throwing NullPointerException).

And the other thing im not sure is that in my EJB that use the entity bean. when i catch the TransactionRolledbackException , i must throw it to the web tier or i will get a error as if im not handling it. cant i just handle it silently at the ejb.

Thanks for reading. Hope someone will enlighten me
try setting the value as null or 0, it works for me on MySQL
Hi, do anyone have an idea how to create a CMP2.0 entity bean so that auto_increment field in mysql database can be handled. thanks in advance.
19 years ago
hi experts. i am very new to j2ee and weblogic and im not sure how to do a form base authentication that uses database information for the user_id and password.

i got this in my web.xml


and this in my weblogic.xml


i have read some online materials that says that i can create a rdbms security realm at the console but i cant find it anywhere. basically i just want to do a simple login that use record from the database using j2ee/weblogic. thanks for reading !
19 years ago