[JBoss Seam] - Re: @NotNull annotation not working...
by waheed.murad
well i have understood the problem but cannot find solution for it.. well i have
h:outputText in my JSF page as
<h:inputText id="username" value="#{customer.username}">
which is mapped to the Entity bean
Entity
@Name("customer")
@Scope(SESSION)
@Table(name="ERegCustomer")
@SequenceGenerator(name="CUSTOMER_SEQUENCE", sequenceName="EREGCUSTOMER_SEQ")
public class ERegCustomer implements Serializable
{
private static final long serialVersionUID = 1881413500711441953L;
private Integer id;
private String username;
private String password;
....
....
....
And my session bean as
public class ERegCustomerAction implements ERegCustomerLocal {
@In
private Context sessionContext;
@In(required=false)
@Out(required=false)
private ERegCustomer customer;
public String registerCustomer()
{
.......
.........
......... /// here customer.getUsername returns empty String not null
when i submit the form with empty field, ........ customer.username have value. i mean it is assigined to empty string ("") not to null so abviously @NotNull anotation will not work. if this is the case then for what @NotNull is used for and if i am right then what mistake i made
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994911#3994911
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994911
19 years, 4 months
[JBoss Seam] - Re: Why
by Eekboom
Huh? That's exactly what I meant: The value of "embeddedEjb" is jardcoded to "false" in this snippet":
"gavin.king(a)jboss.com" wrote : Here is a quote from the ant build:
|
| <filter token="embeddedEjb" value="false"/>
| |
In another place in the build file it's hardcoded to "true".
So the value defined in component.properties is never used at all.
When I build with my IDE the ant filter tokens in component.xml are not replaced, but Seam is clever enough to dynamically retrieve the values from component.properties, which makes seam want to use the embedded ejb container, which fails in JBoss.
Not a big deal, but quite confusing.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994910#3994910
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994910
19 years, 4 months
[JBoss Seam] - Re: Basic Seam questions
by lightbulb432
anonymous wrote : That's right, I did notice a "cid" request parameter in the address bar. However, what confuses me is if I hit CONTROL+N (for a new window) or open a new tab, how does Seam know that you are now in a new conversation and not the same one? After all, isn't it the same "cid" in the request parameter?
|
| Similarly, with the back button, how does Seam know when it builds the component tree that these components belong to a NEW conversation and not an existing one? After all, if you click back and resubmit (with the same cid in the browser bar), wouldn't it "overwrite" the current conversation?
There are many things about conversations that I'm not able to understand, from the above questions. Could you provide some insight about those issues?
Another question I have is whether persist() is necessary in all cases? I have a conversation with a @Begin and @End. A view uses an entity as a backing bean; the action method on an SFSB and EXTENDED persistence context manipulates that entity's properties; then the method returns a String outcome.
No persist() method, but to my amazement it has persisted in the database after @End completes? Do my eyes deceive me!?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994904#3994904
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994904
19 years, 4 months
[EJB/JBoss] - Re: Unit Testing Practices
by tarantula
Hey,
I've been exploring the embedded EJB3 container that ships with Seam 1.1 GA for the past few days (since it was released) and it looks promising.
I managed to migrate a sizable domain model from pure Hibernate to the Java persistence API using EJB3 entities.
My very simple TestNG test case runs fine (after much wrangling about in my database) but what's really throwing me for a loop are the loopy error messages in the log files.
Anybody else seen this type of stuff?
01:44:27,250 WARN org.jboss.kernel.plugins.deployment.xml.BeanSchemaBinding:227 - You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0'
Or this?
01:44:32,968 FATAL org.hibernate.ejb.Ejb3Configuration:124 - default.persistence.propertiesO-:-Ofalse
01:44:32,968 FATAL org.hibernate.ejb.Ejb3Configuration:124 - ejb3-interceptors-aop.xmlO-:-Ofalse
01:44:33,062 FATAL org.hibernate.ejb.Ejb3Configuration:124 - embedded-jboss-beans.xmlO-:-Ofalse
01:44:33,062 FATAL org.hibernate.ejb.Ejb3Configuration:124 - import.sqlO-:-Ofalse
01:44:33,062 FATAL org.hibernate.ejb.Ejb3Configuration:124 - jboss-jms-beans.xmlO-:-Ofalse
01:44:33,062 FATAL org.hibernate.ejb.Ejb3Configuration:124 - jndi.propertiesO-:-Ofalse
01:44:33,062 FATAL org.hibernate.ejb.Ejb3Configuration:124 - log4j.dtdO-:-Ofalse
01:44:33,062 FATAL org.hibernate.ejb.Ejb3Configuration:124 - log4j.xmlO-:-Ofalse
01:44:33,062 FATAL org.hibernate.ejb.Ejb3Configuration:124 - login-config.xmlO-:-Ofalse
01:44:33,062 FATAL org.hibernate.ejb.Ejb3Configuration:124 - META-INF/application.xmlO-:-Ofalse
01:44:33,062 FATAL org.hibernate.ejb.Ejb3Configuration:124 - META-INF/ejb-jar.xmlO-:-Ofalse
I saw some posts indicating this one had been fixed in CSV/SVN but I'm not quite sure how to put together a custom out-of-container EJB3 testing environment from odd JARs.
Anyone else have some luck with this?
Should I just ignore these messages and get on with the work?
It would be a shame to turn off logging on the org.hibernate.ejb.Ejb3Configuration just to turn off this perplexing FATAL message.
What does it mean?
I much prefer actually dealing with issues in my logs than simply ignoring them! :)
Cheers,
tarantula
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994901#3994901
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994901
19 years, 4 months