[JBoss-user] [Messaging, JMS & JBossMQ] - setRollBackOnly question

2005-09-06 Thread optimusprime
Hello there! This is a basic question, it's more related to ejb-spec I guess, 
but since JBoss is my default AS, I hope you guys could help me out here ;)

Ok, I have an MDB with CMT. This MDB calls an ApplicationService (just a POJO) 
that performs our business logic. In case something bad happens, let's say, an 
SQL error from Hibernate, one should rollback the transaction.

My question is suppose my onMessage(Message message) method has this snippet:

try{
service.doSomething();
}catch(BusinessLogicException ex){
logger.error(ex);
ctx.setRollBackOnly();
}

This will rollback my transaction, but also cause my message to be re-delivered 
right? I've seen implementations with BMT where we could acknowledge the 
message, but I really would like to keep using CMT.

Well, my question is just about the behaviour of the conteiner, is this what 
really happens when a rollback is issued from a MDB?

I guess avoiding redelivery should be easy since you guyse helped me with that 
in another topic ;)

Thanks all..



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893213


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - Avoinding message re-delivery

2005-08-31 Thread optimusprime
Hello there! I have a process that uses Messaging with queues. When somethings 
goes wrong (An unchecked exception, I'm dealing with the checked) let's say 
nullpointer, the message is re-sent "n" times. Since my process is very 
time/process consuming. How do I avoid this? The more strange it seems, I don't 
want to have the message re-processed by JBOSS after something goes wrong.
This is causing major problems on development scenarios, where we are still not 
stable enough, so it keeps in this infinite loop, event if we stop start the 
server.

Thanks



View the original post : 
http://locahost:8080/index.html?module=bb&op=viewtopic&p=3892492#3892492

Reply to the post : 
http://locahost:8080/index.html?module=bb&op=posting&mode=reply&p=3892492


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Installation, Configuration & Deployment] - 4.0.1 -> 4.0.2 and Hibernate MBean

2005-08-24 Thread optimusprime
Hello there! I'm a constant fight against jboss 4.0.1 and JbossCache and 
Hibernate Mbean. well I guess that the DeployedTreeCacheJndiName is not quite 
ok, since the Mbean should be looked up as Objectname right? This invalidates 
the use of JBossCache + Hibernate? I really couldn't find a way out...

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891493


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - MDB + setRollbackOnly question

2005-06-01 Thread optimusprime
Hello there! I have an MDB which peforms some database related logic on its 
onMessage() method. If something bad happens, I'd like to rollback the 
transaction so nothing is persisted (I'm using hibernate). But when I do this:
catch(Exception ex){
ctx.setRollbackOnly();
}

It seems that the message receive is not acknowledge, and then the container 
ends up in an infinite loop trying to consume the message every time. What I'd 
like to happen is, on error, the message should be purged from the queue?

Any ideas?  

Best regards

Vinicius 

PS: Didn't put all the code and descriptors here, to let the msg clean. If 
required to help please let me know.

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879798


---
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Propagating Permissions, please help

2005-05-12 Thread optimusprime
Helo there. It's been almost a week that I've been reading tutorials, google, 
and jboss code...
I don't want to use j_security_check. So after my LoginModule log-me-in I'm 
unable to propagate the permission...

LoginContext lc = new LoginContext("myLogin",(CallbackHandler)myHandler);
lc.login(); //Ok
lc.getSubject(); //Super OK

now, how do I propagate this to the conteiner? When I go back to the caller 
Servlet it is forward to the login page, as it wasn't authenticated.

Please, someone help me out!

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877507


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Problems with JAAS

2005-05-09 Thread optimusprime
Hello there! Well I'm trying to get to use a custom authentication method. I 
read the JAAS developer guide, as well LoginModule Developer guide. I have a 
custom LoginModule that extends UserNamePasswordLoginModule. My "solution" when 
used combined with j_security_check works nicely. 
The problem is I must have a more fine grained control, something that 
j_security_check won't provide. One of my requisites is : if password is 
expired redirect to a change password screen.
Ok, as my solution works Ok with j_security_check I don't believe my problem 
lies within the LoginModule itself.
So I designed a Pojo that is accessed by my SessionFaƃade that do the trick. 
here's a pice of the code:



  | Principal user = new SimplePrincipal(username);
  | SecurityAssociationHandler handler = new 
SecurityAssociationHandler();
  | handler.setSecurityInfo(user,password.toCharArray());
  | Usuario usuario = null;
  | LookupManager lookup = new LookupManager();
  | try {
  | LoginContext lc = new 
LoginContext("MyLoginModule",(CallbackHandler)handler);
  | lc.login();
  | Subject subject = lc.getSubject();
  | Set principals = subject.getPrincipals();
  | PrivilegedAction action = new LoginAction();
  | Subject.doAs(subject,action);
  | usuario = new Usuario();
  | usuario.setLogin(username);
  | usuario = lookup.getUsuarioPorLogin(usuario);
  | 
usuario.setPermissoes(lookup.getPermissoesPorUsuario(usuario));
  | } catch (LoginException e) {
  | if(e instanceof LoginFailedException){
  | throw (LoginFailedException)e;
  | }else{
  | throw new RuntimeException(e);
  | }
  | 
  | } catch (MyException e) {
  | throw new LoginFailedException(e);
  | }
  | 

Ok, so I get a handler, set the username and password on it. Pass it to my 
LoginModule and call Login on my LoginContext.
LoginOk is set to true, so everthing is Ok right?
Well. As Ed Roman said in his 15 steps to JAAS, the last is step is to call a 
privileged action and after that the security constraints are propagated across 
the conteiner. Well this is NOT happening. The user is no authenticated, it is 
re-sent to the login screen over and over.
Could someone plese give me some guidelines on it. Has someone used it without 
j_security_check?

Here's some info:

web.xml:

  |  
  |
  |   JSP 
  |   Arquivos JSP 
  |   *.jsp 
  |   POST 
  |   GET 
  |
  |
  | usuarios permitidos 
  | Administrador 
  |
  |
  |   Encryption is not required for the application in 
general.  
  |   NONE 
  |
  |  
  |  
  |
  |   Actions 
  |   Actions 
  |   *.do 
  |   POST 
  |   GET 
  |
  |
  | usuarios permitidos 
  | Administrador 
  |
  |
  |   Encryption is not required for the application in 
general.  
  |   NONE 
  |
  |  
  |  
  | FORM 
  | MyLoginModule 
  |  
  | /login.jsp 
  | /error.jsp 
  | 
  | 
  | 

jboss-web.xml


  | java:/jaas/MyLoginModule
  | 
Login.java (Servlet)

  | protected void doPost(HttpServletRequest request,HttpServletResponse 
response) throws ServletException, IOException {
  | String username = request.getParameter("login");
  | String password = request.getParameter("password");
  | RequestDispatcher dispatcher = null;
  | ControlarAcessoSistemaDelegate delegate = new 
ControlarAcessoSistemaDelegate();
  | HttpSession session = request.getSession();
  | try {
  | Usuario usuario = 
delegate.autenticar(username,password);
  | session.setAttribute("usuario",usuario);
  | PermissionsAdapter permissions = new 
MyPermissionsAdapter((MenuRepository)session.getServletContext().getAttribute(MenuRepository.MENU_REPOSITORY_KEY),usuario);
  | session.setAttribute("permissions",permissions);
  | dispatcher = 
request.getRequestDispatcher("/xyz/controlaracessosistema/login.do");
  | } catch (LoginFailedException e) {
  | dispatcher = request.getRequestDispatcher("/login.jsp");
  | }
  | dispatcher.forward(request,response);
  | }
  | 
login-config.xml

  | 
  | 
  | 
  | java:MsSqlSer

[JBoss-user] [Security & JAAS/JBoss] - LoginModule + LoginContext question

2005-05-06 Thread optimusprime
I'm using Authentication using j_seucurity_check. I'd like to switch it to a 
custom way using a struts action. My questions are:

1st - How do I set which configuration should my LoginContext shall use?
2nd - To provide the LoginModule (mine extends UserNameLoginModule) with 
desired UserName/Passwords I need to put them on the callBackHandler right?

3rd - How my web.xml shall looks like? I mean which kind of  auth-method should 
I use on my login-config section

Thanks a lot ppl




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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3876785


---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Installation & Configuration] - JBOSS 4.0.1 : Unable to find a javac compiler

2005-03-04 Thread optimusprime
Hello there! I've installed JBOSS 4.0.1 and It complains about javac compiler. 
Jboss 3.2.7 is running smoothly on the same machine. I do have javahome 
configured and my path, the first element points to jsdk installation. I'm 
running windows 2000 server.
Any ideas

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868801


---
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=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - Transaction issue when updating entity value

2004-10-29 Thread optimusprime
Hi there! I have a solution implemented in our system that flows like this:

A JMS message is sent to create an email account for the user.
The MDB receives that message and then on its onMessage() method, it calls a session 
bean
process() method.

The session beans, creates the account through a pojo command class (connecting on our 
mail system through rExec)
and then the session beans, acquires a handle for an local entity bean and updates a 
flag on
the entity.

Now here's the problem. It's not updating the entity value.
the code that tries to do this:

  if (!emailUsuarioDTO.getAcao().equalsIgnoreCase("remover")) {
System.out.print("atualizando status");
Usuario usuario = 
usuarioHome.findByPrimaryKey(emailUsuarioDTO.getIdUsuario());
usuario.setFlgEmail(new Boolean(true));
System.out.print("status atualizado");
}

What's even stranger, the first system.out is printed on the screen while the other 
isn't.

I have postgreSQL configured to hold my message queues on jboss. 
A warning is beeing displayed for me:

13:48:37,316 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.

Well, now the part I really don't understand. If I debug the project, it does updates 
the value
seems like that if it stops on a break-point it has "time" to process.

I really don't undersand xa/local-tx connnections. But our datasource is configured as 
local-tx

Can someone please help me?

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853311


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Re: Problem with remove()

2004-10-28 Thread optimusprime

  | 
  |   bancoProjeto-projetoConfiguraDados
  |   
  | bancoProjeto
  | 
BancoProjetoRelationshipRole
  | One
  | 
  |   bancoProjeto
  |   BancoProjeto
  | 
  | 
  |   projetoConfiguraDados
  |   projetoConfiguraDados
  |   java.util.Collection
  | 
  |   
  |   
  | projetoConfiguraDados
  | 
ProjetoConfiguraDadosRelationshipRole
  | Many
  | 
  |   projetoConfiguraDados
  |   ProjetoConfiguraDados
  | 
  |   
  | 
  | 
  | java.sql.SQLException: ERROR:  ExecUpdate: Fail to add null value in not null 
attribute id_banco_projeto
  | 
  | at org.postgresql.core.QueryExecutor.executeV2(QueryExecutor.java:289)
  | 
  | at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:105)
  | 
  | at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:43)
  | 
  | at 
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:515)
  | 
  | at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:50)
  | 
  | at 
org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Statement.java:271)
  | 
  | at 
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:324)
  | 
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:136)
  | 
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:627)
  | 
  | at 
org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:421)
  | 
  | at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:387)
  | 
  | at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:714)
  | 
  | at 
org.jboss.ejb.GlobalTxEntityMap.synchronizeEntities(GlobalTxEntityMap.java:149)
  | 
  | at 
org.jboss.ejb.EntityContainer.synchronizeEntitiesWithinTransaction(EntityContainer.java:119)
  | 
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.execute(JDBCRemoveEntityCommand.java:95)
  | 
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.removeEntity(JDBCStoreManager.java:667)
  | 
  | at 
org.jboss.ejb.plugins.CMPPersistenceManager.removeEntity(CMPPersistenceManager.java:492)
  | 
  | at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.removeEntity(CachedConnectionInterceptor.java:430)
  | 
  | at org.jboss.ejb.EntityContainer.remove(EntityContainer.java:505)
  | 
  | 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:324)
  | 
  | at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1084)
  | 
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:72)
  | 
  | at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:282)
  | 
  | at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
  | 
  | at 
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:114)
  | 
  | at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163)
  | 
  | at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
  | 
  | at 
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:54)
  | 
  | at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
  | 
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
  | 
  | at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
  | 
  | at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
  | 
  | at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
  | 
  | at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
  | 
  | at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:489)
  | 
  | at org.jboss.ejb.Container.invoke(Container.java:700)
  | 
  | at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375)
  | 
  | at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
  | 
  | at $Proxy99.remove(Unknown Source)
  | 
  | at 
br.com.auge.bancoprojetos.dao.BancoProjetoEntityDAO.remove(BancoProjetoEntityDAO.java:48)
  | 

[JBoss-user] [Persistence & CMP/JBoss] - Re: Problem with remove() URGENT!!!

2004-10-27 Thread optimusprime
Could someone please help me. I really need help on this

Thanks

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853003


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Problem with remove()

2004-10-24 Thread optimusprime
 Hi there! I have two entities with a 1:n relationship

Entity A 1 : N Entity B

When removing entity A, I'm getting a java.sql.SQLException, on fail to add null 
value. When I check the
DB log, I found this statement

UPDATE TABLE B set idA = null

Well, idA is the FK for the Table A, and cannot be set to null. Now, my question is: 
Why in the world would the CMP engine try to set it to null? I'm calling a remove 
didn't it suppose to be removing it as well?

I'm using jboss 3.2.3 and I have a on-delete-cascade set on my relationship

Any ideas???

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852496


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Installation & Configuration] - Out of Memory Error on 3.2.5

2004-09-10 Thread optimusprime
Hi there! We were using jboss 3.2.2 here and everthing was working almost fine :D I 
upgraded to 3.2.5 due to bug { [ 810612 ] NullPointerException if entity is read-only }
Well, I just tried it as it came (nothing modified) and jboss ran ok! Then I put all 
libraries and set my own datasources. Everthing fine. So I tried to put my  files (I 
have around 30 jar + 1 war) on the deploy directory. It starts the deployment, but 
then, out of memory erros occurs, and no more jars are deployed. It always happens in 
a specific jar. The strange is that it always worked on jboss 3.2.2. The run script 
sets the initial memory size to 128 and max to 512 just as it was on 3.2.2.

Any ideas on what could it be?

Thanks

Vinicius

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3847827


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Persist after ejbcreate

2004-08-26 Thread optimusprime
Hi there! I have the following scenario:

I create an entity using ejbCreate(params). Soon after, I send a message to a queue, 
consumed by a mdb. This mdb, peforms some business rules (not it, I have other classes 
to do so :P ) and then updates data in the entity. Problem is Sometimes, It hadn't 
been persisted (no ejbPostCreate() called yet) so I can't find the bean. I know 
there's a way to do this, all I found till now is that I gotta set this params in 
jboss.xml

 
  
  
  

But I confess I'm not sure what configurations are, and if is it possible to change 
for a specific bean only.

thanks

Vinicius


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846337


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - Re: XAConnectionFactory not bound

2004-08-19 Thread optimusprime
Well, thanks. The deploy is ok now, but I'm not being able to find the 
QueueConnectionFactory through jndi lookup. I'll post my descriptors, plus the client 
code:

jboss.xml :

  | 
  |   MailCreatorMDB
  |   queue/MailQueue
  |   
  | jms/QCF
  | QueueConnectionFactory  
  |   
  | 
  | 

ejb-jar.xml


  | 
  | 
  |   MailCreatorMDB
  |   MailCreatorMDB
  |   mailcreator.MailCreatorMDBBean
  |   Container
  |   
  | javax.jms.Queue
  |   
  |   
  | jms/QCF
  | javax.jms.QueueConnectionFactory
  | Container
  |   
  |   
  | queue/MailQueue
  | javax.jms.Queue
  |   
  | 
  |   
  | 

jbossmq-destinations-service.xml


  |   
  | jboss.mq:service=DestinationManager
 
  | 
  | 

Cliente code (POJO class): 

  | try {
  |   this.ctx = new InitialContext(System.getProperties());
  |   QueueConnectionFactory factory = (QueueConnectionFactory) 
ctx.lookup("jms/QCF");
  |   Queue queue = (Queue)ctx.lookup("java:/comp/env/jms/MailQueue");
  |   QueueConnection queueConnection = factory.createQueueConnection();
  |   QueueSession queueSession = queueConnection.createQueueSession(false,0);
  |   QueueSender sender = queueSession.createSender(queue);
  |   ObjectMessage objMsg = queueSession.createObjectMessage();
  |   objMsg.setObject(userDTO);
  |   sender.send(objMsg);
  |   queueConnection.close();
  | }
  | 

I'm running jboss 3.2.2 on a windows XP (development, production is a Debian) JVM 1.4.2


Thanks

Vinicius

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845627


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - XAConnectionFactory not bound

2004-08-18 Thread optimusprime
Hi there! I'm trying to deploy a simple MDB, but I'm getting this error. 
Here's my deployment descriptors:


  MailCreatorEJB
  

  MailCreator
  MailCreator
  mailcreator.MailCreatorBean
  Container
  
javax.jms.Queue
  
  
QCF
javax.jms.QueueConnectionFactory
Container
  
  
jms/MailQueue
org.jboss.mq.server.jmx.Queue
  

  
  

  
MailCreator
*
  
  Required

  




  

  MailCreator
  jms/MailQueue
   
QCF
QueueConnectionFactory
 

  


also added this to the jbossmq-destinations-service.xml


jboss.mq:service=DestinationManager
  

I still have the hsqld-ds configured and the drivers.

Any ideas?

Thanks

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845498


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user