Take a look at the tapestry-spring project. ;)

Em Thu, 02 Oct 2008 09:08:14 -0300, Daniel_ Alonso Sanchez <[EMAIL PROTECTED]> escreveu:

Hi everybody. I'm trying to optimize the loading of the cxf XML context of our application (for web services invocation) and so i have been reading
all the stuff concerning Binding, because i think that, as happens with
another modules like Hibernate, is there a possibility to load the xml
context just one time in the application, but  I am still a newbie in
tapestry.

The thing is that i have created a subclass of
ClassPathXMLApplicationContext, with a default constructor with a super
call with de client-beans.xml path. Besides, i have created an interface
with all the methods of ClassPathXMLApplicationContext.

After all, i have added this line to the bind method in AppModule.java

binder.bind((Class)IClassPathXMLApplicationContext.class,(Class)MyClassPathXmlApplicationContext.class);

I have put the (Class) casting because if not, compiler cries with
something like this:


The method bind(Class<T>, ServiceBuilder<T>) in the type ServiceBinder is
not applicable for the arguments (Class<IClassPathXMLApplicationContext>,
Class<MyClassPathXmlApplicationContext>)

I deploy the app and everthing goes fine, besides the context loads ok,
but when I try to execute this sentence:

DetalleSolicitud sd06 = (DetalleSolicitud)context.getBean("sd06");

I get a ClassCastException. I have tried with loading the context each
time i need to call a web service, and everthing is ok, so I know the
problem is in my crazy binding.

Am i doing something wrong¿? It's possible to do what I am trying to do?

Thanks in advance for all :D



--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
Consultor, desenvolvedor e instrutor em Java
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to