[jboss-user] [Spring Integration] - Re: Spring Component Auto Detection

2009-11-23 Thread nbhatia
Ales,

Is the code for spring-int (specifically org.jboss.spring.vfs) still maintained 
at https://anonsvn.jboss.org/repos/jbossas/projects/spring-int? Is the jar now 
available in JBoss AS 5.1.0 or part of some maven repository?

Thanks.
Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267206#4267206

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267206
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
Clebert, to answer your question, I am running on a real Windows XP machine - 
not a VM.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244056#4244056

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244056
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
Ok I checked out your latest tweaks on the trunk, and it seems like the problem 
is gone. 1 messages sent and received without any hiccups!. That's great!

As a side note, it took 12 minutes for the full round trip, which translates to 
about 14 tps. Any tips on how this can be improved? Of course this is on my 
crappy laptop, but I will try it later on my new desktop, which has the Intel 
i7 processor.

Thanks again for nailing this issue.

Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244198#4244198

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244198
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
Please don't ask me to drop MDBs :-). I have tinkered with so many options 
since last month (including ActiveMQ), and settled on this one - at least it is 
working! I figured this is the best way to get robust connection pooling. Based 
on this, I even gave up my easier war packaging for an ear. So hope there's a 
better way to get MDBs performing - may be drop XA transactions and do some 
tricks like commit DB and then commit JMS.

Thanks.
Naresh 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244210#4244210

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244210
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
Well, my test is very slim - it does not do any database transactions or 
message processing. I even disabled the logging of the messages to make sure I 
am getting raw message times. The only thing that is potentially slowing down 
the performance is the use of XA, through the use of JCA and JmsXA connection 
factory, I assume. I am completely flexible on dealing with this provided the 
JBM and JBoss AS teams jointly recommend the right way to do it.

As mentioned in my previous message, I have seen people abandon XA and 2PC in 
favor of performance. Usually they will commit the database transaction first, 
if that succeeds they will acknowledge the JMS message (this assumes that the 
DB commit will fail more often than a JMS ack). May be you can confirm or deny 
this as a best practice and recommend a solution using this approach. In any 
case, as an application developer, I need a holistic solution that plays well 
with JBoss AS and JBM. Hope you can help with this.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244292#4244292

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244292
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
My example is already posted in JIRA (see 
https://jira.jboss.org/jira/browse/JBMESSAGING-1677 - JmsTest-v2.zip). It 
obviously uses all the bad things :-), i.e. MDB, JCA, JTA. I think the best 
thing to do is to change the example to work in the "recommended way" and use 
it as a reference.

I read the performance section in the manual. The most applicable one here 
seems to be "Re-use connections / sessions / consumers / producers". Indeed JCA 
is supposed to do that and hence every place I have read, the recommendation is 
to go with JCA. So, I am a bit confused - are you recommending to drop JCA and 
write our own connection pooling?

I also read the comment regarding not to use Spring JMS Template. Two questions 
here:

1) The JMS template is used only for sending messages and as long as we connect 
it to a pooled connection factory, there should be no problems, correct? Now 
how to get that pooled connection factory is a problem if the recommendation is 
not to use JCA.

2) The JMS template does not come into picture when receiving messages. Spring 
provides a MDP container which does its own pooling. So that should not be a 
problem either, correct?

So please help me understand how I can practically use the tuning 
recommendations. If I shouldn't be using JCA/JTA etc., then I have to manage 
resources myself. This means all application developers will write their own 
pooling code, which seems counter productive. Or we can use whatever is 
available out there (like Spring Template and MDP) and adapt it to work the 
right way.

Thoughts?

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244334#4244334

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244334
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
"timfox" wrote : "clebert.suco...@jboss.com" wrote : "timfox" wrote : If you 
post your example application on a JIRA, then someone next week can have a look 
at it and see why it's acting slow...
  |   |   | 
  |   | 
  |   | The test we were using to replicate the ping issue replicates this 
transaction issue.
  | 
  | Yes I know, but I am not sure whether that is the exact same program that 
the user used to get 14 TPS (which seems extremely slow), that's why I asked 
for it.

Yes it is the exact same program.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244339#4244339

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244339
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
"timfox" wrote : I'm slightly confused - I can't see where in your test program 
the Spring JMS Template is being used...

The test program doesn't use Spring at all. All my comments about Spring were 
in reference to the performance testing section of the JBM manual. 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244353#4244353

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244353
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
"timfox" wrote : The "right" way depends on what you are trying to do.
  | 
  | From your test program I can see you are just sending messages to a queue, 
and consuming them via an MDB which does nothing but log a message.
  | 
  | In this case you don't need transactions on your MDB, also there's no real 
JCA involved here, since you're just sending messages from a client - there's 
nothing to pool.
  | 
  | Also you are currently using persistent messages, for the purposes of this 
example that's unnecessary too.

Ah I see where you are coming from :-). My real application actually consists 
of two applications, the first accepts orders coming from http requests and the 
second processes the orders. Orders are transmitted from app1 to app2 over JMS. 
Both apps must persist the orders in their own databases. Earlier both the 
applications were simple web applications (war packaging), but when JMS was 
introduced in the mix, I switched to EAR because it seemed that MDBs/JCA/JTA is 
the "right" way to process JMS messages. This has obviously increased the 
complexity of the whole system and instead of focusing on the business 
functionality I am spending all my time on JMS. I will gladly move back to WAR 
if we can find a reasonable JMS approach without using MDBs. So that's what I 
am really trying to do (and I suspect that's what 90% of the people using JMS 
do anyway)!

In short, I need to persist objects on both systems. Both systems need to be 
able to send JMS messages to each other (orders and confirmations) - I have two 
separate queues set up for this - one in each direction. I can't loose any 
orders or confirmations - so I guess the messages need to be persistent.

The test program was just a simplification to figure out how the JMS piece 
should work. Hope this helps set up the context.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244363#4244363

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244363
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
"timfox" wrote : Why are you persisting orders in a database?

To clarify, orders are persisted in two databases, one on each system. The two 
systems belong to different departments (or even different companies) - so 
there is an ownership issue here and both systems need to save the data. 
Moreover the database representation of an order is different on each system 
(different attributes, different relationships) based on their 
responsibilities. Only the common attributes needed by both systems are passed 
on the JMS message. I hope this clarifies the need for persisting the orders in 
the two databases.

"timfox" wrote : If you are using persistent messages then the JMS system can 
guarantee persistence for you.

I am confused about this. I believe that JMS persists messages only to 
guarantee delivery in case the target system is down or not operating 
correctly. You do not expect me to look at persisted JMS messages as the system 
of record for my orders, do you? For me these are just text messages on a 
queue, not first class objects that can be associated with other objects in my 
database. Moreover, at least conceptually I think of persisted JMS messages to 
be deleted when the message has been consumed and acknowledged. So they are not 
a permanent record of my business transactions. Am I missing something?

Given these requirements, I know that I will need x milliseconds to store 
orders in my databases. All I am trying to do now is to make sure that JMS is 
minimum overhead on my system, which is a completely orthogonal issue. As I 
said earlier, I am prepared to embrace all the best practices on the JMS side 
to improve performance as long as I have reliable and performant messaging. I 
can punt MDBs, JTA, JCA - whatever you say as long as I have a decent 
alternative. So if you want me to reuse connections, sessions, consumers, 
producers, tell me how: write my own, use something provided by JBM, or pick 
something like Spring JMS template (with some connection pooling) and their MDP 
container!

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244399#4244399

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244399
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
Clebert, Tim,

Thanks for your detailed responses. So I understand how to deal with database 
persistence. The only question that remains is how I should configure the JMS 
piece. Drop MDBs/JCA/JTA? (since that is turning out to be slow too.) But, 
replace it with what? My own connection/session/consumer/producer pools or some 
off-the-shelf framework?

Looking forward to your response.

Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=424#424

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=424
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-20 Thread nbhatia
Thanks Tim. I will surely try out your suggestion of using raw JMS to send and 
receive from a queue.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244464#4244464

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244464
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-13 Thread nbhatia
Andy and Tim, thanks for answering my questions. I guess I was not very clear 
on the boundaries between JBM and JBoss, so your explanation was very helpful. 
Since many users will use JBoss and JBM together, I suppose including that 
explanation in the manual would also be very useful.

I have reopened https://jira.jboss.org/jira/browse/JBMESSAGING-1677 and 
attached my latest code to it. The configuration steps are included in 
readme.txt. Andy, if you need any more information please let me know.

Thanks.
Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4243247#4243247

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4243247
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-10 Thread nbhatia
Hi Andy,

Thanks for the pointers. Based on your suggestions I have been able to send and 
receive 1000 messages on my Windows XP box without any problems! I tried to 
push this number upwards but it breaks at about 3000 messages - same 
"Connection failure has been detected" message. Anyway, I am not worried about 
that right now since I am not expecting those kinds of loads on my system. 
Moreover, it may just be that I am running out of steam on my development 
laptop.

Bottom line is that my MDB configuration has always been correct. As you 
indicated, since I am running in my local server, I can just use the default 
INVM settings and there is no need for netty. So I have reverted to the simple 
MDB configuration I previously had:


  | @MessageDriven(activationConfig={
  | @ActivationConfigProperty(propertyName="destinationType", 
propertyValue="javax.jms.Queue"),
  | @ActivationConfigProperty(propertyName="destination", 
propertyValue="queue/jmstest")
  |  })
  | public class TestMessageListener implements MessageListener {
  | ...
  | }
  | 

The problem really was on the sender side. As Tim pointed out, because I was 
using "/ConnectionFactory", I was really not going through the JCA adapter. As 
soon as I changed that to "java:/JmsXA", messages started flowing smoothly. So 
I am a happy camper now :-).

Couple of quick followup questions:

1) When I monitor my queue from JBoss jmx-console I see very low message 
counts, typically less that 50. I know that all my 1000 messages have been 
pumped into the queue because the call to send them has returned. I also know 
that only a handful have been received by watching the logs. So why does the 
console not show a big number in the queue?

2) In the stand-alone server use case, where is the connection factory located 
- on the JBM server or on client (i.e. a standalone application or servlet/EJB 
running on an application server)? I am assuming that it is on the client and 
you might even provide an implementation that manages a pool of connections 
just like the JCA adapter on the application server. Is this assumption correct?

Finally, I have couple of suggestions that would make the documentation a lot 
clearer - at least for me :-). I like the two diagrams in sections 3.3 and 3.4 
- they give a nice high level overview of the two use cases - standalone and 
embedded. I suggest showing an external client in the standalone case to make 
it crystal clear from where the services are accessed.

Next, I would use these diagrams as a base for explaining deeper concepts. 
Overlay them with connection factories to show where they are located and how 
many of them are there. Especially useful would be to show what we get 
"out-of-the-box". For example, I had no idea that we get the JmsXA factory 
out-of-the-box and it is a JCA factory that I can start using right away. The 
documentation leads me to believe that I got to do a #~it-load of configuration 
before I can get JCA working - which is absolutely not true.

Finally, it would be very helpful to use the diagrams to show which 
configuration file controls which piece. There are so many configuration files 
flying out there that it is confusing for a beginner. You guys have set up very 
good defaults so that a new user could get started in just 10 minutes, but it 
has taken so much energy for so many people to get a simple use case going. I 
guess if you create a 10 minute getting started guide for two use cases 
(embedded and stand-alone), that would go a long way! (The existing Quick Start 
Guide is very mechanical, it gets the examples running but leaves the reader 
without any context around what they did. Also, I was having problems getting 
the jca-config example to run because of couple of issues - I could provide 
details separately.)

I hope this is feedback constructive.

Thanks again for all your help.

Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242971#4242971

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242971
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-09 Thread nbhatia
Sorry about the double post. I did not realize that the first one had gone to 
page 2.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242737#4242737

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242737
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-09 Thread nbhatia
Hi Tim,

To answer your questions:

- I am not mixing jars from beta1/2 with beta3. I have completely separate 
JBoss installations for JBoss+JBM.BETA1 and JBoss+JBM.BETA3. The JBoss 
installations were created by running ant in JBM's config\jboss-as directory 
with appropriate versions installed. Also since my app runs on JBoss, my ear 
does not contain any JBM jars.

- I also have acceptors and connectors on my beta 3 configuration just like 
clebert. We had talked about that issue on a separate thread, so I am aware of 
it. Specifically, I have copied 
jboss-messaging-2.0.0.BETA3\examples\javaee\mdb\server\jbm-configuration.xml to 
JBOSS_HOME\server\default-with-jbm2\deploy\messaging.sar\jbm-configuration.xml.

- I tried doing a JCA configuration as you suggested, but that crashed and 
burned! Specifically, the ant task that generates default-with-jbm2 creates a 
ra.xml that is fairly close to the example in the documentation. The default 
jms-ds.xml also creates a tx-connection-factory with jndi-name = JmsXA. So I 
simply changed my jndi lookup as follows, hope that's correct:


  | jndiContext = new InitialContext();
  | connectionFactory = (ConnectionFactory)
  | jndiContext.lookup("/JmsXA");
  | 

I am not sure how to configure the listener part. Following the documentation 
example I changed my message listener as follows:


  | @MessageDriven(name = "TestMessageListener", activationConfig = {
  |  @ActivationConfigProperty(propertyName="destinationType", 
propertyValue="javax.jms.Queue"),
  |  @ActivationConfigProperty(propertyName="destination", 
propertyValue="queue/jmstest"),
  |  @ActivationConfigProperty(propertyName="acknowledgeMode", 
propertyValue="Auto-acknowledge"),
  |  @ActivationConfigProperty(propertyName="ConnectorClassName", 
propertyValue="org.jboss.messaging.integration.transports.netty.NettyConnectorFactory"),
  |  @ActivationConfigProperty(propertyName="ConnectionParameters", 
propertyValue="jbm.remoting.netty.port=5545")
  | })
  | public class TestMessageListener implements MessageListener {
  | ...
  | }
  | 

Of course, this doesn't work! I get the following exception:


  | Caused by: MessagingException[errorCode=2 message=Unable to connect to 
server using configuration 
org-jboss-messaging-integration-transports-netty-NettyConnectorFactory?jbm-remoting-netty-port=5545]
  | at 
org.jboss.messaging.core.client.impl.ConnectionManagerImpl.createSession(ConnectionManagerImpl.java:294)
  | at 
org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:962)
  | at 
org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:706)
  | at 
org.jboss.messaging.ra.JBMResourceAdapter.createSession(JBMResourceAdapter.java:1261)
  | at 
org.jboss.messaging.ra.inflow.JBMActivation.setupSession(JBMActivation.java:359)
  | at 
org.jboss.messaging.ra.inflow.JBMActivation.setup(JBMActivation.java:306)
  | at 
org.jboss.messaging.ra.inflow.JBMActivation.start(JBMActivation.java:269)
  | 

What next?

BTW, couple of questions:

1) I see that we are creating a tx-connection-factory in jms-ds.xml. Where do 
we create an "rx-connection-factory"? Do these have to be seperate and 
different?

2) Why do we have low-level details like "jbm.remoting.netty.port=5545" in 
annotations? Is there any way to avoid them. My earlier configuration simply 
had this:


  | @MessageDriven(activationConfig={
  | @ActivationConfigProperty(propertyName="destinationType", 
propertyValue="javax.jms.Queue"),
  | @ActivationConfigProperty(propertyName="destination", 
propertyValue="queue/jmstest")
  |  })
  | 

which seems quite logical, but I don't know how it figured out which connection 
factory to use. I would appreciate some clarification on this.

Thanks.
Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242736#4242736

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242736
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-09 Thread nbhatia
Hi Tim,

To answer your questions:

- I am not mixing jars from beta1/2 with beta 3. I have completely separate 
JBoss installations for JBoss 5.1.0 + JBM 2.0.0.BETA1 and  JBoss 5.1.0 + JBM 
2.0.0.BETA3. The JBoss installations were created by running ant in JBM's 
config\jboss-as directory with appropriate versions installed. Also since my 
app runs on JBoss, my ear does not contain any JBM jars.

- I also have acceptors and connectors on my beta 3 configurations just like 
clebert. We had talked about that issue on a separate thread, so I am aware of 
it. Specifically, I have copied 
jboss-messaging-2.0.0.BETA3\examples\javaee\mdb\server\jbm-configuration.xml to 
JBOSS_HOME\server\default-with-jbm2\deploy\messaging.sar\jbm-configuration.xml.

- I tried doing a JCA configuration as you suggested, but that crashed and 
burned! Specifically, the ant task that generates default-with-jbm2 creates a 
ra.xml that is fairly close to the example in the documentation. The default 
jms-ds.xml also creates a tx-connection-factory with jndi-name = JmsXA. So I 
simply changed my jndi lookup as follows:


  | jndiContext = new InitialContext();
  | connectionFactory = (ConnectionFactory)
  | jndiContext.lookup("/JmsXA");
  | 

I am not sure how to configure the listener part. Following the documentation 
example I changed my message listener as follows:


  | @MessageDriven(name = "TestMessageListener", activationConfig = {
  |  @ActivationConfigProperty(propertyName="destinationType", 
propertyValue="javax.jms.Queue"),
  |  @ActivationConfigProperty(propertyName="destination", 
propertyValue="queue/jmstest"),
  |  @ActivationConfigProperty(propertyName="acknowledgeMode", 
propertyValue="Auto-acknowledge"),
  |  @ActivationConfigProperty(propertyName="ConnectorClassName", 
propertyValue="org.jboss.messaging.integration.transports.netty.NettyConnectorFactory"),
  |  @ActivationConfigProperty(propertyName="ConnectionParameters", 
propertyValue="jbm.remoting.netty.port=5545")
  | })
  | public class TestMessageListener implements MessageListener {
  | ...
  | }
  | 

Of course, this doesn't work! I get the following exception:


  | Caused by: MessagingException[errorCode=2 message=Unable to connect to 
server using configuration 
org-jboss-messaging-integration-transports-netty-NettyConnectorFactory?jbm-remoting-netty-port=5545]
  | at 
org.jboss.messaging.core.client.impl.ConnectionManagerImpl.createSession(ConnectionManagerImpl.java:294)
  | at 
org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:962)
  | at 
org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:706)
  | at 
org.jboss.messaging.ra.JBMResourceAdapter.createSession(JBMResourceAdapter.java:1261)
  | at 
org.jboss.messaging.ra.inflow.JBMActivation.setupSession(JBMActivation.java:359)
  | at 
org.jboss.messaging.ra.inflow.JBMActivation.setup(JBMActivation.java:306)
  | at 
org.jboss.messaging.ra.inflow.JBMActivation.start(JBMActivation.java:269)
  | 

What next?

BTW, couple of questions:

1) I see that we are creating a tx-connection-factory in jms-ds.xml. Where do 
we create an "rx-connection-factory"? Do these have to be seperate?

2) Why do we have low-level details like jbm.remoting.netty.port=5545 in 
annotations? Is there any way to avoid it. My earlier configuration simply had 
this:


  | @MessageDriven(activationConfig={
  | @ActivationConfigProperty(propertyName="destinationType", 
propertyValue="javax.jms.Queue"),
  | @ActivationConfigProperty(propertyName="destination", 
propertyValue="queue/jmstest")
  |  })
  | 

which seems very logical, but I don't know how it figured out which connection 
factory to use. I would appreciate some clarification on this.

Thanks.
Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242728#4242728

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242728
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-09 Thread nbhatia
Clebert, I have now tried the same code (with the modifications you suggested) 
on 3 machines - Windows XP, Windows Vista and Windows NT. The only machine 
without the connection failures is Windows NT. XP and Vista seem to start 
giving issues after receiving 500 messages. What OS did you run your test on?

- Any other next steps you suggest?
- Can I monitor the connections somehow?
- What does the error message mean ("Connection failure has been detected Did 
not receive ping from server:3")?

Thanks.
Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242602#4242602

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242602
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-07 Thread nbhatia
Clebert, thanks for testing my app. I will try your suggestions and let you 
know if it makes any difference. Quick followup question - how do I use the JCA 
connection factory? Is there one existing in the default configuration and what 
is its JNDI name?

Thanks.
Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242277#4242277

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242277
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re:

2009-07-06 Thread nbhatia
Done.

https://jira.jboss.org/jira/browse/JBMESSAGING-1677

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242032#4242032

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242032
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - "Connection failure has been detected" message

2009-07-05 Thread nbhatia
I am having trouble receiving messages reliably using JBM 2.0.0.BETA3 deployed 
in JBoss AS 5. Every once in a while I am getting a "Connection failure has 
been detected" message and then I start loosing messages. Can someone help me 
identify the issue?

I have simplified my web application down to the bare bones. At this point I 
can send 1000 messages as fast as I can and then see if I receive all of them. 
Few times I have gotten all 1000, but several times I get much less, say about 
600. I get the following warnings in between:


  | 22:58:26.968 WARNING [Thread-44 (group:JBM-client-global-threads-27401341)] 
[org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl] Connection 
failure has been detected Did not receive ping from server:3
  | ...
  | 23:02:56.984 WARNING [Thread-3 (group:JBM-scheduled-threads-10153586)] 
[org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl] Connection 
failure has been detected Did not receive ping from client. It is likely a 
client has exited or crashed without closing its connection, or the network 
between the server and client has failed. The connection will now be closed.:3
  | 23:02:56.984 WARNING [Thread-3 (group:JBM-scheduled-threads-10153586)] 
[org.jboss.messaging.core.server.impl.ServerSessionImpl] Client connection 
failed, clearing up resources for session ceb2cc8d-69d8-11de-9025-0016d433fcb5
  | 23:02:57.000 WARNING [Thread-3 (group:JBM-scheduled-threads-10153586)] 
[org.jboss.messaging.core.server.impl.ServerSessionImpl] Cleared up resources 
for session ceb2cc8d-69d8-11de-9025-0016d433fcb5
  | 

The message listener code is as simple as this:


  | @MessageDriven(activationConfig={
  | @ActivationConfigProperty(propertyName="destinationType", 
propertyValue="javax.jms.Queue"),
  | @ActivationConfigProperty(propertyName="destination", 
propertyValue="queue/jmstest")
  |  })
  | public class TestMessageListener implements MessageListener {
  | 
  | private static final Logger logger =
  | LoggerFactory.getLogger(TestMessageListener.class);
  | 
  | @Override
  | public void onMessage(Message message) {
  | 
  | if (message instanceof TextMessage) {
  | String messageText = null;
  | try {
  | messageText = ((TextMessage)message).getText();
  | logger.debug("Received message: {}", messageText);
  | }
  | catch (JMSException e) {
  | throw new RuntimeException(e);
  | }
  | }
  | }
  | }
  | 

I can send my small Maven project if someone could try it out.

Thanks.
Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241878#4241878

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241878
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: MessagingException when deploying ear

2009-07-05 Thread nbhatia
Clebert, thanks so much for the pointers. You are correct, the default 
configuration in beta3 does not contain either the in-vm connector or the 
acceptor. After adding both, the exception went away.

Just out of curiosity, is this intentional? I would prefer that the default 
configuration worked right out of the box. I know JMS, but having to learn 
about acceptors, connectors and configuration is yet another impediment for 
noobs to adopt JBM. In any case, JBM 2.0 is looking like a great product in the 
making. Keep up the good work!

Thanks.
Naresh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241873#4241873

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241873
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - MessagingException when deploying ear

2009-07-05 Thread nbhatia
I am getting the following MessagingException when I deploy my ear. I am using 
JBoss Messaging 2.0.0.BETA3. Any idea why this could be happening? (The same 
ear on another machine with JBM 2.0.0.BETA1 is working just fine.)


  | org.jboss.deployers.spi.DeploymentException: Endpoint activation failed 
ra=jboss.jca:service=RARDeployment,name='jms-ra.rar' 
activationSpec=org.jboss.messaging.ra.inflow.JBMActivationSpec(ra=org.jboss.messaging.ra.jbmresourceadap...@673a6164
 destination=queue/exchange.to.bfseam.fix.queue destinationType=javax.jms.Queue 
tx=true durable=false user=null maxMessages=1 minSession=1 maxSession=15 
keepAlive=6)
  | at 
org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
  | at 
org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.activate(JBossMessageEndpointFactory.java:346)
  | at 
org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:212)
  | at 
org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:224)
  | at 
org.jboss.ejb3.mdb.MessagingContainer.lockedStart(MessagingContainer.java:176)
  | at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:884)
  | 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.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
  | at 
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
  | at 
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
  | at 
org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
  | at 
org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
  | at 
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
  | at 
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
  | at 
org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
  | at 
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
  | at 
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
  | at 
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
  | at 
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
  | at 
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
  | at 
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  | at 
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
  | at 
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  | at 
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
  | at 
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  | at 
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
  | at 
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
  | at 
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
  | at 
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
  | at 
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
  | at 
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
  | at 
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
  | at 
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
  | at 
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
  | at 
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
  | at 
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
  | at 
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
  | at 
org.jboss.dependency.plugins.AbstractControllerContext.install(Abst

[jboss-user] [JBoss Messaging] - Re: Can't control queues from jconsole

2009-06-28 Thread nbhatia
Thanks Jeff. That worked for me.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240556#4240556

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240556
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Can't control queues from jconsole

2009-06-26 Thread nbhatia
How do I look up queues in JBoss JMX console? I click jboss.messaging then 
name=JMSProvider,service=JMSProviderLoader, but I don't see any queues under 
there. At least with jconsole I was able to get to the queues quite easily.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240332#4240332

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240332
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Can't control queues from jconsole

2009-06-25 Thread nbhatia
I am not able to operate on any of my queues from jconsole. For example, 
clicking on listAllMessages gives the following error:

Problem invoking listAllMessages: UnmarshallException...
Nested Exception: ClassNotFoundException: org.jboss.messaging.utils.SimpleString

What am I missing? Is there a better tool to monitor and control JBoss 
Messaging?

I am running JBoss Messaging 2.0 .0.BETA1 embedded in JBoss 5.0.1.GA

Naresh


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240181#4240181

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240181
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: Can process and task variables be defined in the process

2008-10-14 Thread nbhatia
I have not seen any reference to such functionality in the manual or on the 
web. The jpdl schema also suggests that this is not possible. I am fairly 
certain that such a feature will improve the usability of jBPM as it provides 
an easy way to provide "personality" to processes and tasks at process 
definition time. Currently I see very specific handlers that can attach to a 
task with predefined semantics. What if I can attach a variable instead, say a 
variable called "form" whose value specifies the form I need to trigger in 
order to work on the task. Now my front-end can easily dispatch forms to take 
care of any task. Currently I am keeping such mappings externally and there is 
quite a bit of machinery needed to make this work. (I am using the process name 
plus the task name to create a unique key which maps to a form name. 
Unfortunately getting the process name from a task instance is quite expensive 
as it involves traversing through process instance and then process defini!
 tion.)

Any thoughts from the committers?

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182254#4182254

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182254
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Can process and task variables be defined in the process def

2008-10-14 Thread nbhatia
I understand that process and task variables exist on process instances and 
task instances. However, is there a way to define them in a process definition? 
This would allow us to create a predefined variable whenever a process instance 
or a task instance is created from a process definition. Is it possible to do 
this or have I missed something?

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182113#4182113

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182113
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: Finding all running process instances for a process defi

2008-10-07 Thread nbhatia
Ah ok! That was the missing link I was looking for. Still getting used to the 
API. Thanks so much.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180907#4180907

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180907
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Finding all running process instances for a process definiti

2008-10-07 Thread nbhatia
How do I find all running process instances for a process definition? I tried 
GraphSession.findProcessInstances(long processDefinitionId), but this method 
returns all process instances including those that have ended (potentially a 
very expensive query).

I found the following named query in hibernate.queries.hbm.xml. This is exactly 
what I need, but I cannot find any method in the source that uses this query.


  |   
  | 
  |   
  | 
  | 

Can someone tell me how I can leverage this query? (I am using jBPM 3.2.3).

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180894#4180894

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180894
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: Differntiationg between types of tasks

2008-09-22 Thread nbhatia
Thanks Ronald, I will take a look at Seam/jBPM integration.

BTW, I just tried to follow the examples included with jBPM Console and they do 
exactly what I am looking for. For example, the task_all.xhtml page shows all 
tasks and when any of the task links is pressed, the appropriate form is 
brought up. It appears that this is done using a forms.xml file which maps task 
to forms. The jBPM user's manual does not seem to describe this functionality. 
Any idea where this feature is documented?

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178057#4178057

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178057
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: Differntiationg between types of tasks

2008-09-20 Thread nbhatia
Ah yes, that will work :-). Thanks. It does involve an if-then-else though, so 
wasn't sure if I was missing some better way of doing this.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4177855#4177855

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4177855
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Differntiationg between types of tasks

2008-09-20 Thread nbhatia
I am developing an application where I need to show a task list for the user 
who is logged in. Tasks can be of different types, e.g. Fill out a W2 form vs. 
Submit your timecard (they may belong to one of several workflows). Each task 
is presented as a link which takes the user to a completely different area on 
the web site. How can this be implemented with jBPM? I understand that I can 
query jBPM to return tasks that belong to the same actorId, but how do I 
differentiate between the tasks so I can do different things in each case?

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4177833#4177833

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4177833
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Persisting POJO entities defined in a different jar

2008-07-21 Thread nbhatia
Here you go...


  | 
  | http://java.sun.com/dtd/application_1_3.dtd";>
  | 
  |   estore-app
  |   
  | estore-server-1.0.jar
  |   
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165641#4165641

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165641
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Persisting POJO entities defined in a different jar

2008-07-20 Thread nbhatia
I have an existing jar file containing POJO entities (no JPA annotations, no 
persistence.xml). I would like to persist there entities using a new EJB jar 
file which contains a persistence.xml and a mapping file. Is this possible? I 
tried it, but I am getting a InvalidMappingException:


  | Caused by: org.hibernate.InvalidMappingException: Could not parse mapping 
document from resource mappings.xml
  | at 
org.hibernate.cfg.Configuration.addResource(Configuration.java:569)
  | at 
org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:910)
  | ... 101 more
  | Caused by: org.hibernate.AnnotationException: Unable to load class defined 
in XML: samples.estorejpa.domain.Customer
  | at 
org.hibernate.cfg.AnnotationConfiguration.add(AnnotationConfiguration.java:592)
  | at 
org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:674)
  | at 
org.hibernate.cfg.Configuration.addResource(Configuration.java:566)
  | ... 102 more
  | Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: 
samples.estorejpa.domain.Customer
  | at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
  | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
  | at java.lang.Class.forName0(Native Method)
  | at java.lang.Class.forName(Class.java:247)
  | at 
org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:112)
  | at 
org.hibernate.reflection.java.JavaXFactory.classForName(JavaXFactory.java:153)
  | at 
org.hibernate.cfg.AnnotationConfiguration.add(AnnotationConfiguration.java:589)
  | ... 104 more
  | 

Here are the relevant files in my ear. estore-common-1.0.jar contains the POJO 
entities. estore-server-1.0.jar is the EJB jar that contains persistence.xml, 
mappings.xml and and a stateless session bean called OrderServiceBean. I was 
hoping that the POJO entity classes would be visible when parsing 
persistence.xml because they are in the classpath, but that does not seem to be 
true.


  | estore-1.0.ear
  | |---estore-common-1.0.jar
  | |---estore-server-1.0.jar
  | |   |---mappings.xml
  | |   |---META-INF
  | |   |   |---ejb-jar.xml
  | |   |   |---jboss.xml
  | |   |   `---persistence.xml
  | |   `---samples
  | |   `---estorejpa
  | |   `---service
  | |   |---OrderService.class
  | |   `---OrderServiceBean.class
  | `---META-INF
  | application.xml
  | 

Here's my persistence.xml:


  | 
  | 
  | java:/estore
  | mappings.xml
  | 
  | 
  | 
  | 
  | 
  | 

Here's my mappings.xml:


  | 
  | eStore JPA Mappings
  | samples.estorejpa.domain
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | ...
  | 
  | 

Any help would be much appreciated.

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165541#4165541

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165541
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Accessing EJB3 without a home interface

2008-07-19 Thread nbhatia
Answering my own question :-). This is how I was able to do it:


  | 
  | 
  | 
  | 
  | HelloWorldBean
  | HelloWorld
  | 
  | 
  | 
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165496#4165496

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165496
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Accessing EJB3 without a home interface

2008-07-19 Thread nbhatia
Thanks Andrew. I was able to use @RemoteBinding to control the JNDI name. Now I 
would like to move this specification only to jboss.xml. However, I could not 
find much documentation around it. I have already looked through the following 
URLs

  | * 
http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_extensions.html
  | * 
http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_deployment_descriptor.html
  | * 
http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/partial_deployment_descriptors.html
  | 
Any help would be greatly appreciated.

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165487#4165487

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165487
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Accessing EJB3 without a home interface

2008-07-13 Thread nbhatia
Thanks Andrew. That was the issue! So I have couple of follow up questions:

1) Is this JNDI name (helloworldejb3-app-1.0/HelloWorldBean/remote) 
implementation specific? Is there any way to give it a more user friendly JNDI 
name, such as "HelloWorld"?

2) Is there a nicer way to get a reference to the EJB in the client? As you can 
see, I am explicitly creating a context and using it to look us the bean. Can 
@EJB or @Resource annotations be used on the remote client to lookup the EJB or 
the Context?

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164087#4164087

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164087
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Accessing EJB3 without a home interface

2008-07-13 Thread nbhatia
According to the EJB 3.0 Spec:

anonymous wrote : 
  | The requirement for Home interfaces has been eliminated. Session beans are 
no longer required to have home interfaces. A client may acquire a reference to 
a session bean through one of the mechanisms described in Chapter 8.
  | 

I am trying to do exactly that, i.e. to access an EJB 3 from a remote client 
without a home interface. However I am getting a NameNotFoundException. Can 
someone help me understand how to do this?

Here's my session bean interface:


  | public interface HelloWorld {
  | public String getHelloMessage();
  | }
  | 

Here's the implementation:


  | @Stateless @Remote
  | public class HelloWorldBean implements HelloWorld {
  | 
  | public String getHelloMessage() {
  | return "Hello World";
  | }
  | }
  | 

Here's the call from the client:


  | public class HelloWorldEjb3Client {
  | 
  | public static void main(String[] args) {
  | 
  | try {
  | // Look up the HelloWorld home interface
  | Object obj = getContext().lookup("HelloWorld");
  | HelloWorld helloWorld =
  | (HelloWorld)javax.rmi.PortableRemoteObject.narrow(obj, 
HelloWorld.class );
  | 
  | // Start using the HelloWorld object
  | System.out.println(helloWorld.getHelloMessage());
  | }
  | catch (Exception e) {
  | e.printStackTrace();
  | }
  | }
  | 
  | public static final Context getContext() throws 
javax.naming.NamingException {
  | System.out.println("Connecting to JBoss");
  | Hashtable env = new Hashtable();
  | env.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
  | env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
  | env.put("java.naming.factory.url.pkgs", 
"org.jboss.naming:org.jnp.interfaces");
  | return new InitialContext(env);
  | }
  | }
  | 

The exception is:


  | javax.naming.NameNotFoundException: HelloWorld not bound
  | 

Here's my ejb-jar.xml. It is essentially empty. I created it just because the 
Maven EJB Plugin was complaining that it could not find a ejb-jar.xml. Since I 
am using annotations, I don't believe that I should require this file.


  | 
  | 
  | http://java.sun.com/xml/ns/javaee";
  | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd";
  | version="3.0">
  | 
  | 

Looking at the JNDI tree, I believe that the HelloWorld bean has been deployed:


  | Global JNDI Namespace
  |   +- helloworldejb3-app-1.0 (class: org.jnp.interfaces.NamingContext)
  |   |   +- HelloWorldBean (class: org.jnp.interfaces.NamingContext)
  |   |   |   +- remote (proxy: $Proxy64 implements interface 
samples.helloworldejb3.HelloWorld,interface org.jboss.ejb3.JBossProxy)
  | 

So what is the right way to access this bean from a remote client?

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164064#4164064

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164064
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Service-Oriented Architecture and Seam

2007-01-08 Thread nbhatia
Thanks Gavin. I will start by creating a loosely-coupled (SOA) application and 
see how far I can take it. I will post on the forums in case I have questions 
or need clarifications.

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999148#3999148

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999148
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Service-Oriented Architecture and Seam

2007-01-04 Thread nbhatia
Thanks hstang and Norman for your opinions - very informative and useful.

And yeah, Norman, I will "feel free to join in" as soon as I can :-), currently 
very busy with two other open source projects. BTW, I totally agree with your 
comment about over-architecting applications when there is absolutely no need 
to do so - this is so true for web applications. Fortunately or unfortunately, 
in my line of work there is 50-50 mix of web apps and enterprise apps (with 
Swing and other thick front-ends). So at least for me I cannot ignore entrprise 
apps and SOA. I would love to hear Gavin's comments and direction on this - at 
least before I jump in with both my feet :-).

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998029#3998029

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998029
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Service-Oriented Architecture and Seam

2007-01-03 Thread nbhatia
I am a newbie to Seam and just getting started with it. First of all, I would 
like to commend Gavin for putting together a bold and compelling architecture 
that is indeed groundbreaking. The concepts around Seam contexts and use of 
stateful session beans to save state indeed yield a very simple and elegant 
design. Thanks Gavin!

Having said that, I have a few questions about Seam's support for 
Service-Oriented Architectures. Looking at the booking example, I see that 
views have direct access to action beans (such as HotelBookingAction) and 
entity beans (such as Hotel). Also, business logic is generally embedded in the 
action beans. So here are my questions:

1) Looking through the SOA lens, can the action beans be thought of as 
services? For example, would it be ok to think of HotelBookingAction as 
HotelBookingService?

2) From a layered architecture perspective, do you think of the action beans as 
presentation-tier or middle-tier? I ask this because action beans seem to have 
presentation logic, e.g. the actions return navigation outcomes. Where is the 
boundary between the two layers?

3) How would one implement a physically separate front-end (say using Swing) 
that would access the booking application via a stateless web service. I know 
the docs say that ?you get to architect your own application and decide what 
the layers are and how they work together?, but it would be nice to have a real 
example showing these patterns.

Once again, I am very impressed with the Seam framework. Answers to the above 
questions will make me feel even more comfortable.

Thanks.
Naresh

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997681#3997681

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997681
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Showing updated entity on postback

2006-12-27 Thread nbhatia
Correct - the child is added fine, but the rendered page does not show the 
newly added child. The reason is that the Thread and Posts are fetched from the 
database during the Apply Request Values phase, and only later in the Invoke 
Application phase the new Post is inserted.

Here's the source for the rendered page - Thread.xhtml:


  | 
  | 
  | 
  | 
  | 
  | Thread
  | 
  | 
  | 
  | 
  | #{threadHome.instance.title}
  | 
  | 
  | 
  | 
  | 
  | #{post.body}
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  |   
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

This is ThreadHome:


  | @Name("threadHome")
  | public class ThreadHome extends EntityHome {
  | 
  | @In(value = "#{forumHome.instance}", required = false)
  | Forum forum;
  | 
  | public void setThreadId(Long id) {
  | setId(id);
  | }
  | 
  | public Long getThreadId() {
  | return (Long) getId();
  | }
  | 
  | @Override
  | protected Thread createInstance() {
  | Thread result = new Thread();
  | result.setForum(forum);
  | return result;
  | }
  | 
  | public List getPosts() {
  | return getInstance() == null ? null : new 
ArrayList(getInstance()
  | .getPosts());
  | }
  | 
  | }
  | 

and finally here's PostHome, which contains the persist action which is called 
from Thread.xhtml.


  | @Name("postHome")
  | public class PostHome extends EntityHome {
  | 
  | @In(value = "#{threadHome.instance}", required = false)
  | Thread thread;
  | 
  | public void setPostId(Long id) {
  | setId(id);
  | }
  | 
  | public Long getPostId() {
  | return (Long) getId();
  | }
  | 
  | @Override
  | protected Post createInstance() {
  | Post result = new Post();
  | result.setThread(thread);
  | return result;
  | }
  | 
  | @Override
  | public String persist() {
  | if (this.instance.getDateCreated() == null) {
  | this.instance.setDateCreated(new java.util.Date());
  | }
  | return super.persist();
  | }
  | }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996574#3996574

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996574
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Showing updated entity on postback

2006-12-27 Thread nbhatia
I have created a seam application using seam-gen. I have a page that displays a 
master entity and its children. The page also allows the user to add a new 
child. However, when I click the submit button on the page to add the new 
child, the finally rendered page does not show this child. The reason is that 
the database is queried BEFORE the child is inserted. See below:


  | 17:22:47,702 INFO  [STDOUT] before - RESTORE_VIEW(1)
  | 17:22:47,749 INFO  [STDOUT] after - RESTORE_VIEW(1)
  | 17:22:47,765 INFO  [STDOUT] before - APPLY_REQUEST_VALUES(2)
  | 17:22:47,780 INFO  [STDOUT] Hibernate: select thread0_.ID as ID161_0_, 
thread0_.TITLE as TITLE161_0_, thread0_.FORUM_FKas FORUM3_161_0_ from 
chalktalk.thread thread0_ where thread0_.ID=?
  | 17:22:47,780 INFO  [STDOUT] Hibernate: select posts0_.THREAD_FK as 
THREAD4_1_, posts0_.ID as ID1_, posts0_.ID as ID160_0_, posts0_.BODY as 
BODY160_0_, posts0_.THREAD_FK as THREAD4_160_0_, posts0_.DATE_CREATED as 
DATE3_160_0_ from chalktalk.post posts0_ where posts0_.THREAD_FK=?
  | 17:22:47,812 INFO  [STDOUT] after - APPLY_REQUEST_VALUES(2)
  | 17:22:47,812 INFO  [STDOUT] before - PROCESS_VALIDATIONS(3)
  | 17:22:47,859 INFO  [STDOUT] after - PROCESS_VALIDATIONS(3)
  | 17:22:47,859 INFO  [STDOUT] before - UPDATE_MODEL_VALUES(4)
  | 17:22:47,905 INFO  [STDOUT] after - UPDATE_MODEL_VALUES(4)
  | 17:22:47,905 INFO  [STDOUT] before - INVOKE_APPLICATION(5)
  | 17:22:48,015 INFO  [STDOUT] Hibernate: insert into chalktalk.post (BODY, 
THREAD_FK, DATE_CREATED, ID) values (?, ?, ?, ?)
  | 17:22:48,046 INFO  [STDOUT] after - INVOKE_APPLICATION(5)
  | 17:22:48,093 INFO  [STDOUT] before - RENDER_RESPONSE(6)
  | 17:22:48,249 INFO  [STDOUT] after - RENDER_RESPONSE(6)
  | 

How do I solve this issue/ I would like the newly rendered page to show the 
inserted child.

Thanks.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996537#3996537

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996537
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user