Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!

Mike Jones

Ranch Hand
+ Follow
since Dec 12, 2001
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 Mike Jones

Can anyone tell me if you will be able to map to legacy DBMS schema with CMP 2.0 in WAS 5?
16 years ago
This seems like a fair question, so I will bring it to the top of the thread again. I don't think that all J2EE applications need to be non-proprietary. But if you need a portable J2EE application, you would need to answer these type of questions. Am I correct in thinking CMP entity beans tend to be proprietary as soon as you introduce entity relationships? If you opt for a Toplink type of solution, you should be good to go on any application server that Toplink supports, correct?

Mike
16 years ago
Seenu,
Note: the embedded HTTP server is automatic with the startup of WAS 4.0 (i.e. you do not start it and stop it manually. As far as I know, you can't even do this with the embedded server).
The internal (embedded) HTTP server is automatically part of the WebSphere Application Server (i.e. not a seperate install). The IBM HTTP Server is the external one, which uses the plugin-cfg.xml. You don't need to mess with the external HTTP server with AEs for development ... and learning.
Can you run the admin console. /localhost:9090/admin
If so, I bet your problem is a jsp or servlet mapping problem for your application.
[ May 14, 2002: Message edited by: Mike Jones ]
16 years ago
<seemed-like-a-fair-question>
That is the question.
I throw out the following for discussion.
1) If I need / want to EJB, then I definetly want to use CMP (i.e. I don't want to have to sling BMP)
2) BUT, CMP seems to be proprietary (specific application server vendor extentions and tools)
So how does a company build "portable non-proprietary J2EE" applications with CMP entity relationship management functionality?
Can you get there by using tools like Toplink? If so, how does that work? Do you keep the session beans and replace entity beans with a Toplink layer?
One last question. Can you bank on the EJB specification as something corporate america is definitely going to move to in a big way. I don't share all of the beliefs of the following article, but many good observations seem to be raised.
This article: EJB's 101 Damnations
Mike
<seemed-like-a-fair-question/>
[ May 16, 2002: Message edited by: Mike Jones ]
16 years ago
Also, a related question. Where do I lookup the information for a specific error code. In this case, does the output from the log "X WSVR0040E:" represent an error code?
Thanks,
Mike
16 years ago
I'm trying to install one of the applications (MyBank) from a WebSphere tutorial in WAS AEs 4.0.2.
Lab: Build a WebSphere Application
url -> http://www7b.software.ibm.com/wsdd/library/presents/AE_SkillTrans.html
ftp://vadd1:bgm86zq2@207.25.253.53/1/wsdd/pdf/presents/WS40ST04L-1.pdf
I get the following error in the stdout log file:
X WSVR0040E: addEjbModule failed for com.ibm.ejs.models.base.config.applicationserver.impl.EJBModuleRefImpl (desiredExecutionState: START) (uri: Deployed_MyBankEJB.jar)
java.lang.LinkageError: Class WebSphereSamples/AccountAndTransfer/AccountKey violates loader constraints
The java AccountKey class from the tutorial follows. Can someone tell me why it violates the loader constraints?
Sorry about the formatting.
// 5630-A23, 5630-A22, (C) Copyright IBM Corporation, 1997, 2000
// All rights reserved. Licensed Materials Property of IBM
// Note to US Government users: Documentation related to restricted rights
// Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule with IBM Corp.
// This page may contain other proprietary notices and copyright information, the terms of which must be observed and followed.
//
// This program may be used, executed, copied, modified and distributed
// without royalty for the purpose of developing, using,
// marketing, or distributing.
//
package WebSphereSamples.AccountAndTransfer;
/**
* The key class of the Account entity bean.
**/
import java.io.*;
public class AccountKey implements Serializable {
public long accountId;
/**
* Constructs an AccountKey object.
*/
public AccountKey() {}
/**
* Constructs a newly allocated AccountKey object that represents the primitive long argument.
*/
public AccountKey(long accountId) {
this.accountId = accountId;
}
/**
* Determines if the AccountKey object passed to the method matches this AccountKey object.
* @param o java.lang.Object The AccountKey object to compare to this AccountKey object.
* @return boolean The pass object is either equal to this AccountBMKey object (true) or
*/
public boolean equals(Object o) {
if (o instanceof AccountKey) {
AccountKey otherKey = (AccountKey) o;
return (((accountId == otherKey.accountId)));
} else {
return false;
}
}
/**
* Generates a hash code for this AccountKey object.
* @return int The hash code.
*/
public int hashCode() {
return ((new Long(accountId).hashCode()));
}
}
16 years ago
James,
Hey, just wanted to say thanks for the link to the tutorial. It was excellent, and I recommend it to anyone looking for a starting point with WAS 4.0 AEs deployment issues (i.e. mappings for servlets and JSPs, and session and entity EJB deployment).
In case anyone goes through the tutorial, note the following:
Following the instructions to populate an InstantDB table using the supplied bat file failed for me. Rather than try and learn about InstandDB, I simply changed the data source to point to jdbc/SampleDB and created the table in the Sample DB2 database.
Also, the tutorial referenced a bug in 4.0.1 that jumbled JNDI bindings during deployment. I have 4.0.2 and it looks like that bug is fixed. Does it bother anyone else that a bug like that would go out in a release?
Anyway, thanks again for the link. Exactly what I needed. Now back to your workbook, Kyle.
Mike
16 years ago
Noreen,
AAT -> /WebSphere/AppServer/bin/assembly.bat
Automatically included as part of the WAS 4.0 installation.
Enjoy
Mike
16 years ago
Greg,
Maybe the salereps were not blowing smoke, but rather smoking ...
If they were right, there definitely needs to be an update to the Redbooks. I've read what you have. Speaking of Redbooks. I have found them to be very well written, but there doesn't seem to be a mechanism to keep them up to date. I know things change at internet speed, and it must be an incredible chore to keep them up, but the developers are dependent on them. Maybe links from the Redbook's with new information post-Redbook pdf release?
Anyway, maybe Simon or Kyle will come along and confirm "only one WAS AEs 4.0 per server.
Mike
16 years ago
Kyle,
From InfoCenter:
"Starting and stopping servers as services from the Windows NT Services window
You can use the Services window of your Windows NT or 2000 operating system to start and stop the IBM WebSphere Application Server service. Note, you can also use the command line options or Servers page of the administrative console to stop a server that you started as a service."
http://www-4.ibm.com/software/webservers/appserv/doc/v40/aes/infocenter/index.html

If your comment is correct, doesn't the Infocenter documentation need to be corrected.
I appreciate the input.
Mike
16 years ago
Kyle,Steve,
I'm interested in the question Steve raised about running AEs as a service. The following is from the Infocenter, and seems to suggest you can run it as a service under NT, which I would assume impies W2K also. ???
http://www.webspherepro.com/Images/WSArchiveImages/2001/WAS4Tutorial/Fig6.gif
Mike
16 years ago
Allan,
I can't help but I can share the pain. I'm currently going thru the same learning curve deploying applications in WebSphere. I view the huge learning curve as a J2EE issue, and not a WebSphere specific issue. Does it really have to be this complicated to deploy a frickin application.
Anyway, good luck to both of us.
Mike
By the way, FWIW, James posted a link a couple of threads back on what looks to be a good WebSphere 4.0 tutorial.
http://www.webspherepro.com/wparchive/was4tutorial/was4Tutorial.html
I will be going thru it in the next couple of days, and will give you some feedback.
16 years ago
James,
Excellent!!! Looks like just what I was looking for.
Thanks,
Mike
16 years ago
OK, since I'm talking to myself here, I might as well ask another question.
With a context-root of "/MyBankTest" , and a Welcome page of "index.html" in the web subdirectory, why would an url of "//localhost:9080/MyBankTest" result in a web page displaying the file structure with a "web" folder. When I click the web folder, the welcome page of "index.html" does get invoked. Also, I have a test.jsp page sitting in the "web" directory with the index.html , but "//localhost:9080/MyBankTest/test.jsp" or "//localhost:9080/MyBankTest/web/test.jsp" get a 404 page not found. What's Up?
Mike
16 years ago
Can someone point to a good Web Application tutorial where you actually install JSPs and servlets on WAS 4.0.
Thanks,
Mike
16 years ago