[Spring Integration] - [Spring + EJB3 (and JSF)] How inject a stateless ejb3 into m
by javacl
Hi all.
I'm new in the ejb3 world,and i haven't experience with Jboss Application Server.
I have created an application using JSF+Spring+Hibernate and deplyed into Tomcat....and it's work well.
Now I want to integrate Spring with EJB3,using JBoss 5.1.0:
I have a Spring bean and i wont inject into this bean my stateless EJB3.
The structure in my project is:
| Enterprice Application
| |
| |____EjbProject.jar
| | |
| | |
| | |__ejb.service
| | | |__ UtenteService.java (Remote Ejb Interface)
| | | |__ UtenteServiceImpl.java (Stateless Ejb implementation)
| | |
| | |__ejb.dominio
| | |__ Utente.java (Entity Ejb)
| |
| |
| |
| |
| |____WebProject.war
| |
| |__webPages
| | |
| | |__WEBINF
| | |
| | |__ applicationContext.xml
| |
| |
| |__spring.service
| |
| |__spring.service
| |
| |__ SpringUtenteService.java (Spring bean interface)
| |
| |__ SpringUtenteServiceImpl.java (implement. of interf.)
|
But when I try to run my project i have this excpetion:
| org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'utenteService': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: UtenteService not bound
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1362)
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
| at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
| at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
| at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
| at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
| at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:407)
| at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
| at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
| at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:251)
| at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
| at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
|
I don't understand where is the error!
The package with applicationContext and spring's beans go into the WAR file or into the JAR file?
Are there other configuration file to configure for my scope?
Thanks for your help!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267339#4267339
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267339
14 years, 7 months
[Spring Integration] - Re: ClassLoader inside deloyed bean cannot find existing cla
by ivanyuan
Hi Marius,
Thanks for your help again.
I didn't try TCCL, but I guess, in my scenario, the invocation is from web application, the system class loader and thread-context class loader are all related to web application (not the spring deployer).
As such I did the following trick to make it work, I implemented BeanClassLoaderAware interface in the class where I need class loader. Whenever I need class loader, I just use this one, it works perfect for me.
In this way, the class loader will be invoked and set when the bean is deployed, i.e., the class loader is same as the class loader of the spring deployer. This trick does the job!
I have another question about how to access a deployed spring bean from other spring context which is managed by MULE. I think, better to ask you in different thread.
Thank you so much,
Ivan Yuan
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267336#4267336
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267336
14 years, 7 months
[jBPM Users] - Re: JBPM4 Process Image
by sebastian.s
You can use DHTML and overlaying stuff. But you don't have to. I personally used some Java image manipulation code. In each case all you need is obtainable via the API.
1.) You can get the process image.
2.) You can retrieve the active activities' names.
3.) For each activity you can retrieve the co-ordintes of its position in the process image.
For this take a look at the API-documentation and there might be some good hints given by other users of the forum in the thread I mentioned before.
I went for the solution to draw an additional coloured rectangle around the active activities since I haven't had much Java image manipulation experience. Worked for me. But if you are happy with DHTML stuff go for it and take a closer look at how the Console handles this.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267327#4267327
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267327
14 years, 7 months
[JBoss Messaging Users] - Re: How to set socket timeouts?
by belcar
Hi Howard
I'm not sure if it is a bug or not but here's the following:
I've TRACED org.jboss.jms and org.jboss.remoting on the polling client.
I can see the client ping the server every 30 seconds.
I see no exceptions in the logs.
However after 10 or 15 minutes this client no longer finds messages on the queue, but the ping remains functioning. If I restart my client process running on a remote jboss 4.2.3, the client perfectly finds all messages it has missed. This client is the only reader.
2009-11-24 16:30:01,952 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Wrote packet
| 2009-11-24 16:30:01,952 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a1d92a, bisocket://10.249.6.1:4457] done writing invocation to marshaller
| 2009-11-24 16:30:01,952 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a1d92a, bisocket://10.249.6.1:4457] reading version from input stream
| 2009-11-24 16:30:01,954 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a1d92a, bisocket://10.249.6.1:4457] read version 22 from input stream
| 2009-11-24 16:30:01,954 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a1d92a, bisocket://10.249.6.1:4457] reading response from unmarshaller
| 2009-11-24 16:30:01,954 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Reading
| 2009-11-24 16:30:01,954 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Stream is already DataInputStream :)
| 2009-11-24 16:30:01,954 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Created packet SerializedPacket[null]
| 2009-11-24 16:30:01,954 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Reading packet
| 2009-11-24 16:30:01,954 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Read packet
| 2009-11-24 16:30:01,955 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Returning payload: InvocationResponse[dd09a6, InvocationResponse[1a498b6, true]]
| 2009-11-24 16:30:01,955 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a1d92a, bisocket://10.249.6.1:4457] returned NEW ClientSocketWrapper[Socket[addr=/10.249.6.1,port=4457,localport=37299].a6aa31] to pool
| 2009-11-24 16:30:01,955 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a1d92a, bisocket://10.249.6.1:4457] released semaphore: 200
| 2009-11-24 16:30:01,955 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a1d92a, bisocket://10.249.6.1:4457] received response InvocationResponse[dd09a6, InvocationResponse[1a498b6, true]]
| 2009-11-24 16:30:01,955 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[a1d92a, bisocket://10.249.6.1:4457] received InvocationResponse so going to return response's return value of InvocationResponse[1a498b6, true]
| 2009-11-24 16:30:01,955 TRACE [org.jboss.remoting.LeasePinger] LeasePinger[3j001-jg0dw9-g2et9fcn-1-g2et9kaa-9:SocketClientInvoker[a1d92a, bisocket://10.249.6.1:4457](3j001-jg0dw9-g2et9fcn-1-g2et9ka6-8)] successfully pinged the server
| 2009-11-24 16:30:01,969 TRACE [org.jboss.remoting.ConnectionValidator] ConnectionValidator[a4effe:SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457], pingPeriod=10000 ms] sending PING tied to lease
| 2009-11-24 16:30:01,969 TRACE [org.jboss.remoting.ConnectionValidator] pinging, sending InvocationRequest[1b5eaed, self, $PING$] over SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457]
| 2009-11-24 16:30:01,969 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457](1) invoking InvocationRequest[1b5eaed, self, $PING$]
| 2009-11-24 16:30:01,969 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] retryCount: 0
| 2009-11-24 16:30:01,969 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] obtained semaphore: 199
| 2009-11-24 16:30:01,969 TRACE [org.jboss.jms.client.remoting.ClientSocketWrapper] checking open connection
| 2009-11-24 16:30:01,969 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] reusing pooled connection: NEW ClientSocketWrapper[Socket[addr=/10.249.6.1,port=4457,localport=49479].fbb5f5]
| 2009-11-24 16:30:01,969 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] writing version 22 on output stream
| 2009-11-24 16:30:01,969 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] writing invocation to marshaller
| 2009-11-24 16:30:01,969 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Writing InvocationRequest[1b5eaed, self, $PING$]
| 2009-11-24 16:30:01,969 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Stream is a DataOutputStream
| 2009-11-24 16:30:01,969 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Writing packet: SerializedPacket[InvocationRequest[1b5eaed, self, $PING$]]
| 2009-11-24 16:30:01,969 TRACE [org.jboss.remoting.transport.socket.TimedOutputStream] org.jboss.remoting.transport.socket.TimedOutputStream@a53502 scheduled org.jboss.remoting.transport.socket.TimedOutputStream$OutputTimerTask@1678aef: 30000
| 2009-11-24 16:30:01,970 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Wrote packet
| 2009-11-24 16:30:01,970 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] done writing invocation to marshaller
| 2009-11-24 16:30:01,970 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] reading version from input stream
| 2009-11-24 16:30:01,971 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] read version 22 from input stream
| 2009-11-24 16:30:01,971 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] reading response from unmarshaller
| 2009-11-24 16:30:01,971 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Reading
| 2009-11-24 16:30:01,971 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Stream is already DataInputStream :)
| 2009-11-24 16:30:01,971 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Created packet SerializedPacket[null]
| 2009-11-24 16:30:01,971 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Reading packet
| 2009-11-24 16:30:01,971 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Read packet
| 2009-11-24 16:30:01,971 TRACE [org.jboss.jms.wireformat.JMSWireFormat] Returning payload: InvocationResponse[1fbaf73, true]
| 2009-11-24 16:30:01,971 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] returned NEW ClientSocketWrapper[Socket[addr=/10.249.6.1,port=4457,localport=49479].fbb5f5] to pool
| 2009-11-24 16:30:01,971 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] released semaphore: 200
| 2009-11-24 16:30:01,971 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] received response InvocationResponse[1fbaf73, true]
| 2009-11-24 16:30:01,971 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457] received InvocationResponse so going to return response's return value of true
| 2009-11-24 16:30:01,971 TRACE [org.jboss.remoting.ConnectionValidator] ConnectionValidator got successful ping using SocketClientInvoker[5f8245, bisocket://10.249.6.1:4457]
If I would open a JIRA issue (not sure it's a bug though), I guess this is a remoting issue? Advantage is I can add a screenshot of the setup.
Thanks for your help
G.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267326#4267326
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267326
14 years, 7 months