Home > Archive > EAserver > December 2005 > UDP Server in EAS 5.2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author UDP Server in EAS 5.2
KR

2005-12-26, 11:23 am

I need to implement a udp server app to run in EAS. We will have a few
hundred different sources sending udp packets to a certain port on EAS. I
have coded a java class to read from the port, parse the data and call a
data access class to write the data to a DB. I only have experience
deploying PB components to EAS, but I have plenty of Java experience, just
not with EAS. I'm using Eclipse as my IDE, but not sure how to deploy from
Eclipse to EAS. I tried the Lomboz plugin, but it doesn't seem to work.
Let's say I'm sending the udp packets to port 9500, do I need to configure
EAS to listen on that port or anything? All of my java apps have been
server apps where the java class, component, or ejb is called from a JSP, so
this will be different. In my java UDPServer class, should I just have a
main() method and somehow have the main method called?

Thanks,
K


Carson Hager

2005-12-26, 1:23 pm

You're not going to be able to use EAS listeners for this. I would deploy
your listener as a service component so that it starts up when the server
starts. Instead of a main() method, invoke the startup of the socket
listening from the run method of your component.


Carson



"KR" <kjr_23-nospamhere@yahoo.com> wrote in message
news:43b02741$1@foru
ms-1-dub...
>I need to implement a udp server app to run in EAS. We will have a few
>hundred different sources sending udp packets to a certain port on EAS. I
>have coded a java class to read from the port, parse the data and call a
>data access class to write the data to a DB. I only have experience
>deploying PB components to EAS, but I have plenty of Java experience, just
>not with EAS. I'm using Eclipse as my IDE, but not sure how to deploy from
>Eclipse to EAS. I tried the Lomboz plugin, but it doesn't seem to work.
>Let's say I'm sending the udp packets to port 9500, do I need to configure
>EAS to listen on that port or anything? All of my java apps have been
>server apps where the java class, component, or ejb is called from a JSP,
>so this will be different. In my java UDPServer class, should I just have
>a main() method and somehow have the main method called?
>
> Thanks,
> K
>



KR

2005-12-26, 8:24 pm

Thanks Carson. So it sounds like I should have my java class extend thread,
or create a thread and pass the thread my class with code in the run event.
Then in Jagmanager, I guess I would specify that the component is a service
component so it will start with EAS. To get the component into EAS, do I
create a WAR file from Eclipse and import it into Jag Manager as a web
application? Is there documentation anywhere on importing non-ejb java
applications?

Thanks,
K

"Carson Hager" <carson. hager@do_not_spam_cy
nergysystemsDOTcom> wrote in
message news:43b02f6b$1@foru
ms-1-dub...
> You're not going to be able to use EAS listeners for this. I would deploy
> your listener as a service component so that it starts up when the server
> starts. Instead of a main() method, invoke the startup of the socket
> listening from the run method of your component.
>
>
> Carson
>
>
>
> "KR" <kjr_23-nospamhere@yahoo.com> wrote in message
> news:43b02741$1@foru
ms-1-dub...
>
>



Carson Hager

2005-12-26, 8:24 pm

You don't have to include the implements keyword. Just implement stop(),
run() and start(). The best way to deploy this will be using EAServer
Manager. You can right click on a package and select Create Component. You
can then choose to import a Java class. Make sure your class is located
within %easerver%\java\clas
ses. After you import, generate/compile stubs and
skeletons. You will likely also need to add the CtsServices::Generic
Service
IDL interface to your components list of interfaces. You can do this with
EAserver Manager as well. At this point, you should be able to add your
component to the list of Installed Services using EAServer Manager.


Carson




"KR" <kjr_23-nospamhere@yahoo.com> wrote in message
news:43b049b6$1@foru
ms-1-dub...
> Thanks Carson. So it sounds like I should have my java class extend
> thread, or create a thread and pass the thread my class with code in the
> run event. Then in Jagmanager, I guess I would specify that the component
> is a service component so it will start with EAS. To get the component
> into EAS, do I create a WAR file from Eclipse and import it into Jag
> Manager as a web application? Is there documentation anywhere on
> importing non-ejb java applications?
>
> Thanks,
> K
>
> "Carson Hager" <carson. hager@do_not_spam_cy
nergysystemsDOTcom> wrote in
> message news:43b02f6b$1@foru
ms-1-dub...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com