[JBoss Seam] - FacesMessages are enqueued and not shown
by georges.goebel
Hi,
When I have a inputText filed with the attribute required="true" an the user does not enter any data the validation is done but the facesmessage is not show on the page. I have tried with <h:messages/>, <h:message .../>, <s:messages/>, ... but I only see the correct message in the log of JBoss
I have also tries s:decorate, s:validate, ... but I had no luck
The cart bean is a stateful bean
| @Stateful(name = "Cart")
| @Remote(Cart.class)
| @Local(Cart.class)
| @Scope(ScopeType.CONVERSATION)
| @Name("cart")
| //(a)Interceptors(SeamInterceptor.class)
| public class CartImpl implements Cart{
| ...
| }
|
I also tried with session scope but no luck either
Is that a bug in Seam or how do I have to configure Seam to show these messages ?
| [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
|
My code is :
| <h:form id="addCartF" enctype="multipart/form-data">
| <h:inputText id="i_characteristique" value="#{cart.caracteristique}" required="true"/>
| <h:commandButton value="Add to cart" action="#{cart.addToCart}" styleClass="button"/>
| <h:messages/>
| </h:form>
|
My pages.xml is :
| <page view-id="/addCart.xhtml" login-required="true">
| <begin-conversation join="true"/>
| <navigation from-action="#{cart.addToCart}">
| <rule if-outcome="true">
| <redirect view-id="/main2.seam"/>
| </rule>
| </navigation>
| </page>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107113#4107113
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107113
18 years, 8 months
[Security & JAAS/JBoss] - Problem with SSL configuration
by xsedlacp
Hi,
I tried configuration explained in JBoss documentation (http://docs.jboss.org/jbossas/admindevel326/html/ch8.chapter.html#d0e18946).
I defined securityDomain
<mbean code="org.jboss.security.plugins.JaasSecurityDomain"
| name="jboss.security:service=JaasSecurityDomain,domain=RMI+SSL">
| <constructor><arg type="java.lang.String" value="RMI+SSL"/></constructor>
| <attribute name="KeyStoreURL">jboss.keystore</attribute>
| <attribute name="KeyStorePass">rmi+ssl</attribute>
| </mbean>
and I defined invoker
<mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker" name="jboss:service=invoker,socketType=SSL,type=jrmp">
| <attribute name="RMIObjectPort">14445</attribute>
| <attribute name="RMIClientSocketFactory">org.jboss.security.ssl.RMISSLClientSocketFactory</attribute>
| <attribute name="RMIServerSocketFactory">org.jboss.security.ssl.RMISSLServerSocketFactory</attribute>
| <attribute name="SecurityDomain">java:/jaas/RMI+SSL</attribute>
| <depends>jboss.security:service=JaasSecurityDomain,domain=RMI+SSL</depends>
| </mbean>
But this invoker never starts
13:07:17,453 WARN [ServiceController] Problem starting service jboss:service=invoker,socketType=SSL,type=jrmp
javax.naming.NameNotFoundException: TransactionPropagationContextExporter not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:527)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:535)
at org.jnp.server.NamingServer.getObject(NamingServer.java:541)
at org.jnp.server.NamingServer.lookup(NamingServer.java:294)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:621)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:583)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.jboss.invocation.jrmp.server.JRMPInvoker.startService(JRMPInvoker.java:303)
at ...
Can somenone help me, how to configure using SSL with JBoss. I am using JBoss version 3.2.8SP1.
any help would be appriciate ...
Thanks
Peter
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107112#4107112
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107112
18 years, 8 months
[JBoss Seam] - Re: Ma generic do even more version of EntityQuery : MyEntit
by koenhandekyn
this new version below adds methods that generate the default search constraints given a list of fields.
just override getFields and get the constraints for free using getSearchFieldRestrictions
kind regards
koen
package up.seam;
|
| import java.lang.annotation.Annotation;
| import java.lang.reflect.ParameterizedType;
| import java.lang.reflect.Type;
| import java.util.Arrays;
| import java.util.LinkedList;
| import java.util.List;
|
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.framework.EntityQuery;
|
| import up.util.LangUtil;
|
| public class MyEntityQuery<T> extends EntityQuery {
|
| // you cannot initialize (results in bug for seam 2.0.0.GA)
| protected T example = null;
|
| public T getExample() {
| if (example == null) {
| example = createInstance();
| }
| return example;
| }
|
| public void setExample(final T example) {
| this.example = example;
| }
|
| protected Boolean reverse = false;
|
| public Boolean getReverse() {
| return reverse;
| }
|
| public void setReverse(Boolean reverse) {
| this.reverse = reverse;
| }
|
| @Override
| public Integer getMaxResults() {
| return 25;
| }
|
| @Override
| public void setOrder(final String order) {
|
| System.out.println("REQUEST TO SORT: " + order + ", was " + super.getOrder());
| if (LangUtil.isNotEmpty(order)) {
| if (order.equals(this.getOrder())) {
| this.reverse = !this.reverse;
| } else {
| this.reverse = false;
| }
| super.setOrder(order);
| }
| }
|
| @Override
| public String getOrder() {
| if (reverse)
| return super.getOrder() + " desc";
| else
| return super.getOrder();
| }
|
| private static final long serialVersionUID = 1L;
|
| @Override
| public String getEjbql() {
|
| final String entityClassName = getEntityClass().getSimpleName();
| // System.out.println(entityClassName);
|
| final String ejbql = "from " + entityClassName + " " + entityClassName.toLowerCase();
| // System.out.println(ejbql);
| return ejbql;
| }
|
| public T createInstance() {
|
| if (getEntityClass() != null) {
| try {
| return getEntityClass().newInstance();
| } catch (Exception e) {
| throw new RuntimeException(e);
| }
| } else {
| return null;
| }
| }
|
| protected Class<T> entityClass;
|
| public Class<T> getEntityClass() {
| if (entityClass == null) {
| Type type = getClass().getGenericSuperclass();
| System.out.println("found class " + getClass());
| System.out.println("found type " + type);
| if (type instanceof ParameterizedType) {
| ParameterizedType paramType = (ParameterizedType) type;
| entityClass = (Class<T>) paramType.getActualTypeArguments()[0];
| } else {
| throw new IllegalArgumentException("Could not guess entity class by reflection");
| }
| }
| return entityClass;
| }
|
| public List<String> getSearchFields() {
| return null;
| }
|
| @Override
| public List<String> getRestrictions() {
|
| if (getSearchFields() == null)
| return null;
|
| final List<String> searchFieldRestrictions;
| searchFieldRestrictions = new LinkedList<String>();
|
| final String componentName;
| componentName = getComponentName();
|
| for (final String field : getSearchFields()) {
| searchFieldRestrictions.add("account." + field + " LIKE concat(#{" + componentName + ".example." + field + "},'%')");
| }
|
| return searchFieldRestrictions;
| }
|
| public String getComponentName() {
|
| final Annotation nameAnnotation = this.getClass().getAnnotation(Name.class);
| Name name = (Name) nameAnnotation;
| return name.value();
|
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107109#4107109
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107109
18 years, 8 months
[Persistence, JBoss/CMP, Hibernate, Database] - why does flushing occur though transaction is rollbacked?
by kannattaa
is it normal or bug, that flush() always occurs, even if the transaction rollbacks?
i have seam-managed hibernate session configured according to seam documentation http://docs.jboss.com/seam/2.0.0.GA/reference/en/html/persistence.html#d0...
<property name="transaction.flush_before_completion">true</property>
| <property name="connection.release_mode">after_statement</property>
| <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
| <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
|
and a method
@Begin
| @End
| public void save(Person person){
| currentSession.save(person);
| currentSession.createSQLQuery("{call initializePerson(:person_id)}")
| .setLong("person_id", person.getId())
| .executeUpdate();
| currentSession.refresh(person);
| if (!person.isInitialized()) throw new RuntimeException("Failed to initialize person");
| }
|
as a result of the method's execution:
if person is uninitialized , it will be a rollbacked transaction due to the RuntimeException. (Because it is a "System Exception" and they always cause a transaction rollback http://docs.jboss.com/seam/2.0.0.GA/reference/en/html/events.html#d0e4391 )
As expected the stored procedure "initializePerson" will be rollbacked.
But an insert of the method "currentSession.save(person)" will be executed. Because the property transaction.flush_before_completion's value is true.
anonymous wrote : if hibernate.transaction.flush_before_completion is enabled, the session will be automatically flushed during the before completion phase of the transaction.(http://www.hibernate.org/hib_docs/reference/en/html/session-... )
|
Thus we have 'partial' committed transaction. Imho, it isn't normal behaviour, when an exception occurs.
Any suggestions to cause full rollbacking ?
(without disabling "flush_before_completion" property or enabling FlushModeType.MANUAL, that seems the same))
Quote:
anonymous wrote : Note that Seam does not flush the session, so you should always enable hibernate.transaction.flush_before_completion to ensure that the session is automatically flushed before the JTA transaction commits.http://docs.jboss.com/seam/2.0.0.GA/reference/en/html_single/#d0e...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107106#4107106
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107106
18 years, 8 months
[JBoss jBPM] - Re: jBPM BPEL & Eclipse Process Designer interworking
by federicok
Muchas Gracias! / Thank you very much!
I made a merge between these tutorial and the hello example and I could deploy my little process.
A made an asnyncronous process with the bonjour example, and the changes I did in the sources to deploy was:
Delete the TYPE DEFINITION in the wsdl
Change the PARTNER LINK TYPE from
| <plnk:partnerLinkType name="bonjour">
| <plnk:role name="bonjourProvider" portType="tns:bonjour"/>
| <plnk:role name="bonjourRequester" portType="tns:bonjourCallback"/>
| </plnk:partnerLinkType>
|
to
| <plnk:partnerLinkType name="bonjour">
| <plnk:role name="bonjourProvider">
| <plnk:portType name="tns:bonjour"/>
| </plnk:role>
| <plnk:role name="bonjourRequester">
| <plnk:portType name="tns:bonjourCallback"/>
| </plnk:role>
| </plnk:partnerLinkType>
| anonymous wrote :
| | Delete the wsdl import in the bpel file
| |
| | And after that the ant deploy-definition responds me with a 200 (OK)! :)
| |
| | Thank s again, agus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107105#4107105
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107105
18 years, 8 months