[JBoss-user] [JCA/JBoss] - Re: Could not enlist in transaction on entering meta-aware o

2004-08-05 Thread brightsunny2020


Guys 

It worked, the mistake is

false


THanks
Sunny


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

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


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JCA/JBoss] - Could not enlist in transaction on entering meta-aware objec

2004-08-05 Thread brightsunny2020

Hi all


I am using XATransaction in JBOSS. Since in our application, Transaction involves
JDBC, Entiry beans, and JMS. Local Tranacation may works for us, but we do see another
issue with the consistency of the data. In order to avoid the inconsistency data 
problems 
in a cluster env (where we are not going to enable either object replication or sending
a message to invalidate the cache at other nodes), we are programatically locking the 
particular record using JDBC and Select for update


Here is the structure

Session bean method (Transaction requires new){

calls POJO.method {
call getConnection, execute Select for update 
call entity beans 
call to closeConnection

}
}

When program control exits this method, it releases the lock

In this application, this particular logic works fine from 3 different 
routes, and fails from only one route. Not able to figure it out why?


OPPS (Ordering System) -> BSC Delegegate -> BSC Session Bean (Transaction = 
RequiresNew)
-> BSC POJO (Calls to get the lock(jdbc), calls entity beans) -> Entity Beans 
Works fine

BSC Message Driven Bean (Transaction = Required)
-> BSC POJO (Calls to get the lock(jdbc), calls entity beans) -> Entity Beans 
Works fine

Junit -> BSC Delegegate -> BSC Session Bean (Which is for read only, Transaction = 
Any, tried all)
-> BSC POJO (for readonly, calls entity beans) -> Entity Beans Works fine

CSR -> OPPS (Ordering Comp) -> BSC Delegegate -> BSC Session Bean (Which is for read 
only, Transaction = Any, tried all)
-> BSC POJO (for readonly, calls entity beans) -> Entity Beans Fails, Fails, Fails


Here is the Datasource file (Pad = true set)


  
  
bscDS
true
true
oracle.jdbc.xa.client.OracleXADataSource
jdbc:oracle:oci:@devdb02_dcoreint
janus_devl_app
frontline

org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter

 
true
true
true
1
6 




Error:

Could not enlist in transaction on entering meta-aware 
object!javax.transaction.SystemException: 
enlistResource failed 

Here is the exception:


2004-08-05 12:31:19,649 WARN  [org.jboss.tm.TransactionImpl] XAException: 
tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=WS1543//27, BranchQual=] 
errorCode=XAER_NOTA
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1159)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:311)
at 
org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:143)
at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1148)
at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:629)
at 
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:455)
at 
org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
at 
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
at 
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
at 
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
at com.register.util.status.BillingResultInfo.(BillingResultInfo.java:62)
at com.register.bsc.dao.BillingInfoDAO.init(BillingInfoDAO.java:1441)
at com.register.bsc.dao.BillingInfoDAO.(BillingInfoDAO.java:107)
at 
com.register.bsc.ejb.BillingInformationHandlerEJB.getBillingLineItem(BillingInformationHandlerEJB.java:61)
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.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
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

[JBoss-user] [Messaging, JMS & JBossMQ] - Re: JMS Client not able to pull any messages from the Queue

2004-06-17 Thread brightsunny2020
Thanks dannyyates

I tried by seting the persistence mode to message, didn't work. Then I tried setting 
the persistence mode for both QueuSender and Message, still no luck

Can u pls. take a look at the code or Please copy&paste ur code here that works for 
you. I am using to the file system persistence


public class SimpleQueueSender {



/**
 * Main method.
 *
 * @param args the queue used by the example and,
 * optionally, the number of messages to send
 */
public static void main(String[] args) {
String  queueName = null;
Context jndiContext = null;
QueueConnectionFactory  queueConnectionFactory = null;
QueueConnection queueConnection = null;
QueueSessionqueueSession = null;
Queue   queue = null;
QueueSender queueSender = null;
TextMessage message = null;
final int   NUM_MSGS;

// Initial context strings
String PROVIDER_URL = "java.naming.provider.url";
String NAMING_FACTORY = "java.naming.factory.initial";
String CONTEXT_FACTORY =
"org.jnp.interfaces.NamingContextFactory";

String jndiHost = "localhost:1099"; 
NUM_MSGS = 5;
queueName = "queue/orafin/OrafinServices";

Properties props = new Properties();
props.put(NAMING_FACTORY, CONTEXT_FACTORY);
props.put(PROVIDER_URL, jndiHost);

/* 
 * Create a JNDI API InitialContext object if none exists
 * yet.
 */
try {
jndiContext = new InitialContext(props);
} catch (NamingException e) {
System.out.println("Could not create JNDI API " +
"context: " + e.toString());
System.exit(1);
}

/* 
 * Look up connection factory and queue.  If either does
 * not exist, exit.
 */
try {
queueConnectionFactory = (QueueConnectionFactory)
jndiContext.lookup("ConnectionFactory");   
 
queue = (Queue) jndiContext.lookup(queueName);
} catch (NamingException e) {
System.out.println("JNDI API lookup failed: " + 
e.toString());
System.exit(1);
}

/*
 * Create connection.
 * Create session from connection; false means session is
 * not transacted.
 * Create sender and text message.
 * Send messages, varying text slightly.
 * Send end-of-messages message.
 * Finally, close connection.
 */
try {
queueConnection = 
queueConnectionFactory.createQueueConnection();
queueSession = 
queueConnection.createQueueSession(false, 
Session.AUTO_ACKNOWLEDGE);
queueSender = queueSession.createSender(queue);
queueSender.setDeliveryMode(DeliveryMode.PERSISTENT);
message = queueSession.createTextMessage();
for (int i = 0; i < NUM_MSGS; i++) {
message.setText("This is message " + (i + 1));
System.out.println("Sending message: " + 
message.getText());
message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
queueSender.send(message);
}

/* 
 * Send a non-text control message indicating end of
 * messages.
 */
queueSender.send(queueSession.createMessage());
} catch (JMSException e) {
System.out.println("Exception occurred: " + 
e.toString());
} finally {
if (queueConnection != null) {
try {
queueConnection.close();
} catch (JMSException e) {}
}
}
}
}



import javax.j

[JBoss-user] [Messaging, JMS & JBossMQ] - Re: JMS Client not able to pull any messages from the Queue

2004-06-16 Thread brightsunny2020


Thanks dannyyates


Yes, I read JMS Spec


and I set the delivery mode to PERSISTENT also


Thanks
Sunny


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

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


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - JMS Client not able to pull any messages from the Queue afte

2004-06-14 Thread brightsunny2020
JMS client is not able to pull any messages, simply it exits with no messages. But 
messages exists and persisted on the file system. These messages are produced before 
the server restart

Seq. 
Produce messages
Restart the server
Start the client to read .. exits with no messages

If the server is not restarted, client is able to pull the messages from the Queue 
irrespective of how long the messages stayed in the Queue

Anyhelp would be appreciated

Thanks
Sunny


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

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


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user