Transaction with third party JMS providers and ejb
I am using a container managed stateless session bean to send messages to an ibm
mqseries running on the same computer. The EJB is deployed on weblogic 7.0. It
seems that sending JMS messages do not participate in the transaction and that
I have to call queueSession.commit() explicity every time. However, receiving
messages via Message Driven Beans in a transaction is not a problem. Any clue
how to resolve this or what is happening?
To do this today, you'd have to get the "XAResource" object from your JMS
provider's XASession object, and register it with JTA. I know this has come
up before, and you should be able to find more about this on the newsgroup.
Basically, every time you send a message, you need to do something like
this:
import javax.jms.*;
import javax.transaction.*;
XASession xaSession; // This is your vendor's XASession object
XAResource xaResource = xaSession.getXAResource();
Transaction tran = weblogic.transaction.TxHelper.getTransaction();
tran.enlistResource(xaResource);
// Now send your message!
You need to call "enlistResource" every time you send a message, or it won't
work.
WebLogic Server 8.1 will be able to do this automatically as long as you're
inside an EJB or a servlet.
greg
"raj" <[email protected]> wrote in message
news:[email protected]..
>
> I am using a container managed stateless session bean to send messages to
an ibm
> mqseries running on the same computer. The EJB is deployed on weblogic
7.0. It
> seems that sending JMS messages do not participate in the transaction and
that
> I have to call queueSession.commit() explicity every time. However,
receiving
> messages via Message Driven Beans in a transaction is not a problem. Any
clue
> how to resolve this or what is happening?
Similar Messages
-
Using Weblogic MDB to consume message using a XA transaction with third party JMS Provider
I understood from the WebLogic documentation that we can invoke a third party JMS
using its XA interface from within a MDB where transaction-type is Container and
trans-attribute is Required. Also we will need to specify its XAConnection factory
name as connection-factory-jndi name. It that sufficient ?? Or do i need to set
up some other attributes also ??.
Hi Neeru,
I understand u were able to solve this issue.
I am using similar kind of configuration but instead of tibco i am using Webmethods.
Could u please let me know what did u do to solve the problem?
-thanks and regards.
Praveen
"Neeru Munjal" <[email protected]> wrote:
>
>Hi Rob,
>I used the same whitepaper and tried to use TIBCO JMS with Weblogic server),
>I
>started with MDB example specified in Weblogic 7.0 release in examples/ejb20/message
>and modified it to use trans-attribute as Required. Also I used connection
>factory
>which supports XA, but my MDB does not get called.
>
>Thanks & Regards
>Neeru
>
>Rob Woollen <[email protected]> wrote:
>>Here's a white paper about integrating 3rd party JMS providers with
>WLS:
>>
>>http://dev2dev.bea.com/resourcelibrary/whitepapersdetail.jsp?highlight=whitepapers&filePath=components%2Fdev2dev%2Fresourcelibrary%2Fwhitepapers%2Fwp_jmsproviders.htm
>>
>>-- Rob
>>
>>Neeru Munjal wrote:
>>> I understood from the WebLogic documentation that we can invoke a
>third
>>party JMS
>>> using its XA interface from within a MDB where transaction-type is
>>Container and
>>> trans-attribute is Required. Also we will need to specify its XAConnection
>>factory
>>> name as connection-factory-jndi name. It that sufficient ?? Or do
>i
>>need to set
>>> up some other attributes also ??.
>>>
>>
>
-
Troubles with third-party software: Mozilla and Microsoft
Can anybody help me?
I'm new to Macs. Loving it so far (why didn't I switch years ago?), but I am having a few teething difficulties. Namely, with some interaction between Mozilla Firefox for Mac and MS Word for Mac. Whenever I copy text from Firefox and paste it into Word, it's automatically stripped of all formatting - italics, bold, font, paragraph styles, the lot.
I copy-and-paste text from Firefox a lot, and need to keep the source formatting when I do so. Can anyone tell me how? Please?
Thanks.I was hoping somebody here would know something about Firefox for Mac...I didn't have this problem when I was using Firefox on a PC.
And, yes, as far as I can tell this problem doesn't occur with Safari. But I like Firefox. It's got features I admire and all my bookmarks, too. So I don't really want to have to switch to Safari. There must be some way around my problem, surely.
Mac Phone Support have already told me they can't help, though, since this is all third-party software. They directed me here. -
Keybd_event with third party Virtual Key and WM_KEYDOWN
Hi All,
I want to use keybd_event() to send this third party virtual key called VK_OEM_CLR or 0xF5 to other application.
Third party header file defined:
#define VK_OEM_CLR 0xF5
The application that sends the key:
keybd_event(VK_OEM_CLR , 0, KEYEVENTF_EXTENDEDKEY, 0);//try this, but other application does not receive WM_KEYDOWN
keybd_event(0xF5 , 0, KEYEVENTF_EXTENDEDKEY, 0);//try this, but other application does not receive WM_KEYDOWN
The other application that will receive the sending key:
LRESULT CALLBACK LLKbdProc(int nCode, WPARAM wParam, LPARAM lParam);
HHOOK kbdhk;
int quit = 0;
HINSTANCE m_hHookApiDLL = NULL;
typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
typedef HHOOK (__stdcall *SetWindowsHookExW)(int, HOOKPROC, HINSTANCE, DWORD);
typedef LRESULT (__cdecl *CallNextHookEx)(HHOOK, int, WPARAM, LPARAM);
typedef LRESULT (__cdecl *UnhookWindowsHookEx)(HHOOK);
static SetWindowsHookExW m_pfSetWindowsHook;
static CallNextHookEx m_pfCallNextHook;
#define WH_KEYBOARD_LL 20
typedef struct {
DWORD vkCode;
DWORD scanCode;
DWORD flags;
DWORD time;
ULONG_PTR dwExtraInfo;
} KBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
void Dbg( TCHAR * lpszFormat, ... )
TCHAR szOutput[1024];
TCHAR * pOutput = szOutput;
va_list v1;
DWORD dwSize;
// Now do the normal printf stuff...
va_start( v1, lpszFormat );
dwSize = ::wvsprintf( pOutput, lpszFormat, v1 );
va_end( v1 );
OutputDebugString(szOutput);
_tprintf(szOutput);
LRESULT CALLBACK LLKbdProc(int nCode, WPARAM wParam, LPARAM lParam)
KBDLLHOOKSTRUCT *pKeyBoard = (KBDLLHOOKSTRUCT *)lParam;
switch( pKeyBoard->vkCode )
case 245://VK_OEM_CLR,0xf5,245
switch(lParam)
case WM_KEYDOWN:
Dbg(_T("receives VK_OEM_CLR, hex 0xf5, decimal 245 on WM_KEYDOWN\r\n"));
return 1;
case WM_KEYUP:
Dbg(_T("receives VK_OEM_CLR, hex 0xf5, decimal 245 on WM_KEYUP\r\n"));
return 1;
default:
Dbg(_T("receives VK_OEM_CLR, hex 0xf5, decimal 245 \r\n"));
break;
return 1;
break;
default: // no processing on this key
Dbg(_T("switch-case: Unknown key\r\n"));
return m_pfCallNextHook( NULL, nCode, wParam, lParam );
return 0;
int main()
m_hHookApiDLL = LoadLibrary(L"coredll.dll");
if(m_hHookApiDLL != NULL)
HINSTANCE appInstance = GetModuleHandle(NULL);
m_pfSetWindowsHook = (SetWindowsHookExW)GetProcAddress(m_hHookApiDLL,L"SetWindowsHookExW");
kbdhk = m_pfSetWindowsHook(WH_KEYBOARD_LL, LLKbdProc, NULL, 0);
if (!kbdhk)
Dbg(_T("WH_KEYBOARD_LL FAILED.\r\n"));
return -2;
//Dbg(_T("Message Pump... Listening...\r\n"));
MSG msg;
while(GetMessage(&msg, NULL, 0, 0) > 0)
if (quit) break;
TranslateMessage(&msg);
DispatchMessage(&msg);
return 0;
The application that receives the key, always catch the virtual key for VK_OEM_CLEAR, but there is no WM_KEYDOWN. Am I doing something wrong?That is it.. Thank you so much. other cases I use wParam,
but overlook for this case. -
Integrate third party JMS providers with sunone 8
Hi,
I am trying to integrate a JMS provider, FioranoMQ with Sunone Application server (version 8). I have defined an external queue connection factory using the administration console. But I am not able to deploy the EJB as the exception in server.log says that queue connection factory does not exist.
Here is the stack trace of the exception
[com.sun.enterprise.connectors.ConnectorRuntimeException: jms_MyQcfis not created yet!]|#]
[#|2004-01-06T15:43:55.312-0800|SEVERE|j2ee-appserver1.4|javax.enterprise.system.container.ejb.mdb|_ThreadID=11;|com.sun.enterprise.connectors.ConnectorRuntimeException
com.sun.enterprise.connectors.ConnectorRuntimeException: jms_MyQcfis not created yet!
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.setValuesFromConfiguration(ActiveJmsResourceAdapter.java:316)
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:259)
at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:139)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:189)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:196)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:464)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:129)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:96)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:205)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:156)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:466)
In case I again try to create the jms_myqcf , it says that resource already exists.
The resource reference defined in the xml files are
Sun application client.xml
=====================
<sun-application-client>
<resource-ref>
<res-ref-name>jms_myqcf</res-ref-name>
<jndi-name>jms_myqcf</jndi-name>
<default-resource-principal>
<name></name>
<password></password>
</default-resource-principal>
</resource-ref>
<resource-env-ref>
<resource-env-ref-name>jms_MyQueue</resource-env-ref-name>
<jndi-name>jms_MyQueue</jndi-name>
</resource-env-ref>
</sun-application-client>
Sun EJB JAR.XML
===============
<sun-ejb-jar>
<enterprise-beans>
<unique-id>1</unique-id>
<ejb>
<ejb-name>SimpleMessageEJB</ejb-name>
<jndi-name>jms_MyQueue</jndi-name>
<mdb-connection-factory>
<jndi-name>jms_myqcf</jndi-name>
</mdb-connection-factory>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
Do you have any idea why this exception is thrown?
JamesYou are right that I am using j2ee 1.4 final release.
I donot know much about connector 1.5 resource adapter and donot have one. Is there no other way that i can integrate an external JMS provider with sunone?
I intend to do the following.
- define the connection factory object & destination object in the external JNDI or any JNDI of sunone so that the applications can lookup these objects.
- Now i want to deploy a MDB which creates connection using the conn factory and listens for messages on destination defined in the jndi in the first step.
Thats all i want to do. Do you know which is the easier and best approach to do that? -
Local transaction with third party jdbc?
I am trying to use bean managed transction in my application,
and using Sybase jConnector5.2 jdbc driver with iPlanet6sp2.
Transaction Manager configed local.
The transaction always can not roll back successfully,
Anyone kindly give some ideas...
ThanksDu Xiao,
By "bean managed transction", are you referring to UserTransactions?
If so, your problem may lie in the autoCommit attribute of the Connection (or PooledConnection) object that you are using in your bean. Check to see if the autoCommit attribute is set to true or false on your connection.
If you are using UserTransactions, you should probably do connection.setAutoCommit(false) as you as you check out the Connection object. Without this code, your DML statements may be getting committed automatifcally even when you don't want them to, resulting in transactions that you can't roll back.
JC
Du Xiao Fei wrote:
>
I am trying to use bean managed transction in my application,
and using Sybase jConnector5.2 jdbc driver with iPlanet6sp2.
Transaction Manager configed local.
The transaction always can not roll back successfully,
Anyone kindly give some ideas...
Thanks -
Just when I getting to like oc4j I ran into this.
It is a beta document for 904 oc4j.
Oracle9iAS Containers for J2EE
Services Guide
Release 2 (9.0.4)
Part No. B10326-01
April 2003
Beta Draft March 21, 2003 11:59 am
Third-Party JMS Providers
This section discusses the following third-party JMS providers and how they
integrate with OC4J using the resource provider interface:
¦WebSphere MQ
¦SonicMQ
¦SwiftMQ
Here are the operations that the resource provider interface supports:
¦Look up queue and topic with
java:comp/resource/providerName/resourceName
¦Send a message in EJB
¦Receive a message synchronously in EJB
The context-scanning resource provider class is a generic resource provider class
that is shipped with OCJ for use with third-party message providers.
Note: Oracle supports only single-phase commit semantics for
resource providers other than OJMS.
Note: OC4J 9.0.4 does not offer MDB support for third-party JMS
providers.
Note: For the OC4J 9.0.4 implementation, MDBs are integrated
with OC4J JMS and OJMS.
Well I need MDB capability with Mqseries, so it looks like
I am going to have to abandon ship with oc4j, and go with
a J2EE server which supports MDB and JMS the way it was intended to, and not only work with the Vendors JMS implementation. I checked this 10.0.4 preview and it is
the same way.
I would be tickled if someone could tell me this is not
the case, but I'm not expecting any answer that would
make an MDB work with Mqseries.10.1.3 Developer Preview supports MQServies.
You can download the software at http://www.oracle.com/technology/tech/java/oc4j/1013/index.html
Look at the howto at http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-mq-jms/doc/how-to-mq-jms.html
http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-mq-jms/how-to-mq-jms.zip
The earlier releases support MQ Series but not in a transactional way.
-Debu -
Does OSB10gr3 support third-party security providers?
Does OSB 10gr3 support third-party security providers and third-party token handlers ?
If so what are they?
Edited by: dbr6 on Jun 26, 2009 6:01 PMOSB will work with any security provider that is designed as per http://download.oracle.com/docs/cd/E12840_01/wls/docs103/dvspisec/index.html. OSB completely relies on Weblogic security framework and doesn't do any official certification for third-party security providers.
Cheers
Manoj -
Example of Weblogic Appserver using XA Controlled Transaction to send messages to third party JMS
I am looking for Example of Weblogic Appserver using XA Controlled Transaction
to send messages to third party JMS Server.
I want to send messages to JMS and use Weblogic MDB to consume that message and
send it to some third party JMS in a XA Controlled transaction.
Sure. Right now, it involves a bit of JTA programming -- in our next
release, it should be easier, however.
Before sending a message, you have to:
-- Use the TxHelper class to get the current Transaction object.
-- Use the "getXAResource" method on the JMS provider's Session object to
get the XAResource object for the JMS Session you're using to send.
-- Call "enlistResource" on the Transaction object.
You MUST do this in every transaction where you use the JMS provider to send
a message.
You can find the documentation for the TxHelper class and other
WebLogic-specific classes here:
http://e-docs.bea.com/wls/docs70/javadocs/index.html
Look for the "weblogic.transaction" package.
You can find documentation for the Transaction class (which defines
enlistResource) and other classes here:
http://java.sun.com/products/jta/javadocs-1.0.1/index.html
You should also use the weblogic.transaction.TransactionManager class and
call "registerDynamicResource" once (and only once) in your application to
register the JMS providers XAResource with JTA. This makes JTA more
efficient, and it makes transaction recovery work properly.
If the JMS provider is MQ, then look at the whitepaper "Using JTA
transactions to envelope WLS JMS and IBM MQSeries" here:
http://dev2dev.bea.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers
And finally, if you have more questions, the transaction people will be able
to help more. Post to "weblogic.developer.interest.transaction".
greg
"Neeru Munjal" <[email protected]> wrote in message
news:[email protected]...
>
> I am looking for Example of Weblogic Appserver using XA Controlled
Transaction
> to send messages to third party JMS Server.
> I want to send messages to JMS and use Weblogic MDB to consume that
message and
> send it to some third party JMS in a XA Controlled transaction.
>
-
Really Apple?
With the release OSX 10.8.5 Apple has once again showed its true colors, and continued its efforts to create a closed Apple system, which eliminates third party vendors, unless, one can only assume... they pay.
Included in this OSX update is the disabling of the built-in camera to work with third party applications such as Skype and Gmail video chat. No surprise the camera works just fine with Apple apps such as Facetime and Photobooth.
The answer I got on my call to AppleCare to ask for assistance in reinstalling 10.8.4, so that I may Skype again, was we can not do that. You can not go back unless you have a time machine bkup.
Can anyone help me get back to to 10.8.4 on my 2013 MB Air?
I do not have a time machine bkup as this computer is not used to store important documents.
Thank you.Read this post: 10.8.5 Broke Camera Usage For 3rd Party Apps Like Skype
Another: isight not recognized in Skype after 10.8.5 upgrade
Don't panic. Skype simply needs to update its app. -
Can you connect the Lightning to 30-pin adapter and Lightning to 30-pin Adapter (0.2 m) to iPod nano (7th generation) with third-party accessories?
Lightning to 30-pin adapter and Lightning to 30-pin adapter (0.2m) do not work if connected together by other third-party accessories.
-
Dear community,
This is about Motion control in Labview: I try to control a step motor by using a PXI 7350 controller and UMI 7774 to interface with third-party driver UDK5114NW2. The problem is 5 Disable LEDS on UMI 7774 board always lit even when I check "enable" on "Motion I/O setting" in configuration of PXI 7350 motion controller. Furthermore, when I start to control step motor, it is not working and I found disable LED on UMI board still lit. I don't know how to solve this problem. Can someone help me to figure out? Thank you in advance!
Hau Nguyen.Dear Community,
I said wrong, 4 disable LEDS on UMI 7774 Board instead of 5 as my previous post. Why nobody help me to solve this problem. I can not turn off disable LEDs on UMI 7774 Board so I can not start the strp motor. Please help me!
Hau Nguyen. -
Use NI LabView and LabView RT with third party PXI chassis
I want to use NI LabView and LabView RT, some PXI chassis of N.I and
some PXI chassis of Third Party( not N.I ) for diversity, How I will Install
Pharlap ETS ( LabView RT ) on those third party PXI's.
More simply
Third party PXI chassis and controllers support LabView RT or not?
Note: Mark Andre Hary [email protected] of Sensing Systems LLC answer to this question as:
"You can't. I think NI bought Pharlap, and they do not offer board support packages (BSPs) for non-NI PXI controllers. There is no way to get LabVIEW-RT running on a controller not purchased from NI. You will have to use a standard RTOS like Linux,VxWorks, or QNX.
RegardsAs described in the web links below, the only way to run LabVIEW Real-Time for ETS on a third-party system would be to follow the procedure for desktop PC computers. You may find that your third party PXI controller may meet the requirements listed in the below link and you will be able to run Real-Time on the controller. If you decide to do this, you will need to purchase the LabVIEW Real-Time Desktop Deployment license (also linked below). After purchasing the deployment license, you will be sent boot disks that will install the real-time OS onto your system. There is no need to purchase Pharlap ETS from Ardence directly.
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/cb3434da94466dd286256e9e006bb775?OpenDocument
http://sine.ni.com/nips/cds/view/p/lang/en/nid/13751
Instead of using LabVIEW Real-Time for ETS, you could use LabVIEW Real-Time for RTX instead. This system allows you to run Windows and the Ardence Real-Time eXtensions (RTX) real-time kernel concurrently on one machine. Currently device support for LabVIEW RT for RTX systems is limited to RIO devices. This is all described in the below link.
http://zone.ni.com/devzone/conceptd.nsf/webmain/9cc60298315a687e86256e78007b3a96
I hope this answers your question.
Regards,
Kristi H - National Instruments -
Integration of ChaRM with third party tools
Hi all,
We are in the process of building the solution for Change Request Management implementation integrated with third party tool.
As the normal process for ChaRM is to work with the Service Desk functionality (to raise a ticket, then support message, change request, change document etc...), but what we need is create the change request, and change document directly with ChaRM without using the Service Desk functionality.
Did anybody come across this situation?
Please share your experience.
Thanks in advance.
BalajiHi Balaji,
there is no problem, as I understand, you want to use ChaRM without Service Desk. OK, than you create directly a Change Request in CRMD_ORDER, the transaction type you have to select is SDCR (standard transaction type), you have to approve it and then you can create a change document, it is not necessary that you start with a Service Desk ticket like SLFN.
You need configured TMS a SolMan Project with a Maintenance Cycle, thats it (but this is enough , don't forget the customizing).
I hope I understood you correct
Udo -
How to do XMLDSig using third-party JCA providers?
Hi all,
Can anyone please let me know how to do XMLDSig using third-party JCA providers? The Sun XMLDsig documentation says that "A JSR 105 implementation SHOULD use underlying JCA engine classes, such as java.security.Signature and java.security.MessageDigest to perform cryptographic operations", but it doesn't say how to define the JCA provider programmatically. I don't want to change the Providers order in the security.properties file.
Do we need to make any changes in the JCA provider classes to work with XMLDSig and XML encrypt?
I'd appreciate your help.
JoeHow to identify whether the third party app has registered URL scheme or not. I also send a request mail to the third party app developers regarding URL scheme, but there is no reply from them.
Maybe you are looking for
-
How to open multiple collapsible panels?
http://labs.adobe.com/technologies/spry/samples/collapsiblepanel/collapsible_panel_sample. htm This "Open Panel with Link" sample opens only one panel, but I'd like to open multiple collapsible panels at the same time with one button/link click. I'm
-
Objects created/changes are not reflecting in QA?
Hello All Already having a Process chain in production which is loading to a cube.Now I made some modifications(Like added 3 infopckages to the existing 5 infopackages,totally 8 infopackages) to that Process Chain in DEV and transported to QA. In QA
-
I have my Apple cinema display connected to my MacBook Air via the Thunderbolt port, but I also want to connect an ethernet cable. Is there an adaptor that accepts both VGA and ethernet cables at the same time that can be plugged into the Thunderbolt
-
Is there a way to change the font of all text in all layers all at the same time in
I'm wondering if there is a way to change the font of all text in all layers all at the same time in Illustrator CS5.
-
Upgrading from 1.1.6 to 1.3
Hi, I'm about to upgrade an applet from version 1.1 to 1.3. From what I've read in the forums, it seems that what I need to do to accomplish this is to download and install J2SE v 1.3 and then recompile my applet. Is this true? It sounds simple enoug