• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Own TCP server within Weblogic

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing a TCP server and trying to run it from within weblogic.

Here are the steps I followed.

During weblogic startup (ie web application start) I create a thread which is a java ServerSocket running on configured port say for example 5555 or 8888.

Later clients send tcp requests to this java server and server responds.

Each client request is handled in a seperate thread.

This works well on windows.

I am having problems when i deploy this on unix in test environment.

My question is whether is it a good idea to run my own Server socket from within weblogic.If it is not what is the common way of implementing this kind of requirement.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by robert sturn:
My question is whether is it a good idea to run my own Server socket from within weblogic.



I think it's a Bad Idea:

If application components contain the same functionality
provided by J2EE system infrastructure, there are clashes and mis-management of the functionality.
For example, if enterprise beans were allowed to manage threads, the J2EE
platform could not manage the life cycle of the enterprise beans, and it could not properly manage transactions.


J2EE 1.4 Specification section 6.2.1 Programming Restrictions

You are very light on the details of your situation, but I'd be inclined to make the custom server stand-alone and have it communicate with the main application via message queues, RMI/EJB calls, web services or something of that nature.
 
robert sturn
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Joe for reply.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have the same question:
In this moment I have a JAVA multi-thread Server used to manage multi-clients connection for TCP raw data.
The data flow is insert in a WebLogic 9.3 queue with a JMS producer.
Now I need to deploy the TCP server inside the WL server, but I need to configure WL to open a configurable port for that raw TCP traffic.
Is that possible?
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.
You should take a few minutes and read our FAQ: HowToAskQuestionsOnJavaRanch. It's a Bad Idea to hijack a post, especially when the general direction of the post recommends a course of action that is the opposite of the one you have taken.

but I need to configure WL to open a configurable port for that raw TCP traffic.


WebLogic does not block ports. If you have your own ServerSocket listening for connections, WebLogic doesn't manage the connection at all (which is why it's a Bad Idea) and therefore doesn't need to be configured.
 
reply
    Bookmark Topic Watch Topic
  • New Topic