ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Non Static Java Functions from ESQL

Post new topic  Reply to topic
 Non Static Java Functions from ESQL « View previous topic :: View next topic » 
Author Message
Urizen
PostPosted: Wed Sep 25, 2013 11:43 am    Post subject: Non Static Java Functions from ESQL Reply with quote

Novice

Joined: 11 Jul 2013
Posts: 22

Hi everyone,

I've read the documentation and several posts that show the interaction between JAVA and ESQL, but only for static functions.
Does anybody tried to call a java function (non static) from ESQL?. Is it possible?.
Thanks in advance.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Sep 25, 2013 11:45 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

The called function needs to be static. Once you get inside the called function, you can call any regular Java function from there.

So you can use any Java jar you want, as long as you interface it properly through a static Java function.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Sep 25, 2013 11:45 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

instead of making guesses based on what other people say, have you considered checking what the documentation says?

What requirement are you trying to fill by using a non-static method call?
Back to top
View user's profile Send private message
Urizen
PostPosted: Wed Sep 25, 2013 11:55 am    Post subject: Reply with quote

Novice

Joined: 11 Jul 2013
Posts: 22

Thanks lancelotlinc, I didn't want to write a static custom wrapper for the function, but it seems that's the only way it can be done, so i'll do it.

On the other hand, mqjeff, instead of assuming that I didn't read the documentation, have you considered reading my first post complete before answering me?. If you didn't, I'll help you:
Quote:
I've read the documentation and several posts that show the interaction between JAVA and ESQL, but only for static functions.

Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 25, 2013 12:02 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Urizen wrote:
I've read the documentation

Any Java method that you want to invoke must have the following basic signature:

public static <return-type> <method-name> (< 0 - N parameters>)


Back to top
View user's profile Send private message
Urizen
PostPosted: Wed Sep 25, 2013 12:11 pm    Post subject: Reply with quote

Novice

Joined: 11 Jul 2013
Posts: 22

Yeah, the spanish version (that's the one I've read) says something like that... but there the phrase could mean "should" or "must", that's why I asked if someone have ever tried to call a non static function.
Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 25, 2013 12:13 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Perhaps C++ compilers are more flexible in Spain?



Edit:
More seriously, Compute nodes are themselves static C++ methods (and reentrant) so I suspect it would be rather challenging to make a non-static call into the embedded JVM.

As mentioned, once inside the JVM, it's a free-for-all.
Back to top
View user's profile Send private message
mgk
PostPosted: Wed Sep 25, 2013 1:01 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Quote:
Compute nodes are themselves static C++ methods (and reentrant) so I suspect it would be rather challenging to make a non-static call into the embedded JVM.


Compute node are C++, but they are certainly not static . I have looked into this in the past - it certainly would be possible to call Java and .NET methods that are not static if we wanted to, so if you would like this feature, please raise a requirement for future consideration...


Kind regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Urizen
PostPosted: Wed Sep 25, 2013 1:05 pm    Post subject: Reply with quote

Novice

Joined: 11 Jul 2013
Posts: 22

That's great, I'll raise the requirement then.
Thanks both!!.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Sep 26, 2013 5:08 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

mgk wrote:
Quote:
Compute nodes are themselves static C++ methods (and reentrant) so I suspect it would be rather challenging to make a non-static call into the embedded JVM.


Compute node are C++, but they are certainly not static .







I remember stuff from when I was trying to do write extensions for v5 about there only every being a single copy of the node functional code running, which has always in my mind meant "static".
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Sep 26, 2013 6:45 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Quote:
I remember stuff from when I was trying to do write extensions for v5 about there only every being a single copy of the node functional code running.


This part is correct for a given node in a given flow.. But the same type of node can exist more that once in a single flow or indeed in a different flow. So it can't be static as each needs its own instance of a compute node object which is shared across only the instances that below to that flow...

Kind regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Non Static Java Functions from ESQL
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.