torquebox-cache 2.0.0.beta1-java → 2.0.0.beta2-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- # Copyright 2008-2011 Red Hat, Inc, and individual contributors.
1
+ # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
2
2
  #
3
3
  # This is free software; you can redistribute it and/or modify it
4
4
  # under the terms of the GNU Lesser General Public License as
data/lib/cache.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2008-2011 Red Hat, Inc, and individual contributors.
1
+ # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
2
2
  #
3
3
  # This is free software; you can redistribute it and/or modify it
4
4
  # under the terms of the GNU Lesser General Public License as
@@ -94,6 +94,7 @@ module TorqueBox
94
94
  end
95
95
 
96
96
  def initialize(opts = {})
97
+ return nothing unless INFINISPAN_AVAILABLE
97
98
  @options = opts
98
99
  options[:transaction_mode] = :transactional unless options.has_key?( :transaction_mode )
99
100
  options[:locking_mode] ||= :optimistic if (transactional? && !options.has_key?( :locking_mode ))
@@ -364,9 +365,13 @@ module TorqueBox
364
365
  if options[:index]
365
366
  log( "Configuring #{name} local cache for local-only indexing" )
366
367
  config.indexing.index_local_only(true)
368
+ else
369
+ log( "Configuring #{name} local cache with no indexing" )
370
+ config.indexing.disable
367
371
  end
368
372
 
369
373
  if ((local_manager = Cache.find_local_manager(name)) == nil)
374
+ log( "No local CacheManager exists for #{name}. Creating one." )
370
375
  local_manager = org.infinispan.manager.DefaultCacheManager.new
371
376
  local_manager.define_configuration( name, config.build )
372
377
  Cache.local_managers << local_manager
@@ -1,4 +1,4 @@
1
- # Copyright 2008-2011 Red Hat, Inc, and individual contributors.
1
+ # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
2
2
  #
3
3
  # This is free software; you can redistribute it and/or modify it
4
4
  # under the terms of the GNU Lesser General Public License as
@@ -1,18 +1,20 @@
1
- #
2
- # Copyright 2011 Red Hat, Inc.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
2
+ #
3
+ # This is free software; you can redistribute it and/or modify it
4
+ # under the terms of the GNU Lesser General Public License as
5
+ # published by the Free Software Foundation; either version 2.1 of
6
+ # the License, or (at your option) any later version.
7
+ #
8
+ # This software is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this software; if not, write to the Free
15
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
16
+ # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
17
+
16
18
  require "digest/sha1"
17
19
  require 'dm-core'
18
20
  require 'cache'
@@ -53,7 +55,6 @@ module DataMapper::Adapters
53
55
  end
54
56
 
55
57
  def read( query )
56
- records = []
57
58
  query.filter_records(@search.search( query ))
58
59
  end
59
60
 
@@ -1,18 +1,20 @@
1
- #
2
- # Copyright 2011 Red Hat, Inc.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
2
+ #
3
+ # This is free software; you can redistribute it and/or modify it
4
+ # under the terms of the GNU Lesser General Public License as
5
+ # published by the Free Software Foundation; either version 2.1 of
6
+ # the License, or (at your option) any later version.
7
+ #
8
+ # This software is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this software; if not, write to the Free
15
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
16
+ # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
17
+
16
18
  require 'dm-serializer'
17
19
  require 'jruby/core_ext'
18
20
  require 'json'
@@ -1,18 +1,19 @@
1
- #
2
- # Copyright 2011 Red Hat, Inc.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
2
+ #
3
+ # This is free software; you can redistribute it and/or modify it
4
+ # under the terms of the GNU Lesser General Public License as
5
+ # published by the Free Software Foundation; either version 2.1 of
6
+ # the License, or (at your option) any later version.
7
+ #
8
+ # This software is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this software; if not, write to the Free
15
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
16
+ # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
16
17
 
17
18
  module Infinispan
18
19
 
@@ -1 +1,18 @@
1
+ # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
2
+ #
3
+ # This is free software; you can redistribute it and/or modify it
4
+ # under the terms of the GNU Lesser General Public License as
5
+ # published by the Free Software Foundation; either version 2.1 of
6
+ # the License, or (at your option) any later version.
7
+ #
8
+ # This software is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this software; if not, write to the Free
15
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
16
+ # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
17
+
1
18
  require 'datamapper/dm-infinispan-adapter'
data/lib/gem_hook.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2008-2011 Red Hat, Inc, and individual contributors.
1
+ # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
2
2
  #
3
3
  # This is free software; you can redistribute it and/or modify it
4
4
  # under the terms of the GNU Lesser General Public License as
Binary file
@@ -1,6 +1,6 @@
1
1
  module TorqueboxCache
2
- VERSION = '2.0.0.beta1'
3
- MAVEN_VERSION = '2.0.0.beta1'
2
+ VERSION = '2.0.0.beta2'
3
+ MAVEN_VERSION = '2.0.0.beta2'
4
4
  end
5
5
  begin
6
6
  require 'java'
@@ -339,8 +339,8 @@ describe DataMapper::Adapters::InfinispanAdapter do
339
339
  end
340
340
 
341
341
  after :all do
342
- #FileUtils.rm_rf( @configured_dir )
343
- #FileUtils.rm_rf( @default_dir )
342
+ FileUtils.rm_rf( @configured_dir )
343
+ FileUtils.rm_rf( @default_dir )
344
344
  FileUtils.rm_rf( @snuffy )
345
345
  end
346
346
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: torquebox-cache
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 2.0.0.beta1
5
+ version: 2.0.0.beta2
6
6
  platform: java
7
7
  authors:
8
8
  - The TorqueBox Team
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-12-02 00:00:00 Z
13
+ date: 2012-01-05 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - "="
44
44
  - !ruby/object:Gem::Version
45
- version: 2.0.0.beta1
45
+ version: 2.0.0.beta2
46
46
  type: :runtime
47
47
  version_requirements: *id003
48
48
  - !ruby/object:Gem::Dependency
@@ -53,7 +53,7 @@ dependencies:
53
53
  requirements:
54
54
  - - "="
55
55
  - !ruby/object:Gem::Version
56
- version: 2.0.0.beta1
56
+ version: 2.0.0.beta2
57
57
  type: :runtime
58
58
  version_requirements: *id004
59
59
  - !ruby/object:Gem::Dependency