aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Borland (BES) and UserTransaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Borland (BES) and UserTransaction" Watch "Borland (BES) and UserTransaction" New topic
Author

Borland (BES) and UserTransaction

hoppel
Greenhorn

Joined: Dec 06, 2001
Posts: 9
Hello

I try to start an UserTransaction from the client site, but I've got an exception

InitialContext ctx = new InitialContext();
UserTransaction ut = (javax.transaction.UserTransaction)
ctx.lookup( "java:comp/UserTransaction" );
ut.begin();

...

ut.commit();

thx a lot.

best regards
Steffen

---

Error Report:

[java] Fatal Error: Transaction service could not be located
[java] org.omg.CORBA.OBJECT_NOT_EXIST:
[java] Could not locate the following Object:
[java] repository id : IDL mg.org/CosTransactions/TransactionFactory:1.0
[java] vmcid: 0x0 minor code: 0 completed: No
[java] at com.inprise.vbroker.orb.LocatorBidder.getBid(LocatorBidder.java:32)
[java] at com.inprise.vbroker.ProtocolEngine.ManagerImpl.startBidding(ManagerImpl.java:187)
[java] at com.inprise.vbroker.ProtocolEngine.ManagerImpl.getConnector(ManagerImpl.java:161)
[java] at com.inprise.vbroker.orb.DelegateImpl._bind(DelegateImpl.java:235)
[java] at com.inprise.vbroker.orb.DelegateImpl.bind(DelegateImpl.java:197)
[java] at com.inprise.vbroker.CORBA.portable.ObjectImpl._bind(ObjectImpl.java:59)
[java] at com.inprise.vbroker.orb.ORB.bind(ORB.java:1595)
[java] at org.omg.CosTransactions.TransactionFactoryHelper.bind(TransactionFactoryHelper.java:45)
[java] at org.omg.CosTransactions.TransactionFactoryHelper.bind(TransactionFactoryHelper.java:31)
[java] at com.visigenic.services.CosTransactions.TSCurrentManager.update(TSCurrentManager.java:319)
[java] at java.util.Observable.notifyObservers(Observable.java:142)
[java] at java.util.Observable.notifyObservers(Observable.java:98)
[java] at com.visigenic.services.CosTransactions.TSNotifier.locateFactory(TSNotifier.java:115)
[java] at com.visigenic.services.CosTransactions.CurrentImpl.begin_with_name(CurrentImpl.java:153)
[java] at com.visigenic.services.CosTransactions.CurrentImpl.begin(CurrentImpl.java:111)
[java] at com.visigenic.services.CosTransactions.TSCurrentManager.begin(TSCurrentManager.java:77)
[java] at com.inprise.visitransact.jta.TransactionManagerImpl.begin(TransactionManagerImpl.java:161)
[java] at com.inprise.visitransact.jta.UserTransactionImpl.begin(UserTransactionImpl.java:49)
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by hoppel:
I try to start an UserTransaction from the client site, but I've got an exception
InitialContext ctx = new InitialContext();
UserTransaction ut = (javax.transaction.UserTransaction)
ctx.lookup( "java:comp/UserTransaction" );

I'm afraid you can't create a UserTransaction in the client-side -- it's purely a server-side concept in the J2EE architecture.

By the way, your display name doesn't currently comply with our naming policy so I'll have to ask you to change it into something compliant.

Thanks.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Borland (BES) and UserTransaction