Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Daniel Dominik Holúbek
Okay, but I still don't understand the reason of doing this stuff :)I've already created the Application bean, and implemented ApplicationContextAware. Then the setApplicationContext method gets called, so I created ApplictionContext variable in that class and set it it that method. But if I try

Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Daniel Dominik Holúbek
I appreciate your help, of course :)You know, I'm trying to create a web app consisting of independent modules. Then if I change something in one module, I don't have to redeploy whole application. This can be achieved of course, the only problem is this thing we are currently speaking of. :) But

Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Daniel Stoch
Hi, I think your problem is that in Wicket the whole Spring injection mechanism is prepared for applications where there is only one ApplicationContext (AC). This AC is hold in the Wicket application instance. So when you are trying to use @SpringBean annotation Wicket tries to inject a bean from

Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Daniel Dominik Holúbek
Yes, that's the way it's meant to work :) On Tue, Jun 23, 2009 at 3:25 PM, James Carman jcar...@carmanconsulting.comwrote: On Tue, Jun 23, 2009 at 8:26 AM, Daniel Dominik Holúbek dankodo...@gmail.com wrote: I appreciate your help, of course :)You know, I'm trying to create a web app

Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread James Carman
How many modules do you have? Do you really need to be able to do this with your live production server? I'm just trying to get an idea behind the decision behind going with this sort of an architecture. Perhaps we can offer up an alternative that would work with the existing Wicket stuff so

Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Igor Vaynberg
isnt a big point of osgi to manage cross-bundle-dependencies? so if you inject panel A using panel A's context how does panel A ever see beans that are defined in module B? eg if panel A needs a sessionfactory which is defined in module B? -igor On Tue, Jun 23, 2009 at 5:36 AM, Daniel

Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Daniel Stoch
Ok, at least two scenarios are possible: 1. You have a module A with PanelA and you want to inject someDAO bean, which is defined inside module A (in the same module where class PanelA is defined). Then you can use classic @SpringBean annotation, as I wrote in my previous post. 2. You want to use

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
But as far as I understand this, Spring DM is built upon the idea that I can't build ApplicationContext, as it is built by Spring DM Extender. Am I right? On Mon, Jun 22, 2009 at 12:37 AM, James Carman jcar...@carmanconsulting.com wrote: Try using the other SpringComponentInjector constructor

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread James Carman
Can you have your Application object created as a Spring bean and make it context aware and let the container inject the context into it? On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik Holúbekdankodo...@gmail.com wrote: But as far as I understand this, Spring DM is built upon the idea that I

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
Well, I don't know :)I On Mon, Jun 22, 2009 at 12:32 PM, James Carman jcar...@carmanconsulting.com wrote: Can you have your Application object created as a Spring bean and make it context aware and let the container inject the context into it? On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
I don't know :)I can create a Spring bean from Application object, but I don't know what does it mean - make it context aware. That's why I am asking whether somebody has already tried this... On Mon, Jun 22, 2009 at 5:09 PM, Daniel Dominik Holúbek dankodo...@gmail.com wrote: Well, I don't

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread James Carman
On Mon, Jun 22, 2009 at 11:11 AM, Daniel Dominik Holúbekdankodo...@gmail.com wrote: I don't know :)I can create a Spring bean from Application object, but I don't know what does it mean - make it context aware. That's why I am asking whether somebody has already tried this... Have your

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread James Carman
That's what I'd try, perhaps. How are you starting this application? Only in eclipse? On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik Holúbekdankodo...@gmail.com wrote: Well, I don't know :)I On Mon, Jun 22, 2009 at 12:32 PM, James Carman jcar...@carmanconsulting.com wrote: Can you have

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
For now, only in eclipse. But when it goes to production (or further testing) it will run in equinox bridge. On Mon, Jun 22, 2009 at 5:14 PM, James Carman jcar...@carmanconsulting.comwrote: That's what I'd try, perhaps. How are you starting this application? Only in eclipse? On Mon, Jun 22,

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
I tried implementing the ApplicationContextAware interface, it looked like a good idea, but the setApplicationContext method is never called. On Mon, Jun 22, 2009 at 8:25 PM, Daniel Dominik Holúbek dankodo...@gmail.com wrote: For now, only in eclipse. But when it goes to production (or further

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Igor Vaynberg
you have to create wicketapplication instance as a spring bean in order for setapplicationcontext to be called. -igor On Mon, Jun 22, 2009 at 12:47 PM, Daniel Dominik Holúbekdankodo...@gmail.com wrote: I tried implementing the ApplicationContextAware interface, it looked like a good idea, but

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread James Carman
Sorry, that's IWebApplicationFactory, not IWicketApplicationFactory. Long day. On Mon, Jun 22, 2009 at 5:05 PM, James Carmanjcar...@carmanconsulting.com wrote: You will probably need to make your application class a singleton (with a getInstance() method and stuff) and specify that in the

Re: Wicket + Spring DM + Hibernate

2009-06-21 Thread Daniel Dominik Holúbek
Hello everyone :)So, I solved the Spring DM problems successfully... but there is still one problem left, and this time I am absolutely sure that it's a Wicket related problem :) I want to inject my userDao bean into Panel class. To do that, I nead to create a bean from that Panel class - like

Re: Wicket + Spring DM + Hibernate

2009-06-21 Thread James Carman
You can't use @SpringBean? On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik Holúbekdankodo...@gmail.com wrote: Hello everyone :)So, I solved the Spring DM problems successfully... but there is still one problem left, and this time I am absolutely sure that it's a Wicket related problem :) I

Re: Wicket + Spring DM + Hibernate

2009-06-21 Thread James Carman
Try using the other SpringComponentInjector constructor (the one that takes an ApplicationContext object).  Construct your ApplicationContext however you want. On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek dankodo...@gmail.com wrote: Well, no.I'll explain: It's an OSGi app running in

Wicket + Spring DM + Hibernate

2009-06-15 Thread Daniel Dominik Holúbek
Hello,has anybody here successfully used Spring DM with Hibernate (the OSGi way) in Wicket? I am totally hopeless about this... The goal is to create modular app with this features: - every module (bundle) has its own applicationContext and DAO classes. - i.e. if I have a module which loads

Re: Wicket + Spring DM + Hibernate

2009-06-15 Thread Igor Vaynberg
isnt this a question for the spring dmserver forum? -igor On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik Holúbekdankodo...@gmail.com wrote: Hello,has anybody here successfully used Spring DM with Hibernate (the OSGi way) in Wicket? I am totally hopeless about this... The goal is to create

Re: Wicket + Spring DM + Hibernate

2009-06-15 Thread Daniel Dominik Holúbek
Well, may be, but won't they send me back to this mailinglist? :)To be honest, I have only a little problem with Spring DM itself (there are couple of tutorials out there), I was only curious about whether somebody has successfully tried this. For example, now it seems that the dependency is not

Re: Wicket + Spring DM + Hibernate

2009-06-15 Thread Igor Vaynberg
your original message did not specify what problems you were having. further, springbean does not require anything in web.xml, it simply needs the applicationcontext reference, and if you dont give it one it will look it up using spring's utils so everything should work. -igor On Mon, Jun 15,