The default JavaFactory that is used by the RemotingService’s JavaAdapter simply locates classes using Class.forName from the web application class path. Perhaps you could create a façade class that looked up your EJB from its JNDI name? Other alternatives are to write a new, EJB specific factory or consider merging the flex war file and your existing ear file?

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of swe_reddy
Sent: Wednesday, June 28, 2006 6:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Help with remote objects and EJB Jar files.

 

Hi,

I am using EJB 3 for my server side code.I have put the ejb jar
files under {app-dir}\WEB-INF\lib.

In my flex-remoting-service.xml I have
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service"
class="flex.messaging.services.RemotingService"
messageTypes="flex.messaging.messages.RemotingMessage">

<adapters>
<adapter-definition id="java-object"

class="flex.messaging.services.remoting.adapters.JavaAdapter"
default="true"/>
</adapters>

<default-channels>
<channel ref="my-amf"/>
</default-channels>

<destination id="remoteObjectSession">
<properties>
<source>com.vs.cm.ejb.session.RemoteObjectSession</source>
</properties>
</destination>
</service>

The source in here is the path of the RemoteObjectSession.java in
the ejb jar file.

my mx:RemoteObject is
<mx:RemoteObject id="obj" destination="remoteObjectSession"
fault="faultHandler(event)">
<mx:method name="getAllValues" result="getAllValuesHandler(event)"/>
</mx:RemoteObject>

getAllValuesHandler(event)is taken care of in <mx:script>

When I run this in JRun I get an error saying
Cannot create class of
type 'com.vs.cm.ejb.session.RemoteObjectSession'.

Can anyone please tell me how I configure EJB jars in flex 2.0,jrun
to get this working.

Thanks
Swetha

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to