[JBossCache] - Re: java.lang.RuntimeException: java.lang.NoSuchMethodExcept
by jagadeeshvn
I am not using jboss-aspect-library-jdk50.jar in my project. However I understand that the problem is with AOP and so I checked out the latest AOP source from SVN and build it locally. Now I am using that jar and I found that 3 additional interceptions are defined somewhere in the unix deployment and the details are as below.
1. public abstract void org.jboss.aspects.patterns.observable.Subject.addObserver(org.jboss.aspects.patterns.observable.Observer)
2. public abstract void org.jboss.aspects.patterns.observable.Subject.removeObserver(org.jboss.aspects.patterns.observable.Observer)
3. public abstract void org.jboss.aspects.patterns.observable.Subject.notifyObservers()
The framework is unable to find the method definition and it throws an excpection to populateMixinMethods where it propogates to attachClass method in org.jboss.aop.ClassAdvisor and it is not caught anywhere.
However I understand that the solution is to remove the additional interceptions as it is not available in Windows deployment and still it works fine. I am doing more research and will get back with more details and the exact problem.
Thanks
Jugs
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995835#3995835
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995835
19 years, 4 months
[JBoss Seam] - session handling of users
by ask4saif
Greetings to all:
I am making an application with jboss-seam, I have a problem with session handling of users.
I am using a stateful session bean which is authenticating users from db. this bean has two fields in it username and password. on authentication I destroy the password and use username for the session tracking on JSF pages. In jsf pages i use JSTL tags to verify the user if he is logged in or not.
Now my problems are:
how can i restrict users from unauthorized access of pages.
how can i redirect users to login page if their username does not exist in the session.
how can i check if the form is submitted illeaglly.
And in the last, am i following the right approach or there is a better way to do this in seam.
i congrat gavin king on his great work and thank you all in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995834#3995834
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995834
19 years, 4 months
[JBoss Seam] - Re: Change Locale sequence
by rengar
-Page:
| <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:a="https://ajax4jsf.dev.java.net/ajax"
| xmlns:ice="http://www.icesoft.com/icefaces/component">
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
| <title>Reservas</title>
| <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
| <link href="stylesheet/#{inicio.asociacion.hojaEstilos}" rel="stylesheet" type="text/css" />
| <script language='javascript' src='js/calendario/popcalendar.js'></script>
| </head>
|
| <body>
|
| <table border="0">
| <tr>
| <td align="center"><h:graphicImage id="banner" url="img/banners/#{inicio.asociacion.banner}" /></td>
| </tr>
| <tr>
| <td class="texto">
| <h:outputText value="#{messages['inicio.page.desc1']}" escape="false"/>
| </td>
| </tr>
| <tr class="headerBarClara" align="center">
| <td class = "textoBlanco" align="center">
| <h:outputText value="#{messages['inicio.page.titulo']}" escape="false"/>
| <h:form id="selectLanguage">
| <h:selectOneMenu value="#{localeSelector.language}">
| <f:selectItems value="#{localeSelector.supportedLocales}"/>
| </h:selectOneMenu>
| <h:commandButton action="#{localeSelector.select}" value="#{messages['ChangeLanguage']}"/>
| </h:form>
| </td>
| </tr>
| <tr>
| <td align="center" class="texto">
| <h:messages globalOnly="true" styleClass="message"/>
|
| <h:form id="inicio">
| <div>
| <s:validateAll>
| <div>
| <s:decorate>
| <h:outputLabel for="diaLlegada">#{messages['inicio.page.param.diaLlegada']}</h:outputLabel>
| <h:inputText id="diaLlegada" value="#{inicio.diaLlegada}" required="true">
| <s:convertDateTime pattern="dd/MM/yyyy"/>
| <a:support event="onblur" reRender="checkinDateErrors"/>
| </h:inputText>
| <img src="img/dtpick.gif" style="margin-left:5px" onClick="javascript:popUpCalendar(this, document.forms['inicio'].elements['inicio:diaLlegada'], 'dd/mm/yyyy')"/>
| <br/>
| <a:outputPanel id="checkinDateErrors"><s:message/></a:outputPanel>
| <!--
| <s:decorate>
| <ice:selectInputDate id="diaLlegada2" value="#{inicio.diaLlegada}" renderAsPopup="true" partialSubmit="true"/>
| <br/>
| <s:message/>
| </s:decorate>
| -->
| </s:decorate>
| </div>
|
| <div>
| <s:decorate>
| <h:outputLabel for="diaSalida">#{messages['inicio.page.param.diaSalida']}</h:outputLabel>
| <h:inputText id="diaSalida" value="#{inicio.diaSalida}" required="true">
| <s:convertDateTime pattern="dd/MM/yyyy"/>
| <a:support event="onblur" reRender="checkoutDateErrors"/>
| </h:inputText>
| <img src="img/dtpick.gif" style="margin-left:5px" onClick="javascript:popUpCalendar(this, document.forms['inicio'].elements['inicio:diaSalida'], 'dd/mm/yyyy')"/>
| <br/>
| <a:outputPanel id="checkoutDateErrors"><s:message/></a:outputPanel>
| </s:decorate>
| </div>
|
| </s:validateAll>
| </div>
| <div class="actionButtons">
| <h:commandButton id="inicio" value="#{messages['inicio.page.buscar.button']}"
| action="#{inicio.inicio}"/>
| <h:commandButton id="buscarAvanzado" value="#{messages['inicio.page.buscarAvanzado.button']}"
| action="#{inicio.listado}"/>
| <h:commandButton id="borrar" value="#{messages['inicio.page.borrar.button']}"
| action="#{inicio.inicio}"/>
| <s:link id="listado" value="#{messages['inicio.page.buscarAvanzado.button']}"
| action="#{inicio.listado}"/>
| </div>
| </h:form>
|
| </td>
| </tr>
| <tr class = "headerBarClara">
| <td height="16"></td>
| </tr>
| <tr>
| <td align="center" class="texto">
| <h:outputText value="#{inicio.asociacion.explicacion}" escape="false"/>
| </td>
| </tr>
| </table>
|
| </body>
| </html>
|
|
-Action:
|
| package com.minalink.reservas;
|
| import java.util.ArrayList;
| import java.util.List;
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
| import org.hibernate.validator.Length;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.annotations.Logger;
| import org.jboss.seam.framework.EntityQuery;
| .
| .
| .
| import org.jboss.seam.log.Log;
| import org.jboss.seam.core.FacesMessages;
| import org.jboss.seam.core.Locale;
| import org.jboss.seam.core.LocaleSelector;
|
| @Stateful
| @Name("inicio")
| public class InicioBean implements Inicio {
|
| @Logger private Log log;
|
| @In
| FacesMessages facesMessages;
|
| @PersistenceContext
| private EntityManager em;
|
| AsociacionesLangHome asociacionesLangHome;
|
| private String diaLlegada;
|
| private String diaSalida;
|
| private int asociacionesId;
|
| private AsociacionesLang asociacion;
|
|
| //seam-gen method
| public String inicio() {
|
| log.info("inicio.inicio() action called with: #0 #1", diaLlegada, diaSalida);
| facesMessages.add( "inicio #0, #1", (Object) diaLlegada, (Object) diaSalida );
|
| return "success";
| }
|
| //add additional action methods
|
| @Length(max=10)
| public String getDiaLlegada() {
| return diaLlegada;
| }
|
| public void setDiaLlegada(String diaLlegada) {
| log.info("diaLlegada: #0 ", diaLlegada);
| this.diaLlegada = diaLlegada;
| }
|
| @Length(max=10)
| public String getDiaSalida() {
| return diaSalida;
| }
|
| public void setDiaSalida(String diaSalida) {
| log.info("diaSalida: #0 ", diaSalida);
| this.diaSalida = diaSalida;
| }
|
| public void setAsociacionesId(int asociacionesId) {
| this.asociacionesId = asociacionesId;
|
| String language = Locale.instance().getLanguage();
| System.out.println( "language : "+ language );
|
| asociacionesLangHome = new AsociacionesLangHome();
|
| AsociacionesLangId id = new AsociacionesLangId(asociacionesId, language);
| asociacionesLangHome.setAsociacionesLangId(id);
|
| try{
| this.setAsociacion(asociacionesLangHome.getInstance());
| }catch(Exception e){
| System.out.println( "asociacionesId: "+ asociacionesId );
| System.out.println( "language error: "+ language );
|
| LocaleSelector.instance().selectLanguage(ConfiguracionCte.DEFAULT_LANG);
| language = Locale.instance().getLanguage();
| System.out.println( "language 2 : "+ language );
|
| id = new AsociacionesLangId(asociacionesId, language);
| asociacionesLangHome.setAsociacionesLangId(id);
|
| this.setAsociacion(asociacionesLangHome.getInstance());
| }
| }
|
| public int getAsociacionesId() {
| return asociacionesId;
| }
|
| @Destroy @Remove
| public void destroy() {}
|
| public AsociacionesLang getAsociacion() {
| return asociacion;
| }
|
| public void setAsociacion(AsociacionesLang asociacion) {
| this.asociacion = asociacion;
| }
|
| }
|
When I change language the page is reload --> method setAsociacionesId is called.
But catch previous language value to change language.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995832#3995832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995832
19 years, 4 months
[JBoss Eclipse IDE (users)] - Re: How contribute to Freemarker plugin and add my Plugin ec
by max.andersen@jboss.com
"azerr" wrote : anonymous wrote : Yes, I received it; but please send it as a *patch*.
| That's done.
|
I saw JBIDE-428, is that what you refer to ? It's not a patch it is the complete project...
anonymous wrote : We don't have those implemented (except "bean), but nothing in the tools prevents it.
Is it easy to change default architecture (bean) with another architecture? With Akrogen you can create your own Project (MyJ2EE project) and add it component, wizard, for your architecture.
What do you mean "another architecture" ? Have you even tried to use the tools and looked at the code to see how it works ?
anonymous wrote :
| anonymous wrote : I don't get your "bulk" argument here ? Hibernate tools defaults to generate for all entities and components but that can of course be controlled by the exporter if you want to.....and adding a "generate only *this* part" is of course possilbe....
|
| My explanation was not enough good. Imagine you want create finder DAO
| with specific criteria (findByCountryId). With Akrogen you can create XML component which generate this method. For this, you must create a template (XSL, Freemarker), and create a XML component MyComponent (parameters IN criteria => XML => display list of your hbm property into the list checkable).
|
| When you select the hbm (menu AKROGE->Components->MyComponent) , the XML component will display a Wizard page, with all property of your hbm. you check Id property and click finish, your DAO findByCountryId will be generated.
|
Maybe it is your vocabulary I just don't get; e.g. what is an "XML componeent" ? And if I need to write XML + a template what is saved here ?
I still think your work about "wizards" for the code generation is something we can/could use.
anonymous wrote :
| anonymous wrote : tip: If you want users to understand Akrogen features you should try and document it with some better examples, the current page is very sparse on information.
|
| I agree with you my documentation is very bad. I have a lot of development for Akrogen (ex : I work to export Freemarker Plugin context .freemarker-ide.xml and build auomaticly Akrogen XML component).
| I'm searching people to help me to develop Akrogen and write documentation, but it's very difficult.
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995831#3995831
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995831
19 years, 4 months