quality@glassfish.java.net

Re: [Problem]Spring In Glassfish

From: Tang Yong <tangyong_at_cn.fujitsu.com>
Date: Wed, 11 Mar 2009 08:59:12 +0800

Hi Judy,Wim,

I still have not test the spring app with GFV3,

However, If admin spec in GFV3 have not changed a lot than V2,
theorially, I think the SM problem maybe exist.

In addtion, My team member has tested the Spring JMX registed in GF's
MBeanServre successfully,and I feel that this is a good news.

--Mike Tang
  ----- Original Message -----
  From: Judy Tang
  To: quality_at_glassfish.dev.java.net
  Sent: Wednesday, March 11, 2009 9:06 AM
  Subject: Re: [Problem]Spring In Glassfish


  Thanks Wim and Mike so much for helping us testing with Spring. Please help us to file bugs
  if any :-)

  Judy

  Tang Yong wrote:
Hi Wim,

  Thanks for your reply!

  I have not tested in a non-clustered environment.However,
according to your suggestion, I will try it. And if having test
result, I will inform you and others.

--Mike Tang


Hi Mike, Vince,

I wasn't able to follow the thread realtime, but just did some catching up
on the last 15 posts or so, since we might have a problem here:). I could do
some further testing if you like on the subject (in a couple off days
though, really busy at the moment). But please fill me in on the current
situation.

I've made the following resume trying to make an overview of the test
results. Please correct or add inline in case something is wrong or
inaccurate.

One big question though : has this been tested in a non-clustered
environment? In case yes, with same results or not.

Please fill me in, and I'll see what I can do.

Thanks,

Wim



RESUME OF CURRENT TEST RESULTS :
Spring 2.5.5 or 2.5.6 + Glassfish V3 Prelude b39


Environm :
- Clustered glassfish b39 + spring 2.5.5 ; web application
- DEFAULT Domain server.policy which does NOT include permission for
instanceroot/lib
grant codeBase "file:${com.sun.aas.instanceRoot}/lib/-
- Spring.jar placed under instanceRoot/lib, NOT installRoot/lib

Reproduction:

CASE 1 : Security manager is turned ON in domain.xml
--------------

1) Starting server with
asadmin start-domain domain
yields an error (please attach clean server.log and jvm.log)

2) Starting server with
asadmin create-jvm-options --user admin -Djava.security.manager
yields the same error


CASE 2 : Security manager is turned OFF in domain.xml (DEFAULT)
--------------

1) Starting server with
asadmin start-domain domain
works fine

2) Starting server with
asadmin create-jvm-options --user admin -Djava.security.manager
works fine, but SHOULD yield error cause of missing permission in
server.policy

NOTE here : have to look into, but could be expected behaviour.


-----Original Message-----
From: Tang Yong [mailto:tangyong_at_cn.fujitsu.com]
Sent: dinsdag 10 maart 2009 7:29
To: quality_at_glassfish.dev.java.net
Subject: Re: [Problem]Spring In Glassfish

Hi Judy,

Thanks for your reply!

My problem is still open, and I will do some investigation about this
problem,
on the other hand, I also request gf team to look into the issue.

Best Regard!

--Mike Tang


  Hi Mike,

You have asked many good questions and thank you so much for testing
Spring In GlassFish. It is a very helpful testing. If your question
is still open, let's look into this more.


"When I have seen the server.policy file, I did not find the sentence
related "grant codeBase "file:${com.sun.aas.instanceRoot}/lib/-" {
permission java.security.AllPermission;
};"
BTW: my spring.jar is placed in the "${com.sun.aas.instanceRoot}/lib/"
which is valid for the whole domain."

Thanks Vince and Jagadesh for the help !

Judy

Tang Yong wrote:
    Hi Kraemer,

Thanks your reply very much. Response in-line, below....

      Which version of GF are you using?
        GF V2.1 b60 cluster profile.
      I would assume there is some other entry in the server.policy file that
is granting the necessary permissions.
        Kraemer, I also think so,and I try finding these entries,but I did not
      get my expected result.
  Maybe my knowledge on 'SM' is not well.

      What is the full path to:

1. asadmin
2. your spring.jar

My guess is that you put spring.jar in the installRoot, not the
instanceRoot.
        I have placed the spring.jar into the instanceRoot, rather than
      installRoot.
  I know that the app can have access to the jar in the installRoot/lib.

Best Regard!
--Mike Tang

      thanks,
vbk

Tang Yong wrote:
        Hi Kraemer,

I am sorry for interupting your work again.

According your reply, I do some investigating on the 'SM' and try the
          spring web sample again.
  The result is as following:
1 Because my GF's profile is cluster(not enterprise profile), by
          default, 'SM' is disabled.
     So, I turned on the 'SM' by means of "asadmin create-jvm-options
          --user admin -Djava.security.manager",
     Then, I restarted the GF. (The above config info is from "GF
          Enterprise Server 2.1 Developer's Guide".
  2 I redeployed the spring web sample.
3 Running is still well.

Although the result displayed that Kraemer's "Probably", I have a
          problem related the result:
  When I have seen the server.policy file, I did not find the sentence
          related "grant codeBase "file:${com.sun.aas.instanceRoot}/lib/-" {
      permission java.security.AllPermission;
};"
BTW: my spring.jar is placed in the "${com.sun.aas.instanceRoot}/lib/"
          which is valid for the whole domain.
  So, I want to know why spring.jar has been granted?

Regard!

--Mike Tang.


  
          Response in-line, below....

vbk

Tang Yong wrote:
    
            Hi Kraemer,

Thanks for your reply, and I indeedly expected your reply.

Your explaination is very detailed and I have knowed a lot.

However, due to my poor English, I want to confirm my understanding
              with you:
  1 Whether or not glassfish version changed, if I turn on the 'SM', I
              will run into
     the similar issues related 'SM'.
   (BTW: I will try it.)
  
      
              I can only say, "Probably". I haven't tried it for a long time (in
            terms
  of software 'years')

    
            2 For current glassfish version, 'SM' is disabled by default.
  
      
              Yes.

    
            Kraemer, I have a suggestion:
Although the blog is not a formal document, I (we) still
              believe/respect the sun's blog.(:).
  However, I wish that to some blog's content, you/experts can update
              the content a litter.
  Even adding some more valuable materials.
  
      
              Hmm... I have to disagree with you on this... Blogs are 'stuff I
learned... that I am sharing with you'. The power of a blog comes from
others (like yourself) doing the same.. learning something and then
sharing it, via a blog (or e-mail list or social network or...)

You see, I WAS an expert on this topic... at that time... since I was
working on it actively. At this point, you are the expert... not me...
since YOU are working actively in this area.

By sharing what you know, NOW, you will spur others to make their own
discoveries and publish them... to the benefit of all of us.

vbk

    
            In addition, Spring on GF is an important topic, if you know the
              weblogic ejb container implementation(using pitchfork).
  Because Spring on GF may be let us make more valuable decisions in
              designing mission-critical enterprise app.
  Thanks again!

Best Regard!

--Mike Tang, MiddleWare Developer,From Fujitsu China


  
      
              Hi Mike,

The problem that you are referring to was due to the fact that the
Security manager was enabled by default when the blog entries were
written. The default state (on or off) of the SM was changed very
                early
  in the v1 development cycle... (to OFF)... due to the errors that
                Matt
  and Jerome encountered.

Note: if the 'turn on the SM' you will run into issues similar to
                those
  discussed in the blogs entries...

Since blogs are not 'documentation' in the formal sense, you have to
consider their age as you read their content.

The blog entries you cite were about experiences with a server that
existed a couple years ago... that was changing on a daily basis...

that said, I am gald to hear that you are making progress with
                Spring on GF.
  vbk

        
                ---------------------------------------------------------------------
To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: quality-help_at_glassfish.dev.java.net



    

---------------------------------------------------------------------
To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: quality-help_at_glassfish.dev.java.net