[JBoss Seam] - Re: Hibernate Validation / Page Scope --> allways new entity
by bfo81
"mrwhite" wrote : But why do i need a conversation for that. it works fine when no validation fault appears.That's the point. If there's no validation fault, everything is ok. BUT: If there is one, then the page needs to be reloaded. Hence the state of the editor page must be "reloaded", too. And a good way to do this is to keep the state in a Conversation.
anonymous wrote : And where should i put the @Begin annotation? Which method do you call before the edit page is displayed?
To make sure we're talking about the same: I usually have a list page with a list bean, and an edit page with an edit bean. And the edit bean contains the following methods:
@Begin(nested=true)
public String create() {...} //To create a new entry
@Begin(nested=true)
public String edit() {...} //To edit an existing entry
@End
public String cancel() {...} //If the cancel button on the edit page is pressed
@End
public String save() {...} //If the save button is pressed (and validation was successfull)
@End
public String delete() {...} //If the delete button is pressed
That's the "classic" pattern. Maybe you do it another way, so I wanted to make clear what I'm talking about ;).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960333#3960333
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960333
19 years, 9 months
[EJB 3.0] - Eclipse RCP connect to JBoss EJB 3.0
by jensmcramer
Hi all!
I know that this forum is not really the right place for my question because my problem is more an eclipse / RCP / classloader problem, but I hope that someone here can point me to the right direction. My searches on google gave me some results but none of them bring me a working solution.
I'm a beginner with EJB and Eclipse RCP. Thanks to EJB 3.0 I got managed to deploy a set of Entity-Beans and a Stateless Session Bean to my JBoss. I've written a small test-client with that I can succsessfully connect to my session bean which then creates some entities.
The project I'm now working on is an Eclipse Rich Client Project which should use the EJBs discribed above. After days of testing there are only problems...
So far I've tried the following:
1. "The novice solution"
I've created 2 Plugins, one containing the RCP-application and the other one contains the jboss-all.jar. The app-plugin depends on the jboss-plugin and has the same ejb-jar as deployed to JBoss on it's build-path. In the Application.java I try to run this code (which worked in my standalone test-client):
| Properties properties = new Properties();
| properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
| properties.put("java.naming.provider.url","localhost:1099");
|
|
| Context context;
| try {
| context = new InitialContext(properties);
| TestOrderRemote beanRemote = (TestOrderRemote) context.lookup(TestOrderBean.RemoteJNDIName);
| beanRemote.createTest();
| } catch.....
|
This brings this error:
java.lang.NoClassDefFoundError: de/gastroseller/manager/sbeans/TestOrderRemote
| at java.lang.Class.getDeclaredConstructors0(Native Method)
| at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
| ...
As far as I can see the jboss-plugin is unable to find my domain-classes. OK, searching google brought me to the next version:
2. "Buddy ClassLoading"
As stated on http://www.hibernate.org/311.html, I appended to line "Eclipse-BuddyPolicy: registered" to the MANIFEST.MF of the jboss-plugin and "Eclipse-RegisterBuddy: org.jboss.smallclient" to my app-plugin. Same error:
java.lang.NoClassDefFoundError: de/gastroseller/manager/sbeans/TestOrderRemote
| at java.lang.Class.getDeclaredConstructors0(Native Method)
| at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
| ...
3. "setContextClassLoader"
Somewhere on the web someone mentioned to surround the "new InitialContext" with something like
Thread.currentThread().setContextClassLoader(
| this.getClass().getClassLoader());
Some error as above.
:(
Please, can someone point me to the right direction? Or maybe publish an example / working plugin?
Thanks in advance for any help!
Regards,
Jens
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960332#3960332
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960332
19 years, 9 months