[JNDI/Naming/Network] - Re: JNDI Problem
by gopinathb4u
Steps
1. Included <use-java-context>false</use-java-context> in -ds.xml
2. Started Jboss
3. Ran standalone program to lookup the datasource. Error occurred.
| Jboss Server Console
| 11:01:38,343 INFO [DatasourceConnectionProvider] Using datasource: java:/Detects
| 11:01:38,359 INFO [TransactionFactoryFactory] Transaction strategy: net.sf.hibernate.transaction.JTATransactionFactory
| 11:01:38,359 INFO [NamingHelper] JNDI InitialContext properties:{}
| 11:01:38,359 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup
| 11:01:38,359 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
| 11:01:38,359 INFO [NamingHelper] JNDI InitialContext properties:{}
| 11:01:38,359 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup
| 11:01:38,359 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
| 11:01:44,109 INFO [SettingsFactory] Use scrollable result sets: true
| 11:01:44,109 INFO [SettingsFactory] Use JDBC3 getGeneratedKeys(): false
| 11:01:44,109 INFO [SettingsFactory] Optimize cache for minimal puts: false
| 11:01:44,109 INFO [SettingsFactory] Query language substitutions: {}
| 11:01:44,109 INFO [SettingsFactory] cache provider: net.sf.hibernate.cache.TreeCacheProvider
| 11:01:44,109 INFO [Configuration] instantiating and configuring caches
| 11:01:44,156 INFO [SessionFactoryImpl] building session factory
| 11:01:50,187 INFO [SessionFactoryObjectFactory] Factory name: java:/hibernate/SessionFactory
| 11:01:50,187 INFO [NamingHelper] JNDI InitialContext properties:{}
| 11:01:50,203 INFO [NamingHelper] Creating subcontext: hibernate
| 11:01:50,203 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: java:/hibernate/SessionFactory
| 11:01:50,203 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
| 11:01:50,203 INFO [NamingHelper] JNDI InitialContext properties:{}
|
| LookupTest Source
| package example1;
|
| import java.util.Hashtable;
|
| import javax.naming.Context;
| import javax.naming.InitialContext;
|
| public class LookupTest
| {
| public static void main(String[] args) throws Exception
| {
| Hashtable props = new Hashtable();
| props.put(Context.INITIAL_CONTEXT_FACTORY,
| "org.jnp.interfaces.NamingContextFactory");
| props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
| props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
|
| InitialContext ic = new InitialContext(props);
| Object lookupObj = ic.lookup("java:/Detects");
| System.out.println("Object:" + lookupObj);
| }
| }
|
| Error details while lookup
| Exception in thread "main" javax.naming.NameNotFoundException: Detects not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:490)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:498)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:504)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:277)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at example1.LookupTest.main(LookupTest.java:19)
|
Tried JNDI name "java:/Detects" and "Detects". It is not working.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024545#4024545
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024545
17Â years, 10Â months
[JBossCache] - Re: Problems while using JBoss Cache Replication in Cluster
by nirajal
The Log leading up to the problem is given below:
10:56:54,187 INFO [ProxyFactory] Bound EJB Home 'PartnerFacade' to jndi 'ejb/Pa
rtnerFacade'
10:56:54,265 WARN [TreeCache] removeObject(): exception occurred: java.lang.Run
timeException: java.lang.reflect.InvocationTargetException
10:56:54,265 INFO [TreeCache] PojoCache.endTransaction(): rolling back tx for f
qn: /test/hppstatus/13
10:56:54,265 INFO [isi_log] Could not remove DssReportData:java.lang.RuntimeExc
eption: PojoCache.removeObject(): fqn: /test/hppstatus/13
10:56:54,265 INFO [TxInterceptor] There was a problem handling this request
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.cache.TreeCache.callRemoteMethodsViaReflection(TreeCache.ja
va:4352)
at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:4307)
at org.jboss.cache.loader.ClusteredCacheLoader.callRemote(ClusteredCache
Loader.java:75)
at org.jboss.cache.loader.ClusteredCacheLoader.put(ClusteredCacheLoader.
java:143)
at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreI
nterceptor.java:216)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterc
eptor.java:364)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:
160)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInt
erceptor.java:157)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5710)
at org.jboss.cache.TreeCache.put(TreeCache.java:3782)
at org.jboss.cache.aop.PojoCache.lockPojo(PojoCache.java:631)
at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy98.putObject(Unknown Source)
at com.test.ibp.isi.server.hppconfig.HppStatusManager.UpdateDssReport(
HppStatusManager.java:394)
at com.test.ibp.isi.server.hppconfig.HPPManager.dssReport(HPPManager.j
ava:1227)
at com.test.ibp.isi.server.adapter.HCSInboundAdapterMDB.processMessage
(HCSInboundAdapterMDB.java:217)
at com.test.ibp.isi.server.adapter.HCSInboundAdapterMDB.onMessage(HCSI
nboundAdapterMDB.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
ageDrivenContainer.java:495)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
ke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
DrivenInstanceInterceptor.java:116)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
Interceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
81)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
terceptor.java:109)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
ryFinderInterceptor.java:136)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
ainer.java:402)
at org.jboss.ejb.Container.invoke(Container.java:954)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
ker.java:987)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
essage(JMSContainerInvoker.java:1287)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:26
6)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMess
ageConsumer.java:905)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:17
0)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:748)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: failure to marshal argument(s)
at org.jgroups.blocks.RpcDispatcher.callRemoteMethods(RpcDispatcher.java
:188)
... 58 more
Caused by: java.lang.IllegalArgumentException: Marshaller.extractFqn(): Unknown
method call id: -1
at org.jboss.cache.marshall.Marshaller.extractFqn(Marshaller.java:147)
at org.jboss.cache.marshall.TreeCacheMarshaller140.extractFqnAsString(Tr
eeCacheMarshaller140.java:185)
at org.jboss.cache.marshall.TreeCacheMarshaller140.objectToStream(TreeCa
cheMarshaller140.java:79)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToByteBuffer(Ve
rsionAwareMarshaller.java:133)
at org.jgroups.blocks.RpcDispatcher.callRemoteMethods(RpcDispatcher.java
:181)
... 58 more
10:56:54,265 INFO [ProxyFactory] Bound EJB Home 'CustomerSubscriptionFacade' to
jndi 'ejb/CustomerSubscriptionFacade'
10:56:54,390 WARN [TreeCache] putObject(): exception occurred: java.lang.Runtim
eException: java.lang.reflect.InvocationTargetException
10:56:54,390 INFO [TreeCache] PojoCache.endTransaction(): rolling back tx for f
qn: /test/hppstatus/13
10:56:54,390 ERROR [isi_log] While adding the dss Report to jboss cache
java.lang.RuntimeException: PojoCache.putObject(): fqn: /test/hppstatus/13
at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:481)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy98.putObject(Unknown Source)
at com.test.ibp.isi.server.hppconfig.HppStatusManager.UpdateDssReport(
HppStatusManager.java:394)
at com.test.ibp.isi.server.hppconfig.HPPManager.dssReport(HPPManager.j
ava:1227)
at com.test.ibp.isi.server.adapter.HCSInboundAdapterMDB.processMessage
(HCSInboundAdapterMDB.java:217)
at com.test.ibp.isi.server.adapter.HCSInboundAdapterMDB.onMessage(HCSI
nboundAdapterMDB.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
ageDrivenContainer.java:495)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
ke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
DrivenInstanceInterceptor.java:116)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
Interceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
81)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
terceptor.java:109)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
ryFinderInterceptor.java:136)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
ainer.java:402)
at org.jboss.ejb.Container.invoke(Container.java:954)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
ker.java:987)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
essage(JMSContainerInvoker.java:1287)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:26
6)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMess
ageConsumer.java:905)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:17
0)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:748)
I have not yet tried with 1.4.1.SP1 or 1.4.1.SP2 version. I will check with that as well. This is how my replSync-service.xml is configured:
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- Sample TreeCache Service Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- ==================================================================== -->
<!-- Defines TreeCache configuration -->
<!-- ==================================================================== -->
jboss:service=Naming
jboss:service=TransactionManager
<!--
Configure the TransactionManager
org.jboss.cache.JBossTransactionManagerLookup -->
<!--
Isolation level : SERIALIZABLE
REPEATABLE_READ (default)
READ_COMMITTED
READ_UNCOMMITTED
NONE
-->
SERIALIZABLE
<!--
Valid modes are LOCAL
REPL_ASYNC
REPL_SYNC
INVALIDATION_ASYNC
INVALIDATION_SYNC
-->
REPL_SYNC
<!--
Just used for async repl: use a replication queue
-->
false
<!--
Replication interval for replication queue (in ms)
-->
0
<!--
Max number of elements which trigger replication
-->
0
<!-- Name of cluster. Needs to be the same for all clusters, in order
to find each other
-->
TreeCache-Cluster
<!-- JGroups protocol stack properties. Can also be a URL,
e.g. file:/home/bela/default.xml
-->
<!-- UDP: if you have a multihomed machine,
set the bind_addr attribute to the appropriate NIC IP address, e.g bind_addr="192.168.0.2"
-->
<!-- UDP: On Windows machines, because of the media sense feature
being broken with multicast (even after disabling media sense)
set the loopback attribute to true -->
<UDP mcast_addr="228.1.2.3" mcast_port="48866"
ip_ttl="64" ip_mcast="true"
mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
loopback="false"/>
<PING timeout="2000" num_initial_members="3"
up_thread="false" down_thread="false"/>
<MERGE2 min_interval="10000" max_interval="20000"/>
<!-- <FD shun="true" up_thread="true" down_thread="true" />-->
<FD_SOCK/>
<VERIFY_SUSPECT timeout="1500"
up_thread="false" down_thread="false"/>
<pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
max_xmit_size="8192" up_thread="false" down_thread="false"/>
<UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
down_thread="false"/>
<pbcast.STABLE desired_avg_gossip="20000"
up_thread="false" down_thread="false"/>
<FRAG frag_size="8192"
down_thread="false" up_thread="false"/>
<pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
shun="true" print_local_addr="true"/>
<pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
true
true
15000
15000
10000
com.test.ibp.cacheeviction.IBPEvictionPolicy
true
5
0
0
72000
500
500
0
0
0
0
72000
0
0
72000
0
true
false
false
false
/
org.jboss.cache.loader.ClusteredCacheLoader
false
false
false
Let me know if there is any problem with the configuration of this file.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024544#4024544
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024544
17Â years, 10Â months
[Remoting] - Re: Callback Questions
by ron.sigalï¼ jboss.com
Hi,
anonymous wrote :
| 1. When the server sends callbacks to the client, are the callbacks delivered in the same order they have been sent?
|
1. Pull callbacks are retrieved in the order that the ServerInvocationHandler passes them by way of InvokerCallbackHandler.handleCallback().
2. The situation for push callbacks is somewhat more complicated and transport specific. When the ServerInvocationHandler calls InvokerCallbackHandler.handleCallback() for a push callback, a client invoker on the server side makes an invocation on the callback server invoker on the client side. If callback A is generated and then callback B is generated a second later, it's very likely that callback A will arrive before callback B. However, there may be some nondeterminism according to the transport and its configuration. The client invoker of the socket transport (and its descendants) maintains a connection pool, and if callbacks A and B are generated in quick succession, it is possible for them to go out over two different connections and for callback B to arrive before callback A.
If you need to preserve determinism, you can configure the connection pool to have no more than one connection by setting org.jboss.remoting.transport.MicroSocketClientInvoker.MAX_POOL_SIZE_FLAG to "1" in the Client's configuration map.
There's also a new, and as yet undocumented, facility for registering a listener which will receive acknowledgements that callbacks have been delivered, and that could be used, at the cost of some latency, to serialize the delivery of callbacks. I need to write that documentation in the next few days, and when it's done I'll post a pointer to it.
anonymous wrote :
| Is possible to pass the identifier to the server when registering the client's callbackhandler?
|
In the interest of completeness I should say that the phrase "the client's callbackhandler" is somewhat ambiguous. (1) A single callback handler could be passed to multiple Clients. (2) Some versions of Client.addListener() create a callback Connector as a convenience. If a single callback handler is passed to one of these methods on the same Client, it will appear on the server side to be two callback handler instances.
Let's assume, though, that you have a one-one relationship between callback handlers and Clients. Each client is endowed with a unique session ID when it is created, and each callback handler that is passed to an addListener() method of Client A is given the session ID of Client A. That session ID can be retrieved on the server side by casting to ServerInvokerCallbackHandler the InvokerCallbackHandler passed in to ServerInvocationHandler.addListener() and calling getClientSessionId() on it. For more information, see the thread
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024506#4024506
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024543#4024543
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024543
17Â years, 10Â months
[JBoss Seam] - Re: Excel support in Seam: any interest?
by jazir1979
Fair enough -- it's very true that these tools are a world unto themselves and require a fair investment in building the report designs. If Seam can provide some of this stuff without requiring a reporting framework, then that's great.
In my experience in the enterprise java space, our teams have never had the luxury of a "reporting guy" and we've always had to just make things work either doing our own custom thing (ouch!) or using Jasper Reports (I've found BIRT is not yet ready for prime time).
Jasper is not so hard to integrate into a web app, I have it working now with a custom JSF component that lets you input parameters and preview the report, keeping a JasperPrint object in its state so you can then export to any output type over the web at the click of an h:commandButton, without re-running the report query and rendering phases.
Jasper supports inline EJB3 QL queries now, although I still find that the only truly flexible way is to run the query in your code and provide a custom JRAbstractBeanDataSource implementation (as outline for Hibernate in http://www.hibernate.org/79.html).
I suppose both approaches (more output options in Seam, and some integration with Jasper) would add value, I'm just trying to give another perspective :)
great work on all this stuff guys!
Daniel.
"gavin.king(a)jboss.com" wrote : anonymous wrote : I do love the idea of the PDF templating using facelets in Seam for doing up quick documents and e-mails -- but the idea of adding Excel support then leads to the plethora of other output formats that you can think of.. and does all that fluff (and re-inventing of the wheel) really belong in Seam?
|
| It's not like this stuff needs to be deeply integrated into the Seam core, its just an add-on jar, no big deal. That doesn't count as bloat, IMO.
|
| anonymous wrote : I think most people who need a large variety of output formats will settle on a more full-featured reporting framework anyway.
|
| The trouble is that reporting tools like these are kindof a world unto themselves, and its difficult to seamlessly integrate their capabilities into the flow and look and feel of your application. Plus its a totally alien programming model to learn. (Usually, done by some "reporting guy" on the project.) I think its highly useful to have some limited set of reporting capabilities available in the web framework.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024542#4024542
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024542
17Â years, 10Â months
[JBoss Seam] - Re: File(data) Download problem...
by jazir1979
Hi,
I'm doing something similar to you for exporting jasper reports (JasperPrint) objects to various output formats.
I think perhaps you are missing the call to FacesContext.responseComplete(), but I will show you all of my code, because there are also various flush() and close() calls in there which I found were necessary...
| final HttpServletResponse response =
| (HttpServletResponse) context.getExternalContext().getResponse();
| final OutputStream responseStream = response.getOutputStream();
| response.setContentLength(stream.size());
| response.setContentType(contentTypes.get(outputType));
| if (outputType != ReportOutputType.HTML) {
| response.setHeader("Content-Disposition", "attachment; filename=report." + outputType);
| }
| responseStream.write(stream.toByteArray());
| responseStream.flush();
| responseStream.close();
| response.flushBuffer();
| context.responseComplete();
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024540#4024540
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024540
17Â years, 10Â months
[Remoting] - Re: SSLHandshakeException when connecting to JNDI
by ron.sigalï¼ jboss.com
Ah. It turns out that org.jboss.remoting.samples.detection.jndi.ssl, and the facility it demonstrates, were created after the release of Remoting 2.0.0.GA, so you would have to find it them in the CVS repository. You could look in the HEAD branch, but the remoting_2_x branch is more reliable since that's where most active development is taking place.
As for your problem, it should be fixed by those changes. In particular, the detector, just like your client, needs access to a truststore to be able to ping the server. Before JBREM-581: "can not do connection validation with ssl transport (only impacts detection)", there was no way to tell JNDIDetector about a truststore, but JNDIDetector now has a constructor
public JNDIDetector(Map config);
which allows the application to pass to the JNDIDetector the same truststore information that the client gets.
By the way, for information about checking code out of the JBoss CVS repository, see
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossRemoting_source_and_build
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024538#4024538
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024538
17Â years, 10Â months
[Clustering/JBoss] - Re: loadbalancing without ha-failover
by schustes
What am I doing wrong then, or does my scenario just not fit. The application I have is basically a distributed computing server used to run simulations requested by a remote client. I also want to have the loadbalancing, but no replication, so I use HA-JNDI, but set don't set the clustered tag in jboss.xml
The architecture is quite simple - each node has the SFSBs to be balanced. A central node is dedicated to serve remote client requests and has the single-cluster jms running. There are two ejbs on the normal nodes, one being a proxy, creating n delegates to split up the workload. Thus, the central server creates an SFSB on a randomly selected server, from where possibly more SFSBs, which should be loadbalanced, may be created.
My problem occurs when I want to create 'delegate beans' on the nodes. I start a lookup, and what (probably correctly) happens, is that the Home interface seems to be returned from the local jndi-tree, and consequently the beans as well. Thus, a single job will run only on one node (the one selected by the 'bootstrapping server') with the proxy and a number of delegates it creates. What I would like to have is to distributed the delegates over the cluster. Does this scenario simply not work if all nodes have the same EJBs deployed? Must I then use the clustered-invokers and add my own interceptors (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=80210 - this works fine if I declare the ejbs clustered, but is just unnecessary overhead for my purposes).
"sacha.labourey(a)jboss.com" wrote : you could also try to make your own clustering configuration, name it the way you want, and simply use a non-clustered cache/store, like for the default SFSB configuration.
|
I don't know what this means. I played around with the clustered-ejb configuration in standardjboss.xml trying to disable the state-transfer, but I didn't get it to work (once I stop using StatefulHASessionSynchronisationInterceptor, the session seems to get lost, and I get remote exceptions). If there is a wiki or something, I would be very thankful for a pointer.
best, stephan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024536#4024536
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024536
17Â years, 10Â months