Kalle Anka

Ranch Hand
+ Follow
since Jul 06, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Kalle Anka

Hehe thank you for replying. I know the UBR all have been shut down. But I was wondering if anyone already had a juddi (or anything similar) up and running which I might get access to.

anyone having a public UDDI I may use? Im trying to do the examples from RMH's book and prepare for the SCDJWS. Will gladly pay a small sum for any kind soul who let me use your public UDDI for testing =)

best regards
Kalle
WOW best post ever!! go Ricky go Ricky! =)

for some reason knowing that other people have had the same problem as me (and also have solved it) makes me all warm inside.

Thank you again
Hi everyone,

i wanna set up necessarly application server and libraries to that I can try writing my own web services. But I keep failing. I've tried Jboss and tomcat/axis on 3 different computers with really messy result. Nither Jboss nor Tomcat/axis supplied with good documenation (either docs were for java 1.5 with annotation or docs were missing).

Can someone please post links of good application server to write your own web services on java 1.4 platform... and also supplies with good documentation.

thank you in advance
Kalle
Hi,

this might be a really stupid question since I'm new to java EE. I'm trying to make a database table with entity bean: CREATE TABLE XXX { ID int not null auto-increment primary key, name varchar(255)};

So i have declared with xdoclet
* @ejb.pk-field
* @ejb.persistent-field column-name="ID"
* @ejb.interface-method view-type="local"
* @jboss.persistence auto-increment = "true"
* not-null = "true"

In ejb-jar the ID field has been declared primary key.
In jbosscmp-jdbc.xml the ID cmp field have been declared "not-null" and "auto-increment".

I'm using mySQL with I have changed in standardjbosscmp-jdbc.xml and I have declared
* @jboss.entity-command name="mysql-get-generated-keys"
In the entity bean


BUT still after deployment... when I type "show create table XXX" in my MySQL shell.... neither "not null" nor "auto-increment" is declared!

Any suggestions of what can be wrong?

Everything works fine if i manually create the SQL-table with "not null" and "auto-increment". Its really confusing.
17 years ago
Jihad to the dude who started this thread!
17 years ago
Hi everyone,

I'm using EJB 2.1 and I'm new to J2EE. I experience some problems with CMR so I'm trying to debug my code with some silly System.out.println statements, and I found that ejbPostCreate(...) doesn't execute for some reason unexplainable. Can anyone shed some light into this?

I've attached parts of the code below. When I run this code only "yoyo1" is displayed... leaving "yoyo2" in ejbPostCreate out.


/**
*
* @ejb.bean name="UserBevaka"
* display-name="Name for UserBevaka"
* description="Description for UserBevaka"
* local-jndi-name = "ejb/UserBevaka"
* type="CMP"
* cmp-version="2.x"
* view-type="local"
* primkey-field = "uniktBevakningsID"
* schema="userBevakaSchema"
*
* @ejb.pk class = "java.lang.Integer"
*
* @ejb.persistence table-name="userbevaka"
*
* @ejb.home generate="local" local-class="test.interfaces.UserBevakaLocalHome"
* @ejb.interface generate="local" local-class="test.interfaces.UserBevakaLocal"
*
* @jboss.entity-command name="mysql-get-generated-keys"
*
*/
public abstract class UserBevakaBean implements EntityBean {

.
.
.

/**
* Create method
* @ejb.create-method view-type = "local"
*/
public java.lang.Integer ejbCreate(
java.lang.String username,
java.lang.Integer uniktAnstalldID,
AnstalldLocal anstalld) throws javax.ejb.CreateException {
System.out.println("yoyo1");
setUsername(username);
setUniktAnstalldID(uniktAnstalldID);
setCreateDate(new java.sql.Date(new java.util.Date().getTime()));
return null;
}
/**
* Post Create method
*/
public void ejbPostCreate(
java.lang.String username,
java.lang.Integer uniktAnstalldID,
AnstalldLocal anstalld) throws javax.ejb.CreateException {
System.out.println("yoyo2");
setAnstalld(anstalld);
}
Hi y'all,

I'm not very advance in J2EE programming, and now I'm facing a problem with using form based authentication. In normal case, the user would request a protected resource and then be redirected to a certain loginpage.

But I want to be able to login from any page without the user first trying to access any protected resourse. I have tried to simply adding the necessary html-tags to my main page. But when I try to log in there (without first trying to access a protected resource), JBoss just prints out an error message. Is there a way to login users without them trying to access protected resources?

thank you in advance
18 years ago
thanks Jeanne,

by JDBC you mean writing SQL queries directly to the database right? Wouldnt I then need to open a database connection in my entity bean? And wouldnt that be considered to be bad programming when your using J2EE?

If using JDBC... should i change my ejbSelectXXX to another method ejbWhatever and where I make my sql query?
Hi all,

im not very experienced in EJB QL, and i have a small problem. Im developing an "advance search" (when the primary key is not known) where people can fill in what they do know about a particular database entry.

So... when I write my EJB-QL query for my ejbSelect method, it gets tricky. The problem is that not all parameters will be filled in by the user. So I cant write my EJB-QL query like:
SELECT OBJECT (o) FROM TestSchema o WHERE o.parameter1 = ?1 AND o.parameter2 = ?2 AND o.parameter3 = ?3 AND o.parameter4 = ?4

Those parameters that arn't filled in by the user... how can I make my EJB-QL query to understand that i dont want any filtration of that particular parameter? In SQL you could simply replace an empty string with "*". But you cant do that in EJB-QL. Any suggestions?

[ February 03, 2007: Message edited by: Kalle Anka ]

[ February 03, 2007: Message edited by: Kalle Anka ]
[ February 03, 2007: Message edited by: Kalle Anka ]
true... i forgot that Jboss is only an EJB container. But the way many people talk about Jboss (including mysefl) is that jboss is both an EJB and a Servlet container. My appologies =)

I didnt found the book bad. To acheive its goal to pass the SCWCD i found it good. Also for a beginner it was very easy to follow the examples. However the same book in the series that handles SCBCD was terrible. If you want a good book on SCWCD I can also recommend the Head first series that have got even better reviews that the one I used!

best wishes
19 years ago
JSP