Caching of Seam Remoting Interface Components
by Ashish Tonse
All,
I am currently working on implementing Seam on part of a relatively high
traffic site (8k+ concurrent users) and optimizing our backend and frontend
to handle that traffic. When focusing on front-end, I'm trying to make sure
that the right HTTP caching headers are sent out -- but our Seam Remoting
javascript files can't be browser-cached for a couple of reasons:
/interface.js?componentName won't get cached due to it containing a query
string and the way browsers handle those
/remote.js always returns an HTTP 200 with the actual file contents,
whereas this file would only change with new Seam releases (is that
correct?)
Also, neither of these JS files are combined, packed or minified.
The Seam Remoting InterfaceGenerator does have an interface cache for each
component, so at least that time is saved. But it still sends back
unnecessary unchanged content to the browser. Since javascript downloads
block all other downloads in the browser, this is especially noticeable with
load times, making the page seem slower.
A good potential solution (suggested by Dan Allen on twitter) to the first
issue... use the ReWrite filter. My guess would be something like this:
/interface/componentName.js --> interface.js?componentName
And if we sent the right HTTP caching headers, that would fix that issue
and browsers could cache it. But what about using multiple components? This
is what I propose...
/interface/componentName1,componentName2,componentName3.js ----->
/interface.js?componentName1,componentName2,componentName3
these still are valid and "RESTful" URLs... and can be cached.
Is this something reasonable enough that I can take on as my first
Seam contribution? (Seems
small enough)...
Furthermore, in non-debug mode, Seam should send back minified Javascript
(using the Java based YUI-compressor)
Please let me know your thoughts before I get started,
Thanks,
Ashish Tonse
Kaizen Consulting
15 years, 4 months
Things to do after committing a change in an xml file of the reference manual?
by denis.forveille@gmail.com
I've corrected a minor bug in the seam reference guide (JBSEAM-4256).
For this I updated and committed the file named
"doc/Seam_Reference_Guide/en-US/I18n.xml"
Q:
- do I have to do something extra (update/generate/commit/?) to cope
with the corresponding "I18n.po" files for the other locales?
- or is it the build (or someone/something else) that will
update/generate/commit those files?
Thx
15 years, 4 months
Seam 2.2.0.CR1 testing results
by Ondřej Skutka
Hi!
I'm sending you results of the Seam 2.2.0.CR1 testing. We focused on JDK
1.6 / JBoss 5.1.0 GA as this is the platform that EAP 5 is based on.
We have found four critical/blocker issues (seam-gen, JBDS: JBSEAM-4265,
JBSEAM-4258, JBSEAM-4257, JBSEAM-4266) and thus I think that we should
go with a CR2 release and run all the tests again to ensure that the
resolved bugs don't break anything. Jozef will be back at work by
tomorrow, so the CR2 testing should be faster that the CR1.
Although I have closed JBSeam-4269 as a duplicate of JBSEAM-4266, I'm
not all that sure it's the same bug.
We haven't tested Portlet Bridge and Tomcat 6. We are going to test
tomcat 6 tomorrow.
Thanks Jozef for testing the seam-gen even though he was on PTO!
Ondra
15 years, 4 months
Seam 2.2.0.CR1 released
by Pete Muir
http://in.relation.to/Bloggers/Seam220CR1Released
Many thanks to Norman for managing the work on this release, Tiho and
Stuart for their major contributions, and Ondrej and Jozef for finding
lots of issues during testing.
We'll try to move quite quickly to GA, so let's get any issues that
people reported tracked and fixed quickly :-)
15 years, 4 months
Re: Hibernate search 3.1.1.GA w/ seam
by Sanne Grinovero
I've been stepping through the blog example with a debugger to look
into JBSEAM-4257;
the transaction is fine but it appears that it doesn't get to commit
after the method invocation.
If I convert the component to a @Stateful bean *and* change the "@In
FullTextEntityManager" into
a "@PersistenceContext EntityManager" it does work: the transaction is
committed and the test
succeeds.
If I only convert the pojo into a Stateful bean and keep using "@In"
to inject entitymanager, it doesn't
inject and the method is called having null EntityManager -> NPE.
The dvdstore example is not affected by this, as the indexer
implementation of dvdstore
is using a @Stateful bean and @PersistenceContext already.
The problem is the @Create annotated method combined with @Startup and
@Scope(ScopeType.APPLICATION):
if I remove @Startup and have the method called before the first
search (I experimented having it injected with create=true in the
search
service) the behaviour is correct: the transaction is committed, the
index is updated and the search results are fine.
I've opened JBSEAM-4278 for this; should I open a second one for the
missing injections in EJB3 stateful beans?
I'm not sure if it the same issue, I mentioned it in the description.
Sanne
2009/6/26 Emmanuel Bernard <emmanuel(a)hibernate.org>:
> That's a problem. We need to understand why no tx is enlisted from an
> hibernate pov. Looks like a config bug or something more severe on the
> hibernate side.
>
> On 26 juin 2009, at 01:09, Sanne Grinovero <sanne.grinovero(a)gmail.com>
> wrote:
>
>> Hi Norman, Emmanuel,
>> I think it was working for Norman in JBoss because it somehow used the
>> existing index, as the blog example was not doing cleanup;
>> removing the index I verified it behaves the same when deployed or with
>> testNG.
>>
>> I've attached a patch here to remove existing data from the index at
>> startup (purgeAll) and making sure the new data
>> is flushed to the index (entityManager.flushToIndexes();).
>>
>> This makes the test succeed, but I'm unsure about this being the
>> proper fix. Emmanuel, WDYT? I was not expecting
>> to have the flushToIndexes being mandatory... it appears there is no
>> transaction committed by Seam?
>> The dvdstore is using a similar indexing routine, and it appears to be
>> working fine even withouth the flush.
>>
>> greetings,
>> Sanne
>>
>>
>> 2009/6/24 Sanne Grinovero <sanne.grinovero(a)gmail.com>:
>>>
>>> Hello,
>>> I can look into this on friday 26, is that a good time?
>>>
>>> Sanne
>>>
>>> 2009/6/24 Emmanuel Bernard <emmanuel(a)hibernate.org>:
>>>>
>>>> My machine crashed yesterday so I won't be able to look into that.
>>>> Sanne probably can help as he has done the latest Hibernate migration in
>>>> Seam.
>>>> Or maybe Hardy.
>>>>
>>>> Emmanuel
>>>>
>>>> On Jun 23, 2009, at 06:57, Emmanuel Bernard wrote:
>>>>
>>>>> Damn I'm on the road this week.
>>>>> Can you give me the SVN url for me to reproduce?
>>>>>
>>>>> That must be a dump thing.
>>>>>
>>>>> On Jun 23, 2009, at 02:59, Norman Richards wrote:
>>>>>
>>>>>> We've upgraded Hibernate search for Seam 2.2, but we're getting one
>>>>>> small
>>>>>> issue with it when running unit tests with the blog example:
>>>>>>
>>>>>> https://jira.jboss.org/jira/browse/JBSEAM-4257
>>>>>>
>>>>>> I tracked it down to being an issue with the index directory not
>>>>>> getting
>>>>>> correctly populated. If I copy the index directory from the blog
>>>>>> example
>>>>>> running in jboss, everything works fine. Any ideas why the index
>>>>>> wouldn't
>>>>>> be created correctly?
>>>>>>
>>>>>> Specifically, what is created during unit tests is:
>>>>>>
>>>>>> $ ls -al domain.BlogEntry/
>>>>>> total 16
>>>>>> drwxr-xr-x 4 orb staff 136 Jun 22 19:19 .
>>>>>> drwxr-xr-x 3 orb staff 102 Jun 22 19:19 ..
>>>>>> -rw-r--r-- 1 orb staff 20 Jun 22 19:19 segments.gen
>>>>>> -rw-r--r-- 1 orb staff 28 Jun 22 19:19 segments_1
>>>>>>
>>>>>>
>>>>>> whereas when running in AS, I get:
>>>>>>
>>>>>> burrito:blogindexes orb$ ls -al domain.BlogEntry
>>>>>> total 168
>>>>>> drwxr-xr-x 19 orb staff 646 Jun 9 14:32 .
>>>>>> drwxr-xr-x 3 orb staff 102 Jun 3 15:19 ..
>>>>>> -rw-r--r-- 1 root staff 6027 Jun 9 13:15 _2s.cfs
>>>>>> -rw-r--r-- 1 root staff 9 Jun 9 13:52 _2s_3.del
>>>>>> -rw-r--r-- 1 root staff 4818 Jun 9 13:15 _2t.cfs
>>>>>> -rw-r--r-- 1 root staff 9 Jun 9 13:52 _2t_1.del
>>>>>> -rw-r--r-- 1 root staff 1121 Jun 9 13:15 _2u.cfs
>>>>>> -rw-r--r-- 1 root staff 9 Jun 9 13:52 _2u_1.del
>>>>>> -rw-r--r-- 1 root staff 976 Jun 9 13:52 _2v.cfs
>>>>>> -rw-r--r-- 1 orb staff 9 Jun 9 14:32 _2v_1.del
>>>>>> -rw-r--r-- 1 root staff 4818 Jun 9 13:52 _2w.cfs
>>>>>> -rw-r--r-- 1 orb staff 9 Jun 9 14:32 _2w_1.del
>>>>>> -rw-r--r-- 1 root staff 1121 Jun 9 13:52 _2x.cfs
>>>>>> -rw-r--r-- 1 orb staff 9 Jun 9 14:32 _2x_1.del
>>>>>> -rw-r--r-- 1 orb staff 976 Jun 9 14:32 _2y.cfs
>>>>>> -rw-r--r-- 1 orb staff 4818 Jun 9 14:32 _2z.cfs
>>>>>> -rw-r--r-- 1 orb staff 1121 Jun 9 14:32 _30.cfs
>>>>>> -rw-r--r-- 1 orb staff 20 Jun 9 14:32 segments.gen
>>>>>> -rw-r--r-- 1 orb staff 254 Jun 9 14:32 segments_8r
>>>>>>
>>>>>> If you can even give me some idea what code to look at, it would be a
>>>>>> great help. Thanks.
>>>>>>
>>>>>
>>>>
>>>>
>>>
>> <examples-blog.diff>
>
15 years, 4 months
Re: [Fwd: Seam 2.2.0.CR1 initial testing results]
by Marek Novotny
See my comments inline
Ondřej Skutka píše v Po 22. 06. 2009 v 10:30 +0200:
> E-mailová zpráva příloha, "Přeposlaná zpráva - Seam 2.2.0.CR1 initial
> testing results"
> > -------- Přeposlaná zpráva --------
> > Od: Ondřej Skutka <oskutka(a)redhat.com>
> > Komu: seam-dev(a)lists.jboss.org Development List
> > <seam-dev(a)lists.jboss.org>
> > Předmět: Seam 2.2.0.CR1 initial testing results
> > Datum: Fri, 19 Jun 2009 15:11:14 +0200
> >
> > Hi!
> >
> > These are library changes since 2.1.2.GA:
> >
> > Added libraries:
> > ./ui/target/jboss-seam-ui-sources.jar
> > ./ui/target/jboss-seam-ui.jar
> > ./lib/drools-api.jar
Drools 5 upgrade
> > ./lib/drools-decisiontables.jar
Tiho's changes for Drools
> > ./lib/drools-templates.jar
Tiho's changes for Drools
> > ./lib/ejb3-persistence.jar 1.0.2
Dependency for new hibernate-search
> > ./lib/gen/ant.jar
I reverted back this dependency, due eclipse .classpath generation was
failing in Eclipse IDE
> > ./lib/xml-apis.jar
> >
> >
> >
> > Library changes:
> > lib/hibernate.jar (3.2.4.SP1) => lib/hibernate-core.jar (3.3.1.GA)
> > lib/mvel14.jar (1.2.21) => lib/mvel2.jar (2.0.10)
Drools upgrade
> >
> > janino 2.5.10 => 2.5.15
Drools upgrade
> > antlr-runtime 3.0 => 3.1.1
Drools upgrade
> > lucene 2.3.0 => 2.4.1
> > drools 4.0.4 => 5.0.1
Drools upgrade
> > eclipse jdt core 3.2.3 => 3.4.2
Drools upgrade
> > hibernate-annotations 3.3.0.GA => 3.4.0.GA
> > hibernate-commons-annotations 3.0.0.GA => 3.1.0.GA
> > hibernate-entitymanager 3.3.1.GA => 3.4.0.GA
> > hibernate-search 3.0.1.GA => 3.1.1.GA
> > hibernate-validator 3.0.0.GA => 3.1.0.GA
> > jboss-embedded-api-beta3 => jboss-embedded-api-beta3.SP7
All above is related to hibernate libs upgrade
> >
> > Removed libraries:
> > ./lib/asm-attrs.jar
> > ./lib/asm.jar
> > ./lib/cglib.jar
> > ./lib/metawidget-backend.jar
> > ./lib/metawidget-frontend.jar
> > ./lib/metawidget.jar
> >
> > Newly needed libraries (pulled in by maven in compile-time)
> > joda-time-1.6.jar
Drools 5 upgrade
> > jxl-2.6.8-seam.jar
> > slf4j-api-1.4.2.jar
Dependency for new hibernate libs and wicket
> >
> > The 2.2.0.CR1 testing will be done by tomorrow.
> >
> > Ondra
--
Marek Novotny
--
JBoss Seam Product Lead
Red Hat Czech s.r.o.
Purkynova 99
612 45 Brno
Email: mnovotny(a)redhat.com
Office phone: +420 532 294 287, ext. 82-62 087
mobile: +420 608 509 230
------------------------------------------------------
Looking to carve out IT costs?
www.europe.redhat.com/promo/carveoutcosts/
15 years, 5 months
Getting more out of annotation processors
by Gavin King
Folks, as we start work on Seam3, and the tooling for Seam3, we need
to look out for opportunities to get more out of annotation
processors. They can help us solve certain problems that we weren't
able to easily solve in the past.
One thing I would definitely like us to do is DAO generation. What I'm
thinking of is like a next generation version of the "framework"
package in Seam. For example, for each entity like Customer we could
generate a class CustomerHome extending EntityHome and adding typesafe
finder methods (findByName() and friends). Of course, the user could
extend and specialize this generated class to override or add extra
functionality.
It would even be possible to generate JSF composite components for
each entity, i.e. <e:displayCustomer/>, <e:editCustomer/>,
<e:displayCustomerAsRow/>.
Of course, all this would need to work nicely in Eclipse.
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
15 years, 5 months
Seam 2.2.0.CR1
by Norman Richards
CR1 has been tagged. We should try and limit the Seam_2_2 branch to
only things that should be fixed for 2.2.0.GA.
15 years, 5 months
Deployment issues in JBoss-Embedded
by Marek Novotny
Hi,
first I know that JBoss Embedded is not supported, but anyway if
somebody can help me, I'd appreciate it very much.
I get the attached exception in seam integration testsuite. Sometimes it
is thrown without java.util.ConcurrentModificationException stacktrace.
What was changed in JBoss Embedded? I upgraded hibernate libs:
hibernate-core to 3.3.1.GA
hibernate-annotations to 3.4.0.GA
hibernate-commons-annotations to 3.1.0.GA
hibernate entitymanager to 3.4.0.GA
hibernate-validator to 3.1.0.GA
in test-build dir which is in classpath is the following
destinations-service configuration:
<server>
<mbean code="org.jboss.mq.server.jmx.Topic"
name="jboss.mq.destination:service=Topic,name=testTopic">
<depends optional-attribute-name="ServerPeer">
jboss.messaging:service=ServerPeer
</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=testQueue">
<depends optional-attribute-name="ServerPeer">
jboss.messaging:service=ServerPeer
</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
</server>
Thanks in advance,
--
Marek Novotny
--
JBoss Seam Product Lead
Red Hat Czech s.r.o.
Purkynova 99
612 45 Brno
Email: mnovotny(a)redhat.com
Office phone: +420 532 294 287, ext. 82-62 087
mobile: +420 608 509 230
------------------------------------------------------
Looking to carve out IT costs?
www.europe.redhat.com/promo/carveoutcosts/
15 years, 5 months