Hi,
i'm new in j2ee.. So i made a stateless session bean, my ejb skeleton is:
i hava a query.jsp page, which request a query (string), after that the ejb Bean connect an Oracle database,
the ejb ha a rank function which ranking the resultset, after that i show the result a result jsp page. this works
but, i would give some choice for the users to the query.jsp, for what column would they look like, to the result.jsp.
So i think my bean should look like:
constructor (String query){connect to database..;
rank();
}
get() methods..
destructor (){disconnect;}
So i know i don't know the ejb concepts to much so i ask some idea, how i should realize what i would like.
I haven't find how possible write a constructor for a bean class, and how can call it. For example my result.jsp : i don't know where the c
QueryRemote queryr = null;
public void jspInit() {
try {
InitialContext ic = new InitialContext();
queryr = (QueryRemote) ic.lookup("query/QueryBean/remote");
..}
So my question is there any option, to call a constructor with an argument?
Or what do you advice for my problem? I 've interested any idea..
Thanks in advance..
i'm new in j2ee.. So i made a stateless session bean, my ejb skeleton is:
i hava a query.jsp page, which request a query (string), after that the ejb Bean connect an Oracle database,
the ejb ha a rank function which ranking the resultset, after that i show the result a result jsp page. this works
but, i would give some choice for the users to the query.jsp, for what column would they look like, to the result.jsp.
So i think my bean should look like:
constructor (String query){connect to database..;
rank();
}
get() methods..
destructor (){disconnect;}
So i know i don't know the ejb concepts to much so i ask some idea, how i should realize what i would like.
I haven't find how possible write a constructor for a bean class, and how can call it. For example my result.jsp : i don't know where the c
QueryRemote queryr = null;
public void jspInit() {
try {
InitialContext ic = new InitialContext();
queryr = (QueryRemote) ic.lookup("query/QueryBean/remote");
..}
So my question is there any option, to call a constructor with an argument?
Or what do you advice for my problem? I 've interested any idea..
Thanks in advance..