[JBoss Portal] - Re: Best way to learn
by danny_hon
We are also looking at what is the best framework for creating portlets. We find some issues using Struts. If we use request.setAttribute(...) in an Action class, the variable is not visible in the JSP. The work around is to use request.getSession.setAttribute(...). This is not very elegant, and we have to remove the sessiono attribute later. In addition, the validation from a form is not working. Even though it does not accept the invalid values (which is good), it does not show the error from the JSP <html:errors /> tag. It seems like these 2 problems are related to the fact that variable set by request.setAttribute() is not visible by the forwarded JSP.
We are using JBP 2.2.x + Struts-Bridge 1.0. Does anyone have the same problem? Any help is appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965590#3965590
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965590
19 years, 8 months
[JBoss AOP] - deploying instrumented code, not working
by bdruth
Good evening.
I am using Aspect annotations (not XML configuration) to do method interception. I have an annotation & an Aspect, tested, working in my testbed. Now, I need to integrate this new Aspect into our project code, using the new annotation.
The annotation is applied to a method in our business controller (at the moment, just one). This file is compiled, then instrumented via aopc, all via Ant. In a separate project, my JUnit tests will call into this class. The class is further instrumented by EMMA, for code coverage. EMMA complains that something in this controller class doesn't have debug line info, so it seems like it comes across the instrumentation by aopc.
Within Ant, runs our test cases ... EMMA instrumentation data is collected, but the AOP code is not called, from what I can tell. I've added two jvmargs to the task ...
<jvmarg value="-Djboss.aop.class.path=aspects.jar" />
| <jvmarg value="-Djboss.aop.verbose=true" />
|
And I get no output from JBoss AOP. What's going on here? Am I missing something?
Thanks!
Brice Ruth
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965589#3965589
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965589
19 years, 8 months
[JBoss Seam] - Internationalization
by smies
I am pretty new to I18N in Java. The only place where I ever use it is in the WebObjects website at my work. So I have a question about it.
In WebObjects I can create multiple i18n files of the same language. In WebObjects it works a little different in that you define a complete directory for a certain language. Using the file name (without extension) as a sort of category name I can put my error messages in the error.plist file (.plist is the extionsion to use in WebObjects), my form label names in formLabel.plist and so on.
I read this in the seam documentation:
anonymous wrote : If you define your labels in this special resource bundle, you'll be able to use them without having to type <f:loadBundle ... /> on every page.
What I understand from this is that I can define only one internationalization file if I want to use the power of Seam. Am I right or am I missing something.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965588#3965588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965588
19 years, 8 months
[JBoss jBPM] - Re: Jbpm classes deployed inside a hibernate HAR
by ulfreich
Thanks for your reply!
So what you mean is, I must create the SessionFactory with my own persistent classes (without including jBPM's) and then simply pass that SessionFactory to jBPM as in JbpmContext.setSessionFactory(SessionFactory), and that's it?
In the manual the only thing that says about including the user classes is:
anonymous wrote : The easiest way to integrate your persistent classes with the jBPM persistent classes is by creating one central hibernate.cfg.xml. You can take the jBPM src/config.files/hibernate.cfg.xml as a starting point and add references to your own hibernate mapping files in there.
Manually typing the classes sure could be the easiest way, but doesn't seem so practical at all given that, to create a SessionFactory manually, I can add the full jBPM jars to the configuration doing something like:
Configuration configuration = new Configuration();
| configuration.addJar(myMappingsJar); // File object
| configuration.addJar(jbpmJarFile);
| configuration.addJar(jbpmIdentityJarFile);
| SessionFactory hibSessionFactory = configuration.buildSessionFactory();
| JbpmSessionFactory sessionFactory = new JbpmSessionFactory(configuration, hibSessionFactory);
I'm looking for a way to do this using jBoss' Hibernate Archive (HAR). Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965584#3965584
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965584
19 years, 8 months
[JNDI/Naming/Network] - JBoss 4.0.4GA HA-JNDI not working with EJB3
by jamestang
I have a very simple SLSB written in EJB3. The packaged EAR file is copied to "all/deploy" directory in two JBoss 4.0.4GA instances on two machines, n1 and n2. These two JBoss instances form a cluster within one subnet with same out-of-box configurations. The SLSB has annotation @Clustered. When looking up the SLSB, according to the JBoss clustering manual, the application client uses HA-JNDI: props.put(Context.PROVIDER_URL, "n1:1100,n2:1100")
The app client worked fine.
To simulate the failover, I undeployed myapp.ear from n1 by deleting it from "all/deploy" on n1 machine. At this time, both JBoss instances are running, but only n2 has my app deployed. Now executing the same app client, it hangs for about 30 seconds, then prints out "JNDI lookup fail" error.
If I use: props.put(Context.PROVIDER_URL, "n2:1100")
the app client works.
If I stopped n1 instance, let the n2 instance running. The app client works with props.put(Context.PROVIDER_URL, "n1:1100,n2:1100")
Before and after undeploying myapp.ear from n1, I looked at JMX console of the cluster. Clicked on the jboss:service=DefaultPartition MBean. A list of IP addresses for the cluster members (n1 and n2) is shown in the CurrentView field. So I think JGroup is working fine here.
Are there any other configurations need to be changed?
Thanks,
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965583#3965583
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965583
19 years, 8 months