Skip to content

Instantly share code, notes, and snippets.

View dblevins's full-sized avatar

David Blevins dblevins

View GitHub Profile
ConfigurationFactory config = new ConfigurationFactory();
Assembler assembler = new Assembler();
SystemInstance.get().setProperty("openejb.strict.interface.declaration", "true");
assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new StatelessBean(OrangeBean.class));
#!/usr/bin/env perl
sub which {
my $cmd = shift;
if (eval "require File::Which; 1") {
return File::Which::which($cmd);
} else {
return `which $cmd`;
}
#!/usr/bin/env perl
use strict;
use warnings;
use LWP;
my $user = 'test';
my $site = 'http://blogs.apache.org';
open(C, "< .$user") or die "Unable to open handle to .$user: $!\n";
#!/usr/bin/env perl
use strict;
use warnings;
use LWP;
my $user = 'preview';
my $site = 'http://blogs.apache.org';
open(C, "< .$user") or die "Unable to open handle to .$user: $!\n";
#!/usr/bin/env perl
use strict;
use warnings;
use LWP;
my $user = 'preview';
my $site = 'http://blogs.apache.org';
open(C, "< .$user") or die "Unable to open handle to .$user: $!\n";
#!/usr/bin/env perl
use strict;
use warnings;
use LWP;
my $user = 'test';
my $site = 'http://blogs.apache.org';
open(C, "< .$user") or die "Unable to open handle to .$user: $!\n";
#!/usr/bin/env perl
use strict;
use warnings;
use LWP;
use CGI::Carp qw(fatalsToBrowser);
my $user = 'preview';
my $site = 'http://blogs.apache.org';
public interface Foo {
int doSometing();
String doSomethingElse();
}
public interface FooLocal extends Foo, javax.ejb.EJBLocalObject {
}
public interface FooLocalHome extends javax.ejb.EJBLocalHome {
FooLocal create() throws CreateException;
private void processSessionInterfaces(SessionBean sessionBean, Class<?> beanClass, EjbModule ejbModule) {
ValidationContext validation = ejbModule.getValidation();
String ejbName = sessionBean.getEjbName();
for (Class<?> clazz : ancestors(beanClass)) {
// Anything declared in the xml is also not eligable
List<String> declared = new ArrayList<String>();
declared.addAll(sessionBean.getBusinessLocal());
declared.addAll(sessionBean.getBusinessRemote());
#!/usr/bin/perl -w
################################################################
#
# Calling this script with a parameter results in data for a
# given tv show being screen scraped from epguides.com and
# added to the episode table.
#
# Calling this script without a parameter results in the
# program table being checked for shows that need to be marked
# as already recorded so we can avoid recording episodes we