  | | | RES: [FLASHmacromedia] FlashRemoting w/FlashMX2004 and EJB... really working? | RES: [FLASHmacromedia] FlashRemoting w/FlashMX2004 and EJB... really working? 2004-04-19 - By Cristiano Monteiro dos Santos
Back Hi, dude.
I've been working for a while with the Flash Remoting concept, but not using Macromedia's payd solution, but instead the open source SourceForge one called OpenAMF (www.openamf.org). If you want, I develop a (poor) example using EJBs that I can send you, if you're interested in, but as I sayd, it uses OpenAMF, not Remoting.
Regards, -cris
-- --Mensagem original-- -- De: KingKarsten [mailto:kingkarsten@(protected)] Enviada em: segunda-feira, 19 de abril de 2004 09:01 Para: pro_flash@(protected); FLASHmacromedia@(protected); FSdesigners@(protected) Assunto: [FLASHmacromedia] FlashRemoting w/FlashMX2004 and EJB... really working?
I do have serious problems. For quite a long time I am trying to connect some Enterprise JavaBeans to a FlashMovie. The idea was to combine a great FrontEnd and a great BackEnd.
The problem is, I can't get it work. I bought a copy of FlashMX2004 and installed the RemotingComponents (from http://www.macromedia.com/software/flashremoting/downloads/components ). I wrote Enterprise JavaBeans that work well, they are deployed on a JBoss Server and a TestServlet shows me, that everything is okay and acts (answers) like it should. I searched the web and got quite litte information (EJB seems to be not too popular with FlashRemoting) and about none concerning FlashMX2004. I deployed the Gateway and can connect to it.
In a looong list of errors I fought my way through the very little delved and barely penetrable jungle to what I call my final frontier. When I run my move, I get connected to my EJB (Home Interface with getService(myJNDI)) and even get an object when calling myEJB.create(). But when I try doing anything with that, Flash does nothing. No request, no answer, the NetConnection Debugger shows neither call nor answer. I try to call the makeSomeNoise() Method which should give a simple String back.
Sorry for telling my whole story, but I'm quite frustrated by now.
Any suggestion for emprovement strongly appreciated! However, here is my code...
FRAME1: #include "NetServices.as" #include "NetDebug.as"
var myURL:String = "http://localhost:8080/flashgateway/gateway"; var myEJB:String = "ejb/foo/facade/Entry";
var textCon:String = new String(); var createRes:Object = new Object();
_global.System.onStatus = createRes.onStatus;
EJBtext.text = "soon...";
// connection stuff function init() { // Gateway NetServices.setDefaultGatewayUrl(myURL); var myGateway:Object = NetServices.createGatewayConnection(); // BeanInstance EntryBean = myGateway.getService(myEJB); if (EntryBean != null) { textCon = "Connection Established\nEntryBean:" + EntryBean; EntryBean.create(createRes); } else { EJBtext.text = "Cannot connect to server."; } }
createRes.onResult = function (resData:Object):Void { EntryEJB = resData; EJBtext.text = textCon + "\n\nGot Bean Instance.\nEntryEJB: " + EntryEJB; } createRes.onStatus = function (resData:Object):Void { EJBtext.text = textCon + "\ncreate() - STATUS: \n" + resData.description; }
init(); stop();
FRAME2: var noiseRes:Object = new Object(); _global.System.onStatus = noiseRes.onStatus;
// Resulthandler noiseRes.onResult = function (resData:Object):Void { EJBtext.text = "makeSomeNoise() works!\n" + resData; } noiseRes.onStatus = function (resData:Object):Void { EJBtext.text = "makeSomeNoise() sucks.\n" + resData.description; }
EntryEJB.makeSomeNoise(noiseRes);
stop();
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Server geeks, take heart! If you're sick of wading through animation & graphics instruction for relevant info., then Nate Weiss' Macromedia Flash MX Professional 2004 for Server Geeks is for you. Leave designing to designers and dig into core concepts to create rich user interfaces, online advertising, and more. See www.peachpit.com for more info. Yahoo! Groups Links
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Server geeks, take heart! If you're sick of wading through animation & graphics instruction for relevant info., then Nate Weiss' Macromedia Flash MX Professional 2004 for Server Geeks is for you. Leave designing to designers and dig into core concepts to create rich user interfaces, online advertising, and more. See www.peachpit.com for more info. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/FLASHmacromedia/
<*> To unsubscribe from this group, send an email to: FLASHmacromedia-unsubscribe@(protected)
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
|
 |