After much effort I have come to the conclusion that using the in clause in an
ejb-ql will only work in cases where you know exactly how many elements will be
in the in clause. This does not work in my case since I need my in clause to
be dynamic.
The in clause is defined like this.
| in_e
I am trying to use a method in an EJB that uses a select statement that uses
the in clause.
An sql example would be select * from quote q where q.id in ('sw','se')
My code looks like the following.
priceMatrixEntityHome.java
| Collection findRowsById(String sIds) throws RemoteExcepti
The following code contains the solution to my question.
I got a UserTransaction object and then did a begin and end transaction around
the updates so that only one update was done instead of individual updates for
each setter in the block.
| if (!bAbortInsertUpdate) {
|
You are correct I have just obtained a reference to the EJB in the Struts
action and then use the methods of the Entity bean. So I guess you are saying
that this method causes a transaction for every line of code that uses a method
from the entity bean.
You mentioned using a session bean to wr
I have done some testing.
I have created a table that has 7 columns. I have created getters and setters
for each column in an entity bean for the table.
I have a jsp that I use to create a new record or update an existing record. I
have turned sql logging on in JBOSS so I can see what is ha
Currently I am using all the setters to just reset all the values. If I don't
do that I will have to call each getter and see if my new value is different
and if it is then do the update.
This seems like a very clunky way to do this. Is there some other better way
to do this?
I am new to J2E
Never mind. Must be a qwirk in the Intellij IDE. I typed the code in as you
suggested, which created the red error marks, copied the code, deleted the code
and then pasted it back in. The red marks went away after the past and my
application ran fine when I started JBOSS.
Thanks again.
View
My first reply get messed up so here it is again.
I just tried the suggestion. Here is my code.
|
|
|Returns Entity Bean that has Username
|
|
| findUsernameEquals
|
|
I just tried the suggestion. Here is my code.
Returns Entity Bean that has Username
findUsernameEquals
java.lang.String
Thanks a million for the reply Alex. I really appreciatte it. I haven't tried
it yet but I assume from your post that you know exactly what you're talking
about.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879360#3879360
Reply to the post :
http://www.
I am trying to create some finders for an Entity bean.
One of my finders has the following signatures in the home file.
| UsersEntity findUsernameEquals(String key) throws RemoteException,
FinderException;
|
The query part of my ejb-jar.xml file is as follows.
|
|
I spent several days trying to figure this out and have finaly succeeded. I
could not find any place that had all this information in one spot so here it
is.
I was trying to create an entity bean that used an identity column in an MSSQL
table for it's primary key. Here is what I finaly came u
I had originaly learned how to write EJBs outside of a container using a tool
called Blazix. I didn't realize the difference.
In my first post I included the contents of a file called PropsTableBean.java.
I will include it here with the changes. You can compare this copy to the
previous copy
I am using Intellij 4.5.4 along with JBOSS 4.01sp1 with a JBOSS plugin. I am
also using MSSQL.
Everytime I try to create an instance of the entity bean I get the following
error.
Cannot insert the value NULL into column 'keyid', table
'WebQuoting.dbo.PropsTest'; column does not allow nulls.
Could somebody please post the full contents of the jbosscmp-jdbc.xml and
ejb-jar.xml files that contain an example of how to use an identity column as a
primary key in an entity bean? Also would you please post the script that was
used to create the table? I am trying to do this with a table i
I am using an mssql database. I need to create an entity bean for a table that
uses an identity column. I want to use the identity column as the Primary key
in the entity bean.
I assumed that I should not pass in a paramter for the identity column into the
create method of the Home interfac
I did end all of the
|
|
tags with
|
|
tags.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875996#3875996
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875996
-
Sorry I don't know why they didn't show in the previous post. I have ended all
of the tags with the closing tag.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875995#3875995
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=re
I am writing a product that is using a tab menu for navigation. I am using some
third party software that combines java script and cascading style sheets to
create the tab menus with. Each tab can have one or more tabs.
I am also using struts and strut tiles in the tool.
I need to figure out
I am writing a product that is using a tab menu for navigation. I am using
some third party software that combines java script and cascading style sheets
to create the tab menus with. Each tab can have one or more tabs.
I am also using struts and strut tiles in the tool.
I need to figure out
I am trying to run a war file called cdmanagersample.war. It is a war file
that was created for use while reading through a book called "The Struts
Framework".
I move the cdmanagersample.war file to the deploy folder and start JBOSS.
JBOSS hangs with this error message in the console.
inval
I am working through a book called "The Struts Framework" by Sue Spielman.
She has an example project created for managing cds. When I drop the war file
into the deploy folder and start JBOSS I get the following error message.
invalid console appender config detected, console stream is loopin
I did not make the entry the way I should have in the login.xml file. I made
the following entry.
|MD5
|base64
|
|
It should have been
|MD5
|base64
|
|
That solved the problem.
My application-policy in the login-config.xml
Hi I am trying to use the Password Hashing mechanism described in the Dukes
Bank tutorial.
I was able to successfully get the regular login and password tied to a
database security using JAAS to work.
When I now try to use the Password Hashing I get the following error in the
JBOSS log file.
Okay I figured this out. Just a matter of not ever doing this before. I gave
the wrong path for the image file in the src attribute of the img tag.
Here is my new sample code called home.jsp.
| <%--
| Created by IntelliJ IDEA.
| User: rb
| Date: Mar 24, 2005
| Time: 11:03:29
I have a simple JSP that I am trying to display an image in. All that I get
for an image is a white box with a red x in the middle of it. I have read on
another web page that you can only display text or images on a JSP but not
both. What's up with that. Here's my program.
| <%--
|
I had read somewhere that you did not have to include the tld files in the .war
file to use JSTL. I experimented some more and found this to be the case. The
only thing I had to do was make sure the standard.jar and jstl.jar files were
put into the WEB-INF\lib folder. It is simpler than I thou
I had read somewhere that you did not have to include the tld files in the .war
file to use JSTL. I experimented some more and found this to be the case. The
only thing I had to do was make sure the standard.jar and jstl.jar files were
put into the WEB-INF\lib folder. It is simpler than I thou
I had read somewhere that you did not have to include the tld files in the .war
file to use JSTL. I experimented some more and found this to be the case. The
only thing I had to do was make sure the standard.jar and jstl.jar files were
put into the WEB-INF\lib folder. It is simpler than I thou
I solved the problem or I should say a really great customer support rep at Jet
Brains and another support person at http://www.fuhrer.com/en/jbossplugin/.
The problem was that when I had set up my web module I had configured it to use
version 2.3. Version 2.3 does not support JSTL tags. If yo
I solved the problem or I should say a really great customer support rep at Jet
Brains and another support person at http://www.fuhrer.com/en/jbossplugin/.
The problem was that when I had set up my web module I had configured it to use
version 2.3. Version 2.3 does not support JSTL tags. If yo
I have gotten rid of the red code on the
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
code.
I added the jstl.jar and standard.jar file from the
jboss-4.0.1sp1\server\default\lib folder. Before I had them added from the
Jakarta folder that I had unzipped. Don't know what
Here is all my code. I figured out how to use the code button to show pure
code.
JSTLExample.jsp
| <%--
| Created by IntelliJ IDEA.
| User: rb
| Date: Mar 21, 2005
| Time: 1:20:14 PM
| To change this template use File | Settings | File Templates.
| --%>
| <%@ page con
Thanks for the responses I changed the code to from what it was to the
following.
It still just prints out ${person} ${person} ${person} ${person}.
I have actually recreated a project on my machine at work.
The <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; pre
Here is another try at the damn code. I replaced the <> with [] so the
application wouldn't interpret it as HTML. Just replace [] with <> around the
HTML tags and you get the real code.
<%--
Created by IntelliJ IDEA.
User: Roland
Date: Mar 10, 2005
Time: 9:25:36 PM
To change this tem
How do you turn the HTML off. I clicked the Disab le HTML in post button but
the HTML is ON in options.
The code basicaly does a
If someone knows how to turn html off on the post I would appreciate it and
then I will post the full code.
View the original post :
http://www.jboss.org/ind
I have written the following simple jsp that tries to use a few core tags.
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c-rt" %>
<%!
String[] names
I don't have the code with me right now. I will post it tonight.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3870752#3870752
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3870752
--
How do you set intelliJ up to use these tags.
I completed the following.
1. I have integrated JBOSS into intellij.
2. I can already use servlets and JSP with in my Intellij environment.
3. I have downloaded JSTL 1.1 and moved the two .jar files (jstl.jar and
standard.jar) to the the jboss/server
39 matches
Mail list logo