Results 1 to 3 of 3

Thread: spring blazeds hostname and port

  1. #1

    Talking spring blazeds hostname and port

    Hi,

    I have configured successfully spring and blazeds; However, I need to get ipaddress, host and port on my server side(java). How do i get that address and port name of my server since they are all POJOs and only works with spring configuration.

    e.g. in my spring configuration

    <!--other flex configuration--->
    <bean id="myService" class="com.example.MyService">
    </bean>
    <flex:remoting-destination channels="my-amf" ref="myService" />

    com.example.MyService.java is a POJO. I need to get my server address and port number in that POJO.

    Is that possible? or any other better idea? Thanks in advance.

  2. #2
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    Do you absolutely need to resolve it dynamically at runtime? If so, the only good way I know to do that is with the Servlet API, but having a dependency on HttpServletRequest in a Service object is not at all ideal. What is your actual use case?
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  3. #3

    Default

    Thanks for suggestion.
    I need to let the client knows what server he/she is connecting to. So I guess this should be determined in runtime. I considered using HTTPServlet include in my service class but I guess it would be a mess. Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •