Maciej Miklas

Ranch Hand
+ Follow
since Feb 12, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Maciej Miklas

This is the soluton (Spring+resteasy):

13 years ago
Hi,

I've registered custom XML Mappers with javax.xml.bind.annotation.adapters.XmlAdapter. Such mapper can throw exception - the problem is, that resteasy ignores such exception. I would like to break REST call and return error to the client.

To do that I need to register javax.xml.bind.ValidationEventHandler on Marschaller/Unmarschaller.

Does anyone know how to do that with Jboss resteasy? I am using resteasy servlet to process requests, this servlet creates Marschaller/Unmarschaller somwhere inside......

Thanks,
Maciek
13 years ago
Hi,

I need help understanding HornetQ client fail-over (stand alone client and stand alone server)

I would like to have setup with three HornetQ Servers in a cluster, without backup servers or replication - just simple configuration: when one server is dead client should not use it and simply use other still running servers from cluster.

I've tried example that comes with HornetQ: jms/client-side-load-balancing. It starts three servers: 0, 1 and 2. All of them are in the same cluster/group.

Test client obtains ConnectionFactory trough JNDI Lookup, it contains only address of the Server 0: java.naming.provider.url=jnp://localhost:1099.

Messages send from test client are load balanced with round robin trough all three servers - this is also expected behavior, because ConnectionFactory is cluster aware.
I've also configured client file-over without backup servers - only with such configuration:

<discovery-group-ref discovery-group-name="jms-discovery-group" />
<retry-interval>1000</retry-interval>
<retry-interval-multiplier>1.0</retry-interval-multiplier>
<reconnect-attempts>-1</reconnect-attempts>
<failover-on-server-shutdown>true</failover-on-server-shutdown>


Now my problem: when kill Server 1 or Server 2 everything works just fine - test client does not send messages to those servers.

When I kill Server 0 (configured in JNDI properties), the test client stops sending messages - it tries to reconnect to Server 0. I would expect it to use Server 1 and Server 2.
After some time test client gets exception:
Caused by: javax.jms.JMSException: Timed out waiting for response when sending packet 45
at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:277)
at org.hornetq.core.client.impl.ClientSessionImpl.queueQuery(ClientSessionImpl.java:350)
at org.hornetq.core.client.impl.DelegatingSession.queueQuery(DelegatingSession.java:436)
at org.hornetq.jms.client.HornetQSession.lookupQueue(HornetQSession.java:1019)
at org.hornetq.jms.client.HornetQSession.createQueue(HornetQSession.java:390)
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:597)
at org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:344)
at $Proxy20.createQueue(Unknown Source)
at org.springframework.jms.support.destination.DynamicDestinationResolver.resolveQueue(DynamicDestinationResolver.java:101)
at org.springframework.jms.support.destination.DynamicDestinationResolver.resolveDestinationName(DynamicDestinationResolver.java:66)
at org.springframework.jms.support.destination.JmsDestinationAccessor.resolveDestinationName(JmsDestinationAccessor.java:100)
at org.springframework.jms.core.JmsTemplate.access$2(JmsTemplate.java:1)
at org.springframework.jms.core.JmsTemplate$4.doInJms(JmsTemplate.java:545)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
... 31 more
Caused by: HornetQException[errorCode=3 message=Timed out waiting for response when sending packet 45]


The solution for this problem is to configure all three servers in JNDI properties: java.naming.provider.url=jnp://localhost:1099;jnp://localhost:1199;jnp://localhost:1299. With such configuration I can kill any server and test client is using only still running servers. However this configuration suggests, that I would need HA JNDI to solve my problem or configure JNDI properties to contain always all cluster members. On the other side ConnectionFactory should be cluster aware and should automatically disable "killed" servers.

Question: why client tries to reconnect to server from JNDI Config instead of using still running servers in cluster ?
Hi,

JSF and JPA are using Java Bean validation with annotations. This is really cool functionality if you have EJB/JPA -> JSF based interface - there is no need to duplicate constrains in presentation and business logic.

My application will follow SOA model - it will provide set of JAX-WS services. I would like to have similar possibility there: define constrains on one place (could be WSDL) and use them to generate JPA db tables and also constrains for GUI.

Does someone know technology that allows that?

I could imagine that JAXB generates additional annotations with constrains out of schema in WSDL....


Thank you,
Maciej
14 years ago
this is really hard what oracle is doing with sun.....

we need to hope that this goes better than their app servers in the past ;)
Hi,

I have tons of diagrams in several packages. RSA has "Web Publish" option - this is generating all diagrams flat in one folder "Diagrams". It's really hard to find something there, plus diagram names are very long (packages + name)
The folder Models contains not only diagrams, but also other modeling stuff - again, hard to find interesting diagrams there.

I would like to have possibility to create kind of diagram index -> simple page, where I could link selected diagrams

The point is, to have groups of diagrams that are being published into clear web structure.

Thank you,
Maciej
14 years ago
correct - but this is not my idea.... but requirement and I need to implement it
15 years ago
yes - this is what I need. I was hoping to get some code example from someone
15 years ago
because I need to use it as a PIN for the user.

I know this article - but generated numbers are not guaranteed to be unique.

I am using hibernate in cluster - the common place is DB - I need to lock table or generate my PIN direct in oracle.
15 years ago
Hi,

I need to generate unique random integer in range 1-9999999 - the best would be oracle procedure.

Does anyone have an example?


I know how to generate random, or next val from sequence. But I need like next random value from sequence.


15 years ago
thank you!

This is how I've suspected it - It's based on Ecpilse 3.2.

Is there anything that is based on eclipse 3.4 ?
15 years ago
1) new WTP does not deploy to websphere - this is known problem
2) I need IDE to hot deploy EAR projects into WAS. I also will start WAS from eclipse - not remote debug

MyEclipse blue works fine, but I've been using myeclipse for 5 years and I would like to try something else (They have lately really poor quality.....).

IBM AST (Eclipse 3.2 WTP + WAS plugins) is just great, but there is no update to Eclipse 3.4 - I've tried it. I've also tried Rational updater.

I've also searched for another tools on IBM partner page but there is only RAD (for WAS 4.x-7.x) and AST (for WAS 4.x-6.x - maximum Eclipse 3.2, I did not find anything for Eclipse 3.4)

I need tool (AST would be great, but I cannot find new version) based on Eclipse 3.4 to hot deploy EAR project into WAS running directly in eclipse (not remote debug)
15 years ago

Jeanne Boyarsky wrote:

Maciej Miklas wrote:is there version based on Eclipse 3.4? Maybie there is something else based on newest eclipse version (but not RAD)?


My guess would be that you need to wait until you upgrade to WebSphere 7, to use the tools that were based on the latest Eclipse base.



I only found RAD for WAS 7, are there other toole from IBM (they might work with WAS 6)?
15 years ago