[JBossCache] - Blob balancer using cache - concept help
by zambak
Hi
I was wondering if someone can help me decide if I can use JBoss Cache to solve following problem:
We have a webapp that will be installed on 2 servers which in turn will be load balanced using Cisco content switch. Web application has a user part which is to show a lot of images and an admin part which has capability to upload images.
The problem is that right now images are just files on a disk so when upload occurs I have to figure out how to "copy" the uploaded file onto another server.
What I would like to do is to store the uploaded image into a DB as a BLOB and then use cache to propagate it to other server. The problem is that I don't want user end of the app to load images from the DB but to somehow tell cache to recreate file on the disk and access it as a regular image...
So the webapp would run on 2 servers and would share a DB. On the admin side, no matter on which server the file gets uploaded to it will be inserted into DB. On the user side, cache will write the file from the DB to the disk and user part of the app will just hadle it as a regular image file.
I read JBoss Cache arhitecture and I understand I can persist the cache in the DB so it will survive server restarts. But can i tell JBOss cache to cache to the disk?
Is there a way.....I hope I explained the situation well...
Please help
Z....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966170#3966170
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966170
19 years, 8 months
[JBossWS] - J2EE tutorial web services client throws
by taciano
Hi
I'm using JBoss 4.0.4.GA, with the "all" installation option. I'm going through the "Getting Started with JBoss 4.0" guide (release 5).
When I reach the topic "Running the Web Service Client" (item 5.3 of the doc) and run the command "ant -f jboss-build.xml run-ws" a "java.lang.UnsupportedOperationException: setProperty must be overridden in subclasses of SOAPMessage" exception is thrown.
The full stack trace is as follows:
C:\temp\j2eetutorial14\examples\bank>ant -f jboss-build.xml run-ws
Buildfile: jboss-build.xml
run-ws:
[java] log4j:WARN No appenders could be found for logger (org.jboss.ws.meta
data.JSR109ClientMetaDataBuilder).
[java] log4j:WARN Please initialize the log4j system properly.
[java] Customer: 200
[java] Exception in thread "main" java.rmi.RemoteException: Call invocation
failed: setProperty must be overridden by all subclasses of SOAPMessage; nested
exception is:
[java] java.lang.UnsupportedOperationException: setProperty must be ove
rridden by all subclasses of SOAPMessage
[java] at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:719
)
[java] at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:398)
[java] at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:164)
[java] at $Proxy0.getAccountsOfCustomer(Unknown Source)
[java] at com.jboss.ebank.WSClient.main(WSClient.java:40)
[java] Caused by: java.lang.UnsupportedOperationException: setProperty must
be overridden by all subclasses of SOAPMessage
[java] at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:424)
[java] at org.jboss.ws.soap.SOAPMessageImpl.(SOAPMessageImpl.java
:77)
[java] at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFac
toryImpl.java:133)
[java] at org.jboss.ws.binding.soap.SOAP11BindingProvider.createMessage
(SOAP11BindingProvider.java:52)
[java] at org.jboss.ws.binding.soap.SOAPBindingProvider.bindRequestMess
age(SOAPBindingProvider.java:108)
[java] at org.jboss.ws.binding.soap.SOAP11BindingProvider.bindRequestMe
ssage(SOAP11BindingProvider.java:58)
[java] at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:647
)
[java] ... 4 more
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 19 seconds
Everything was running smoothly up to this point. I found a bug reported on JIRA about this (http://jira.jboss.com/jira/browse/JBWS-1126?page=all), but apparently it was considered a CLASSPATH problem. Well, if there is actually a CLASSPATH problem, I'd like to know what must be done to the default JBoss configuration to make it work.
Thanks in advance,
Taciano Perez
Solution Architect
Hewlett-Packard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966166#3966166
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966166
19 years, 8 months
[Messaging, JMS & JBossMQ] - Re: IBM WebSphere MQ (WMQ) with JBOSS/JMS
by mvilot
"amousavizadegan" wrote : Does anyone know how to setup IBM WMQ with JBOSS, an example of sample MDB will be good ?
New post on an old thread, because it's an important problem that needs to be solved. Looks like the published code is incorrect.
Configuration: jboss-4.0.4.GA with WSMQ 6.0, both running on Windoze. JBoss installer summary: Chosen installation packsjmx-core
| minimal
| binding-service
| client-deployer-service
| dynclassloader-service.xml
| ear-deployer
| ejb-timer-service
| ejb-deployer
| hsqldb-ds
| jboss-local-jdbc.rar
| javamail
| jbossretro
| jbossws14
| jca-service
| jdbc-metadata-service
| jbossmq-service
| jms-asf-rar
| jms-injvm-invoker
| jms-socket-invoker
| jmx-console
| invokers-service
| jmx-invoker-service
| jta-service
| usertx-service
| mail-inflow-adaptor
| naming
| security
| war-deployer
| jboss-remoting
|
| Configured the -ds.xml per http://wiki.jboss.org/wiki/Wiki.jsp?page=IntegrationWithWebSphereMQSeries
| Compiled and deployed the .sar:INFO [ResponseQueue] Bound to JNDI name: queue/ResponseQueue
| | INFO [RequestQueue] Bound to JNDI name: queue/RequestQueue
| | INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding
| | ,name=WSMQJms' to JNDI name 'java:WSMQJms'
| From the jmx-console, JNDIView 1st throws the following exception chain (no HA or EJB cache-invalidation-service support in this configuration):
| ERROR [JNDIView] JNDIView.getHAJndiAttributes() failed
| | java.lang.NullPointerException: name cannot be null
| | at javax.management.ObjectName.construct(ObjectName.java:342)
| | at javax.management.ObjectName.<init>(ObjectName.java:1304)
| | at org.jboss.naming.JNDIView.getHAJndiAttributes(JNDIView.java:836)
| | at org.jboss.naming.JNDIView.getHAUrl(JNDIView.java:811)
| | at org.jboss.naming.JNDIView.list(JNDIView.java:193)
| | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| | at java.lang.reflect.Method.invoke(Method.java:585)
| | at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| | at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| | at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| | at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| | at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| | at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| | at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
| | at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOpByName(HtmlAdaptorServlet.java:287)
| | at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:102)
| | at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:77)
| | at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| | at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| | at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| | at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| | at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| | at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| | at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
| | :664)
| | at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| | at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| | at java.lang.Thread.run(Thread.java:595)
| (An annoyance that should be fixed), then displays a reasonable JNDI tree:
| java: Namespace
| | +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| | +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
| | +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
| | +- WSMQJms (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
| | +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
| | +- WSMQJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
| | +- comp (class: javax.naming.Context)
| | +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
| | +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| | +- jaas (class: javax.naming.Context)
| | | +- other (class: org.jboss.security.plugins.SecurityDomainContext)
| | | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| | | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| | | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
| | +- timedCacheFactory (class: javax.naming.Context)
| | Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
| | +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
| | +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
| | +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
| | +- TransactionManager (class: org.jboss.tm.TxManager)
| |
| | Global JNDI Namespace
| | +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| | +- WSMQQueueConnectionFactory (class: com.ibm.mq.jms.MQQueueConnectionFactory)
| | +- wsmq (class: org.jnp.interfaces.NamingContext)
| | | +- ResponseQueue (class: com.ibm.mq.jms.MQQueue)
| | | +- RequestQueue (class: com.ibm.mq.jms.MQQueue)
| | +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
| | +- EventDispatcher (class: org.jboss.ws.eventing.mgmt.DispatcherDelegate)
| | +- UserTransactionSessionFactory (proxy: $Proxy35 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
| | +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| | +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
| | +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
| | +- queue (class: org.jnp.interfaces.NamingContext)
| | | +- ResponseQueue (class: org.jboss.mq.SpyQueue)
| | | +- RequestQueue (class: org.jboss.mq.SpyQueue)
| | | +- DLQ (class: org.jboss.mq.SpyQueue)
| | +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| | +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
| | +- jmx (class: org.jnp.interfaces.NamingContext)
| | | +- invoker (class: org.jnp.interfaces.NamingContext)
| | | | +- RMIAdaptor (proxy: $Proxy29 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| | | +- rmi (class: org.jnp.interfaces.NamingContext)
| | | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
| | +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
| | +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| Now, here's the fun part. Deploying the MDB provokes the following:
| INFO [EjbModule] Deploying WSMQMDB
| | WARN [JMSContainerInvoker] JMS provider failure detected for WSMQMDB
| | org.jboss.deployment.DeploymentException: Error during queue setup; - nested throwable: (java.lang.ClassCastException: o
| | rg.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
| | at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
| | at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:811)
| | at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:839)
| | ...
| The key settings are in the -ds.xml <connection-factories> tag: <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| | name="jboss.mq:service=JMSProviderLoader,name=WSMQJMSProvider">
| | <attribute name="ProviderName">WSMQJMSProvider</attribute>
| | <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
| | <!-- The queue connection factory -->
| | <attribute name="QueueFactoryRef">WSMQQueueConnectionFactory</attribute>
| | <!-- The topic factory -->
| | <attribute name="TopicFactoryRef">WSMQTopicConnectionFactory</attribute>
| | </mbean>
| |
| | <no-tx-connection-factory>
| | <jndi-name>WSMQJms</jndi-name>
| | <rar-name>jms-ra.rar</rar-name> <!-- JCA 1.5 -->
| | <use-java-context>true</use-java-context>
| | <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
| | <!-- ClassCastException: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl -->
| | <max-pool-size>20</max-pool-size>
| | <!-- These are JBoss-specific properties for a ManagedConnectionFactory -->
| | <!-- MUST MATCH Mbean JNDI NAME (overrides default "java:/DefaultJMSProvider") -->
| | <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">WSMQJMSProvider</config-property>
| | <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Queue</config-property>
| | <config-property name="UserName" type="java.lang.String">User</config-property>
| | <config-property name="Password" type="java.lang.String">password</config-property>
| | </no-tx-connection-factory>
| Looks like the JmsConnectionFactoryImpl class _does_ exist in the jms-ra.jar deployed inside the jms-ra.rar.
|
| Any ideas why the ClassCastException is happening?
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966162#3966162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966162
19 years, 8 months