[JBoss-user] [JBossWS] - Re: jbossws + standalone tomcat

2006-06-21 Thread hfarid
what about : 
jbossws-core.jar
jbossws-tomcat-integration.jar


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3952346#3952346

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3952346


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBossWS] - jbossws and jetty

2006-06-21 Thread hfarid
Can jbossws be installed on top of jetty ? how? I am kinda stuck with jetty 
and prefer to continue with jbossws rather than going with axis

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3952475#3952475

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3952475

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBossWS] - jbossws + standalone tomcat

2006-06-16 Thread hfarid
Where can I find the jars to be used for integrating jbossws and tomact 
inhttp://labs.jboss.com/portal/jbossws/user-guide/en/html/installation.html#install-tomcat

Do I have to do any other configuration after following the jbossws guid steps? 
any surprises ??

Thanks for your help


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3951427#3951427

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3951427


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - TimesTen Dialect

2006-05-02 Thread hfarid
Which dialect should I be using with timesten 6.6
I used org.hibernate.dialect.TimesTenDialect but I am getting all sorts of 
errors when trying to deploy JbossPortal on it TT3105 Error Description says 
The value passed for the First n clause was negative or zero  so I stopped 
using TT for the portal

When I used timesten for my usual CMP (which are working fine on MySQL and 
Oracle 10g) I am getting errors in many diffrent situation

  | ava.sql.SQLException: [TimesTen][TimesTen 6.0.2 ODBC 
Driver][TimesTen]TT7025: Illegal use of reserved keyword UNION, character 
position: 2209 -- file ptSqlY.y, lineno 6374, procedure reserved_word_error: 
error
  | 

Should I use diffrent dialect?? how stable is TimesTenDialect??


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3940808#3940808

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3940808


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: how to get entitymanager within MBean

2006-03-31 Thread hfarid
I found some answers (after one long night and tons of coffee :-) )
- To declare the dependancy between SAR and PAR within the same ear file
in your jboss-service.xml (within the sar]

  | server
  | mbean code=com.bla.bla.MYService name=bla.bla:service=MYS
  | dependsjboss.j2ee:service=EJB3,module=put your par file 
here/depends
  | /mbean
  | /server
  | 

- To access the entity manager from MBean
First you need to advertise your entity manager factor
in your persistance.xml

  | property name=jboss.entity.manager.jndi.name 
value=java:/EntityManagers/myem/
  | property name=jboss.entity.manager.factory.jndi.name 
value=java:/EntityManagersFactory/myemFac/
  | 

In the service MBean , override startService(). lookup your entity manager 
factory and call createEntityManger to get yourself an instance of the em I 
created EXTENDED em and it worked for me


Why I am doing all of that... here is the problem I am trying to solve (if you 
know better solution, please share it with all of us)
- I have to maintain a graph, the graph vertcies and the edges are persisted in 
the db using EJB3 entity beans
- my clients (lots of concurrent ones), are travesing portions of the graph, 
updating information in the graph
- The first solution was to use optimistic locks (@version) that killed me 
as some portion of the graph was being updated by multiple clients at the same 
time  lots and lots of exceptions

- Second solution. In a ServiceMBean, I instantiated a JGraph, loaded all my 
entities into the JGraph

- my clients can call methods of a SLSB that forward the call to the service 
MBean
- In the MBean I am controlling the locking mechanism using semaphores per 
vertex/Edge


Problems with my solution:
- In cluster deployment, how can I replicate my JGraph information??



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3934018#3934018

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3934018


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - how to get entitymanager within MBean

2006-03-27 Thread hfarid
As the subject stated, I am trying to get access to my entity manager within 
Service MBean. The entity manager life time is associated with the life time 
with the service MBean

my par and sar are packaged within the same ear, how can I declare dependancy 
of the sar on the par (dependancy on the entity manager)


Thanks

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3933015#3933015

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3933015


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBossWS] - JBossWS tutorial

2006-03-19 Thread hfarid
The title says it all
I am looking for a simple tutotrial that would help me in kicking start the 
project I am working on

Here is what I want to do
- EJB3 SLSB support webserviec
- .Net client to the webservice
- secure (authintication should be enought) the communication between my 
webservice and the .Net client

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3931240#3931240

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3931240


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Disable JMS message persistance

2006-02-16 Thread hfarid
Setup: Jboss 4.03 + ejb3

MDB configuration

  | @MessageDriven(activateConfig =
  | {
  | @ActivationConfigProperty(propertyName=destinationType, 
propertyValue=javax.jms.Queue),
  | @ActivationConfigProperty(propertyName=destination, 
propertyValue=queue/queueX),
  | @ActivationConfigProperty(propertyName=durability, 
propertyValue=NON_DURABLE), //NON_DURABLE
  | @ActivationConfigProperty(propertyName=minPoolSize, 
propertyValue=10),
  | @ActivationConfigProperty(propertyName=maxPoolSize, 
propertyValue=20)
  | })
  | public class MyMsgListener implements MessageListener
  | 

I am using MySql as the persistance for JMS

On my client side (msg genrator)

  | msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
  | 

By looking at mysql log, I can see every single message sent is being stored in 
the db before forwarding it to the MDB instance

How can I stop this behavior completly, I want my msg to be in memory only?

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3924330#3924330

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3924330


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - monitoring EJB3 performance

2006-01-19 Thread hfarid
I have a full application built on top of ejb3, the application inludes
- stateless session beans
- statefull session bean
- MDB
- MBean service
- JCA
- web front (jsp/servlet)
- deployed in clustered configuration

The whole thing is packaged in a single .ear file

I would like to monitor my ejb performance (how many time the methods are 
getting called, how long it took, throughput...)

I know the answer might be web-console but
- J2EE Domain - Manager - JBoss - abc.ear is displying that Provide 
statstics = false
 - J2EE Domain - Manager - JBoss - abc.ear is only showing the war file 
packaged inside (it ignores .par, .ejb3,.sar)

Is it possible to collect the information I am looking for ? If not, do you 
recommend any specific way based on your experiance
If web-console is the way to go, how can I enable statstics collection and how 
can I collect them

Thanks
Hamdy

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3918557#3918557

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3918557


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: SchemaExport - how do i stop it from running?

2006-01-19 Thread hfarid
you should not be using hsqldb for persisting your data (there are a lot of 
articls against using hsqldb for anything... in the end it's your call)

in persistance.xml

  | entity-manager
  |   nameabc/name 
  |   jta-data-sourcejava:/DefaultDS/jta-data-source 
  |  properties
  | ...
  | ...
  |   property name=hibernate.hbm2ddl.auto value=update / 
  |   /properties
  |   /entity-manager
  | 
this will update your schema in case of a change, you can replace update with 
none so hibernate will not touch your schema and you would get an exception 
the first time you try to access an object with mismatch persistance layout

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3918559#3918559

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3918559


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: Disabling clustering

2006-01-19 Thread hfarid
I spent so much time on option 2  in the end I gave up
I had better luck with option 1

This is what I did (hopfully it would work for you)
- delete all/deploy-hasigliton
- copy default/deploy/jms to all/deploy
- delete all/farm
- delete all/deploy.last
- delete all/deploy/cluster-service.xml
- delete all/deploy/deploy-hasigleton-service.xml

If you get any deployment errors, please post them as they might remind me with 
a step I forgot to mention 

Another way of isolating each of your jboss servers is to specify the partition 
name, there should not be any interfering between partitions with diffrent names

you can use the machine name as a unique name for the parition
for a machine abcd, you would start jboss as follows
./run.sh -Djboss.partition.name=abcd -c all



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3918560#3918560

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3918560


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Clustering/JBoss] - HA deployment on blade servers

2006-01-05 Thread hfarid
All,
Currently I am looking into this type pf deployment to provide HA application. 
After couple of weeks of investigation I came up with a theory of how the 
deployment model would be. Before I go ahead and go on in my project, I would 
like to get your feedback on that matter (real experiance is far better than 
theories :-) )



- Database
The plan is to use clustred MySQL with x no of nodes (blades)

- AS
Jboss 4.03 + ejb3, running in a clustred deployment on y number of nodes 
(blades)
All the AS are conntectd to the same MySQL cluster

Questions:
- First. Is this deployment configuration possible?
- To address the clusterd MySQL, I have to specify , seprated host/port in 
the uri. Will jboss accept this in the -ds.xml?
- In case of a filure in the active MySQL, MySQL will throw exception (switch 
over is not 100% transparent)... will this exception be treated as other 
Transaction-Retry exception?
- (I know the answer of this one but I will ask it to be on the safe side) In 
case of datbase lock time-out, will the AS retry the transaction (ex. call my 
stateless session bean method AGAIN)
- As a part of the appliction I have in-band JCA (converts socket requests into 
JMS to be processed later on by MDB), how can I make this part of the 
application HA ???
- MDB can be deployed in clustred mode but how can I make the JMS queue itself 
HA?


Thanks in advance for your help
Hamdy

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3915764#3915764

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3915764


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - clustred ejb3 MDB

2006-01-05 Thread hfarid
After a long day of digging the documentation and every posting I could not 
figure out what is the problem

After a failure of the master node, the MDB on the slave simply does not 
connect to the queue

my setup
Node 1 : jboss 4.03+ejb3 in all mode, windows XP prof.
Node 2: same but on linux machine
(The configuration of the two instances are identical)

I switch my DeafultDS from hypersonic to Mysql, that is used by both servers 
(in order to persist the messages in the same place)

My MDB:

  | /**
  |  * 
  |  */
  | @Clustered(partition=ASM)
  | @MessageDriven(activateConfig =
  | {
  | @ActivationConfigProperty(propertyName=destinationType, 
propertyValue=javax.jms.Queue),
  | @ActivationConfigProperty(propertyName=destination, 
propertyValue=queue/haq)
  | })
  | public class HaQListener implements MessageListener{
  | public void onMessage(Message msg) {
  | 


I defined my queue in 
server/all/deploy-hasingleton/jms/jbossmq-destinations-service.xml as follows


  |  mbean code=org.jboss.mq.server.jmx.Queue 
name=jboss.mq.destination:service=Queue,name=haq
  | depends 
optional-attribute-name=DestinationManagerjboss.mq:service=DestinationManager/depends
  | /mbean
  | 

Note. jbossmq-destinations-service.xml is identical on both nodes

Everything is alright untile the master (the one started first) dies
on the other node I can see the following exception periodically

  | 17:47:05,861 INFO  [MDB] Trying to reconnect to JMS provider
  | 17:47:15,867 ERROR [MDB] Reconnect failed: JMS provider failure detected:
  | javax.naming.NameAlreadyBoundException
  | at org.jnp.server.NamingServer.bind(NamingServer.java:129)
  | at org.jnp.interfaces.NamingContext.bind(NamingContext.java:551)
  | at org.jnp.interfaces.NamingContext.bind(NamingContext.java:516)
  | at org.jboss.util.naming.Util.bind(Util.java:87)
  | at org.jboss.util.naming.Util.bind(Util.java:74)
  | at 
org.jboss.ejb3.EJBContainer.resolveInjectors(EJBContainer.java:479)
  | at org.jboss.ejb3.EJBContainer.initializePool(EJBContainer.java:421)
  | at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:374)
  | at org.jboss.ejb3.mdb.MDB.start(MDB.java:223)
  | at 
org.jboss.ejb3.mdb.MDB$ExceptionListenerImpl.onException(MDB.java:1187)
  | at 
org.jboss.mq.Connection$ExceptionListenerRunnable.run(Connection.java:1366)
  | at java.lang.Thread.run(Thread.java:595)
  | 17:47:15,867 INFO  [MDB] Trying to reconnect to JMS provider
  | 
  | 

I removed the queue defination frm the slave (destination...xml), same issue 
with the same exception

After the master dies, I tried to connect to my queue using HA-JNDI lookup and 
I was able to do, actually I was able to submit messages on the queue

Thanks in advance for your help

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3915961#3915961

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3915961


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - Re: MDB and exceptions

2005-10-04 Thread hfarid
You are right, I am trying to remove a CMP entity bean and it causing me a lot 
of problems (check my other posting 
http://www.jboss.org/index.html?module=bbop=viewtopict=70310)



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3898935#3898935

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3898935


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - Re: How to specify the number of messsages I need?

2005-10-04 Thread hfarid
I have a similar situation and I resolved it as follows:
- the MDB is able to process single messages (encapsulated in ObjectMessage)
-  the MDB is able to process linked list of messages

Note. To preserve the ordering you have to adjust your MDB to be singelton 
(tradeoff with performance, it's you call in this case) 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3898937#3898937

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3898937


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - Re: Remove CMP bean fail if called within MDB

2005-10-04 Thread hfarid
After more reading, I reliazed that I am getting myself into dist transaction 
domain so I did the following:
- Implemented SessionSynchronization in my stateful session bean.
- Modified my business methods to cache the JMS messages in a member of the 
session bean.
- in afterCompletion() I am submitting the JMS messages to the queue (changed 
it back to XConnFactory instead of JmsXA)
- On the MDB side, I can read attributes from my entity beans but when I try to 
remove it , it thows ClassCastException on the PK class

My PK class is basically an Integer generated by xdoclet

Anybody help ... PLEASE.

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3898997#3898997

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3898997


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - Re: Remove CMP bean fail if called within MDB

2005-10-04 Thread hfarid
Yet another LOW point in my career as software designer.
I found what was the problem and it has nothing to do with transactions

I was doing remoteHome.remove(remoteInterface) which is failing becuase it 
expects a PrimaryKey (that's explain the Cast error).

I don't know which transaction model should I follow 
- use JmsXA and enlist the JMS in the transaction [ I noticed sometimes 
the following message

18:56:47,578 WARN [TxConnectionManager] Prepare called on a local tx. Use of 
local
  | transactions on a jta transaction with more than one branch may result in 
inconsistent
  | data in some cases of failure. 
 
- use afterCompletion(true) to send my JMS 

Thanks for your help


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3899048#3899048

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3899048


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - MDB and exceptions

2005-10-03 Thread hfarid
As far as I understand from all the other postings, MDB should NEVER throw any 
exceptions bcause this will trigger retry.

In my MDB, I am catching all the exceptions which can be thrown
I debugged my MDB and reached the return line of the onMessage() method. I even 
wrapped my code with try{}catch(Throwable e)

How can I stop the messages from being resent

Setup:
Solaris 10 (blade 1500)
JBoss 4.0.2
JDK 5

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3898814#3898814

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3898814


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - Remove CMP bean fail if called within MDB

2005-10-03 Thread hfarid
I am trying to remove an instance of a CMP entity bean.

The entity bean PK looks like

/**
  |* @ejb.pk-field
  |* @ejb.persistence column-name=id jdbc-type=INTEGER sql-type=SERIAL
  |* @jboss.persistence auto-increment=true
  |* @ejb.interface-method view-type=both
  |* @ejb.transaction type=Supports
  |*/
  |   public abstract Integer getId();
  | 
  |   /**
  |* @ejb.interface-method view-type=both
  |*/
  |   public abstract void setId(Integer id);
  | 
  | 

The following tags are added to the entity to allow genrating the ids
 * @jboss.entity-command name=informix-serial 
class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCInformixCreateCommand
  |  * @jboss.entity-command-attribute name=method value=getSerial
  | 


every time I try to execute a remove on the remote/local home, I get 

ERROR [STDERR] javax.transaction.TransactionRolledbackException: Internal error 
getting primary key field member id; CausedByException is:
  | null; nested exception is: 
  | javax.ejb.EJBException: Internal error getting primary key field member 
id; CausedByException is:
  | null

To be more specific on how the remove call is reached
- a stateful session bean create the entity in the DB
- within the same session bean method, a JMS message is sent to JmsXA queue for 
further processing (JmsXA is used to make sure the messages will be sent AFTER 
commiting the DB creation)
- the MDB is called with the message
- the MDB perform some checks on the entity (this involves instatiating the 
entity by doing find by primary key)
- in some cases the MDB would decide to delete that entity (That's when the 
error happen)

When I try to delete the object directly within the session bean... everything 
works fine ? it looks the problem has somethignto do with the session/MDB 
transaction


Can anyone help please.

Thanks
Hamdy


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3898846#3898846

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3898846


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - CMR M:M with extra data

2005-03-24 Thread hfarid
So far I have been successful in using CMP/CMR in my application but I'm kinda 
stuck in a M:M proplem

Entity A is in a M:M relation with entity B. The CMP engin manages the table 
that breaks this relation but the breaking table only includes the primary keys 
of entity A and entity B

The prblem is I need to spcify more information in the breaking table, 
basically I have information that is spcific for every (A,B) pair

Is there any way I can take advantage of the CMP engine to mange such relation 
or do I have to break my M:M relation to 2 1:M relation and deal with the two 
relations and extra entity

Thanks

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3871530#3871530

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3871530


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JCA/JBoss] - Re: RMI Server and JCA

2005-03-21 Thread hfarid
Adrian,
can you please be more spcific in the link you are refering to, I might be 
using wrong wording when I do search or looking at the wrong topic

All the other postings are talking about connecting to certain db or maybe a 
legacy system with already written JCA. I could not find any reference to RMI 
servers

I am working on a writting a managed application which is basically open the 
RMI channel with the RMI server and delegate calls coming as interaction

Thanks for your help

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3871099#3871099

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3871099


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JCA/JBoss] - RMI Server and JCA

2005-03-17 Thread hfarid
Hi,
Finally we decided to move to the J2EE land but we have so many logic and code 
that live in the java domain and running as RMI servers

I would like to integrate these servers in my AS in a clean way so my new AS 
based application can take advantage of them

Can you please recommend a way for the integration based on JCA and if possible 
an example of how to do it ... Thanks

So far I thought of the following options:
- leave it as it's and connect to it in the normal way (as in RMI) with no need 
for JCA
[please if you notice an error in my usage of managed and unmanaged in the 
JCA domain please correct me (I am still getting confused)
- Write a conneter for unmanaged EIS [very similar to option 1 but I could 
not find any example for how to do such thing]
- Extract the code in my application server and create a java object to access 
the logic and build a connetor for managed EIS

Thanks for help

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3870674#3870674

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3870674


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Dual Persistance

2005-03-17 Thread hfarid
Hi,
I am working on an application that primary configure hardware devices
The application maintain a database  that matches the configuration on the 
devices
I model my devices as CMP entity bean ... and everything is working fine BUT 
the biggest part of the application is missing !!!
Whever a field is changed on the entity, the application server takes care of 
saving it to the DB (for the caller it's just a set method) but this change 
should be propagated to the device and in case of failure the change in the 
datbase should be rolled back.

I can hide my entity bean with a session bean that perform the device setting 
first then it sets the new value in entity (db)
I know that this option will work (this is how the old application used to do 
it)

My question. Is there any other alternative to that solution?
Don't think about device and hardware stuff just think about it as a single 
table that is replicated on a diffrent data source and the AS has to update 
both datasource in a form of transaction

Note. All my device configurations are SNMP based and I am thinking of 
writing an SNMP JCA (and this will be diffrent question on a diffrent forum :-)

Thanks for your help

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3870678#3870678

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3870678


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Postgresql 7.4.x/8.0, CMP and auto-increment

2005-03-10 Thread hfarid
take a look at my other posting on the Informix/auto-increment

http://www.jboss.com/index.html?module=bbop=viewtopict=61244

You don't have to return anything in ejbCreate(), just return null

lets say you are creating your entity bean from a session bean using 
blaHome.create() which returns blaLocal. you can always get the primary key on 
that object.





View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3869589#3869589

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3869589


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - auto-increment PK and Informix

2005-03-09 Thread hfarid
After couple of sleepless nights I manged to get my CMP bean to work with 
auto-increment 

I am using xdoclet tags so that's how I will descripe the solution

On the entity level
@jboss.entity-command
name=informix-serial
class=org.jboss.ejb.plugins.cmp.keygen.JDBCInformixCreateCommand

@jboss.entity-commans-attribute
  name=method
  value=getSerial

On your primary key field get

@ejb.pk-field
@ejb.persistence
  column-name=id
  jdbc-type=INTEGER
  sql-type=SERIAL
@jboss.persistence
  auto-increment=true


Thats all you have to do, next time you do ejbCreate() you don't need to 
provide an Id, jboss and the informix engine will provide you with the key.

Another issue you might run into, which using that auto-incrment key in 
relations
For example in M:M between two entities which have an auto-increment key. If 
you don't spcify the jdbc-type, sql-type in the jboss.relation, jboss will 
try to create a table with two serial fields which would fail. So make sure 
that you specify these two tags when using your auto-increment CMP fileds in a 
CMR



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3869437#3869437

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3869437


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Postgresql 7.4.x/8.0, CMP and auto-increment

2005-03-08 Thread hfarid
Hi 
Based on my search in the forum I gathered the following

- On the entity level you need to specify the following tag

@jboss.entity-command
 *  name=informix-serial
 *  class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCInformixCreateCommand

in your case name  = postgresql-fetch-seq and the class would be 
org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand

an on you getId() method you need to specify the following tag 
@jboss.persistance auto-increment =true

you can see the result of these two steps in your jbosscmp-jdbc.xml
on the entity you will get enitiy-command  and on the field you will get 
the auto-increment/


I did all of that for my entity and I mange to deploy it successfully BUT 
whenevr I try to create an new enity.. I get the following exception

22:17:50,126 ERROR [MyEntity] Could not create entity
java.sql.SQLException: Primary key on table (mytable) has a field with a null 
key value.
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3082)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3396)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2259)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2179)
at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java:721)
at com.informix.jdbc.IfxResultSet.executeUpdate(IfxResultSet.java:305)
at 
com.informix.jdbc.IfxStatement.executeUpdateImpl(IfxStatement.java:882)


From the postings I feel that these two steps are enough (give it a try it 
might work for you) 




View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3869316#3869316

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3869316


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: auto-increment template not found

2005-03-08 Thread hfarid
Thanks a lot, that worked fine
I noticed that the auto-increment . ./ is sometimes set to 
?1 IDENTITY and sometimes to ?1 auto_increment (what is the diffrenece??)

it worked fine at the deployment BUT 
I could not create new entity, I am getting exception from the informix 
(inserting null value into key)
22:17:50,126 ERROR [MyEntity] Could not create entity
java.sql.SQLException: Primary key on table (mytable) has a field with a null 
key value.
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3082)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3396)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2259)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2179)
at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java:721)
at com.informix.jdbc.IfxResultSet.executeUpdate(IfxResultSet.java:305)
at 
com.informix.jdbc.IfxStatement.executeUpdateImpl(IfxStatement.java:882)

Can anybody help please...

Thanks

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3869317#3869317

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3869317


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - auto-increment template not found

2005-03-03 Thread hfarid
Hi,
I am kinda new to the jboss world so please execuse my ignorance

I have a CMP bean that have an auto-genrated Integer id
I followed all the recommendation I was able to find in this forume (greate 
stuff by the way)

In my jbosscmp-jdbc.xml, I have the following

 
 ejb-nameBeanName/ejb-name
 create-tabletrue/create-table

 table-nametable_name/table-name

 cmp-field
field-nameid/field-name
column-nameid/column-name

auto-increment/
/cmp-field
 cmp-field
field-namename/field-name
column-namename/column-name

jdbc-typeVARCHAR/jdbc-type
sql-typevarchar(32)/sql-type

/cmp-field

entity-command name=informix-serial 
class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCInformixCreateCommand
/entity-command
!-- jboss 3.2 features --
!-- optimistic locking does not express the exclusions needed --

I guess you already figured that I use informix

the problem show up when I deploy my stuff, I get the following error 

java.lang.IllegalStateException: auto-increment template not found
at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addField(JDBCStartCommand.java:924)
at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.getEntityCreateTableSQL(JDBCStartCommand.java:743)
at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:196)
at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:484)
at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:381)
at 
org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:157)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)

I really don't know what is missing can you please help

Thanks

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3868750#3868750

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3868750


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user