Or the other option would be to remove and persist:
entityManager.remove(customer);
entityManager.persist(customer);
but that seems like it would not be a good solution. Surely this is something
that comes up in nearly every Seam application, but I can't find any good
suggestions on how to
That's what I did, but after I do the merge, I do:
if(! entityManager.contains(customer)) {
log.severe(the entity manager is broken);
}
and of course, that log entry shows up. Does this make any sense?
View the original post :
Like all other web apps out there, we have Users who can sign up and get a
password, and then they log in. I have a handy LoginAction session bean which
handles the login part of it. It checks the password and if the user si
correct, the user is installed in the session.
Back in the days of
Thanks, I'll give that a try. It would be disapointing to have something as
modern as Seam and then have to write a dumb old filter again. Also I do want
fine-grained security. Like I might have a changeCreditLimit() method, and
only an Admin should be able to call that. I know that JAAS
Here's the situation: We have a site that needs to track affiliates. A
customer clicks on a banner somewhere, and the banner link has a parameter like
affiliateId=4949. That ID number needs to be saved in the user's session, or
even better in a cookie, so he can surf around the site, come
Actually...
It looks like I could make up a Stateless bean, with scope=EVENT. That bean
would be in scope for every single page request within the Seam application,
right? So that bean would be present at every one.
Then I could annotate a member of that bean with @RequestParameter.
From
Ok, I tried that and it didn't work. The bean didn't get used.
Next I'm going to try to force the bean to be used on the page by using a value
from it somewhere.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3966212#3966212
Reply to the post :
[EMAIL PROTECTED] wrote : Well seam.properties acts as a token so that we
don't scan every archive, we cannot warn every application that seam.properties
is missing because not all applications are Seam applications (yet ;) )
Ah that makes sense.
anonymous wrote : I agree that we could help
I'm even more confused. I put in a check to see what class the List was after
the object was fetched. That should be some kind of proxy class, internal to
EJB etc. Instead it's a plain old LinkedList. EJB isn't even trying to set a
proxy or do anything with that.
So I'm not sure how to
More info: I just put a logger in my setter for the collection. Of course the
setter is never called, so that means that at no point is EJB even trying to
install a proxy in there. If anyone can show me an example of mapping a
collection that works, and the collection is restored when the
No, they both the abstract Person and Address classes use
@Inheritance(strategy=InheritanceType.JOINED) . Will that work? Or should I
switch to some other inheritance strategy?
I'm getting my code together to post it.
View the original post :
What exactly do you mean, three identical databases? If you really need to
mirror databases, that may be something to do at the database server software
level, not within EJB.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3965671#3965671
Reply to the post :
But could someone confirm that EJB does support mapping a collection, and can
load the items into the collection when the object is fetched? I see chapters
on that in this book but I don't see any evidence that it is possible.
I notice that when I persist my Customer object, the collection is
Make sure you're using the right version of JBoss!
JBoss 4.04 GA does not work with Seam apparently.
You need to get:
http://sourceforge.net/project/showfiles.php?group_id=22866package_id=193295release_id=424215
Try that and see if it helps.
View the original post :
I tried again and removed the inheritance part of it, still no luck in getting
any objects in the collection when the object is fetched. This is with
cascade=ALL. Do collections work in EJB yet? I have the EJB3 book and it has
a whole section on collections but I can't get it to work in my
I tried again with a simple uni-directional mapping.
Could someone confirm that collections are supported in EJB3? I know they
worked in Hibernate 3, and that was great, but none of this seems to work
within EJB 3. What is strange is there are example apps. I'll try to see if
they work.
I don't get it. What is the point of having collection support in EJB if it
can only save collections, but cannot make them available when the object is
fetched from an EntityManager? This makes no sense. I looked back through the
Seam examples, and they are good examples of esoteric things,
I just want to say, Seam is pretty damn amazing. It finally makes web
development right by letting us use correct object-oriented design, and have
that link in with persistence and web presentation in a sane way. No more
Servlets, no more messy JSP. I put all my constraints right into my
I'm setting up an application that has an object called Person. Every Person
has an Address. But it's more complicated than that. For various legal and
accounting reasons, we need to keep track of every Address that Person has ever
had. So I set it up like this:
| @Entity public class
The other option would be to have Address be its own object, and then use the
session bean to install the Address into the Person just before it persists the
whole thing. I'm going to see if that works, unless someone has other ideas.
View the original post :
By the way, here's my next feature request for Seam:
I love that I can use annotations for so many things now, including form input
validation. That's great!
The one thing I find I need the most though is automatic form generation. The
reason is: The current business cycle for web
Here's the problem: Like so many other applications, I have a page that lets
users sign up. Like all other Seam apps, I have a session bean that processes
these signups. If everything is ok, it calls entityManager.persist(user).
That's great. Here's the problem: Let's say some silly user
I'm trying to develope a very simple action within Seam. My goal is to
eventually create a system which lets me register users, but the first step is
to just have Seam actually call register() method in a session bean. The
method doesn't do anything useful. Here's what I have:
In the JSP:
I added in seam.properties and that seemed to help. Now I'm getting an
exception like this:
| javax.naming.NameNotFoundException: RegisterDudeAction not bound
|
All I want to do is have a user click on a button, and then it makes an output
in the log!
View the original post :
THANK YOU! As with everything else in JBoss world, the problem usually comes
down to one line of XML somewhere.
Overall, my biggest problem with Java is the error messages are not helpful.
Seam could have put a message in the exception saying, check the JNDI pattern
in components.xml or
Ok, I'll do that.
As a developer, I would say that Lame error reporting is Java's worst
problem. Instead of throwing Cannot find class: java.util.StringBuilder, the
JVM should say, You need to upgrade to Java 1.5. Go to http://java.com to
download it. That kind of thing. A stack trace is a
I'm confused. If I want to use a context to send messages, do I use the
javax.faces.FacesContext, or org.jboss.seam.core.FacesContext? I can't see any
info about when and why org.jboss.seam.core.FacesContext would be used.
Thanks
View the original post :
By the way, it seems like ideally this is something that would be handled
within the Servlet container itself. You should be able to register some kind
of listener for the creation of a Request object and then another for when it
is finished, which should be able to handle things like
Thanks Raja. This problem seems quite absurd, because there's not much use to
EJBs if there isn't an easy and reliable way to render them in JSP. There
really should be some part of the Request object that makes it possible to
manage request-scoped resources.
I think I'll take the plunge and
Sometimes the hardest part is just setting up the build environment and the
framework. I have downloaded the Seam dist and gotten the hotel reservation
app to work in JBoss. Easy. Now I want to make my own Seam application.
This is turning out to be HARD. The hotel reservation app's
Ah, thank you. I'll try that.
One other approach that I have is to build the app and take apart the EAR file.
Often it's easier to go from that direction than it is to try to understand a
complicated build.xml.
View the original post :
Here's the scenario: I have a Servlet which uses JNDI to get a stateless
session bean. That stateless session bean has a method like load which loads
up one of my entities.
So now my Servlet has gotten a hold of its entity bean. Let's say this entity
is an Invoice which contains a List of
Obviously, the title should be JSP, not JavaScript.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3964734#3964734
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3964734
___
Here's my question:
I have some Stateless Session Bean classes. This is a very simple applications
which lets users leave their names and phone numbers so a salesman can contact
them later. To do this, I have set up an Inquiry entity bean.
I also have a stateless session bean called
301 - 334 of 334 matches
Mail list logo